/* ========================================
   推荐一个好地方 - 作文练习页面样式
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "SimHei", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.8;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease;
    position: relative;
}

header h1 {
    font-size: 2.8em;
    margin-bottom: 10px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
}

header .subtitle {
    font-size: 1.3em;
    opacity: 0.95;
    margin-top: 10px;
}

.back-button {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.page-nav {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 100;
    max-height: 70vh;
    overflow-y: auto;
}

.page-nav h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.page-nav a {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    margin: 5px 0;
    font-size: 0.85em;
    transition: all 0.3s;
}

.page-nav a:hover {
    background: #667eea;
    color: white;
}

.main-content {
    background: white;
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    animation: fadeInUp 0.8s ease;
}

.section {
    margin-bottom: 40px;
}

.section-title {
    color: #667eea;
    font-size: 2em;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 4px solid #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-container {
    display: grid;
    gap: 25px;
}

.step-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 25px;
    border-left: 6px solid #667eea;
    transition: background-color 0.2s ease;
    color: black;
    cursor: default;
}

.step-card:hover {
    background: linear-gradient(135deg, #eef2f7 0%, #b8c9e5 100%);
}

.step-card h3 {
    color: #764ba2;
    font-size: 1.5em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-number {
    background: #667eea;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
}

.example-box {
    background: #fff9e6;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border-left: 5px solid #ffa500;
}

.example-box h4 {
    color: #e67e22;
    margin-bottom: 12px;
    font-size: 1.2em;
}

.tip-box {
    background: #e8f5e9;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border-left: 5px solid #4caf50;
}

.tip-box h4 {
    color: #2e7d32;
    margin-bottom: 12px;
    font-size: 1.2em;
}

.highlight {
    background: linear-gradient(120deg, #ffd700 0%, #ffd700 100%);
    background-repeat: no-repeat;
    background-size: 100% 45%;
    background-position: 0 85%;
    padding: 2px 5px;
    font-weight: bold;
}

.content-list {
    margin: 15px 0;
    padding-left: 25px;
}

.content-list li {
    margin: 10px 0;
    position: relative;
}

.content-list li::before {
    content: "▸";
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: -20px;
}

.method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.method-card {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: border-color 0.2s ease;
}

.method-card:hover {
    border-color: #667eea;
}

.method-card h4 {
    color: #667eea;
    margin-bottom: 12px;
    font-size: 1.3em;
}

.word-bank {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.word-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.word-tag:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a91 100%);
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.4);
}

.word-tag:active {
    background: linear-gradient(135deg, #4458c2 0%, #552b80 100%);
}

.practice-section {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-radius: 20px;
    padding: 30px;
    margin-top: 40px;
}

.practice-section h2 {
    color: #d63031;
    font-size: 2em;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    color: #2d3436;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 3px solid #dfe6e9;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.char-count {
    text-align: right;
    color: #636e72;
    font-size: 0.9em;
    margin-top: 5px;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 3px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(0, 184, 148, 0.4);
}

.btn-success:hover {
    box-shadow: 0 6px 25px rgba(0, 184, 148, 0.5);
}

.sample-section {
    margin-top: 40px;
}

.sample-card {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    transition: border-color 0.2s ease;
}

.sample-card:hover {
    border-color: #667eea;
}

.sample-card h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.sample-card .highlight-point {
    background: #e8f5e9;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 4px solid #4caf50;
}

.progress-tracker {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.progress-bar {
    background: #e0e0e0;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-fill {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 6px;
}

.progress-text {
    text-align: center;
    color: #636e72;
    font-weight: bold;
    margin-top: 10px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.close {
    color: #aaa;
    float: right;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid #f0f0f0;
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
}

tr:hover {
    background: #f8f9fa;
}

/* 动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .main-content {
        padding: 20px;
    }

    .section-title {
        font-size: 1.5em;
    }

    .method-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .page-nav {
        display: none;
    }

    .back-button {
        position: relative;
        margin-bottom: 15px;
    }
}

/* 打印样式 */
@media print {
    body * {
        visibility: hidden;
    }
    #previewContent, #previewContent * {
        visibility: visible;
    }
    #previewContent {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    .btn, .back-button, .page-nav {
        display: none !important;
    }
}

