* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #4a6fa5;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #ffd700;
}

/* Hero Section */
#home {
    height: 100vh;
    background: linear-gradient(rgba(74, 111, 165, 0.8), rgba(74, 111, 165, 0.8)), url('https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=English%20learning%20study%20background%20blue%20gradient%20education%20theme&image_size=landscape_16_9');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 2px;
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.2s both;
}

.search-container {
    display: flex;
    max-width: 500px;
    margin: 0 auto 30px;
    animation: fadeInUp 1s ease 0.4s both;
}

#search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

#search-btn {
    background: #ffd700;
    color: #333;
    border: none;
    padding: 0 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

#search-btn:hover {
    background: #ffed4e;
}

.cta-btn {
    background: #ffd700;
    color: #333;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 0.6s both;
    border-radius: 5px;
}

.cta-btn:hover {
    background: #ffed4e;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
}

/* Words Section */
#words {
    padding: 100px 0;
    background: #fff;
}

#words h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: #333;
}

.filter-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.filter-container select {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background: #f9f9f9;
}

.words-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.word-card {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.word-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #4a6fa5;
}

.word-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.word-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #4a6fa5;
}

.pronunciation-btn {
    background: #4a6fa5;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pronunciation-btn:hover {
    background: #3a5a85;
    transform: scale(1.1);
}

.word-detail-content .word-header h2 {
    margin-bottom: 0;
}

.example {
    background: #f5f5f5;
    padding: 15px;
    border-left: 4px solid #4a6fa5;
    margin-bottom: 15px;
    border-radius: 0 5px 5px 0;
    position: relative;
}

.example-pronunciation-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #4a6fa5;
    color: #fff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.example-pronunciation-btn:hover {
    background: #3a5a85;
    transform: scale(1.1);
}

.word-card p {
    color: #666;
    margin-bottom: 10px;
}

.word-card .difficulty {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.word-card .difficulty.easy {
    background: #d4edda;
    color: #155724;
}

.word-card .difficulty.medium {
    background: #fff3cd;
    color: #856404;
}

.word-card .difficulty.hard {
    background: #f8d7da;
    color: #721c24;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination button {
    padding: 10px 15px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover {
    background: #4a6fa5;
    color: #fff;
    border-color: #4a6fa5;
}

.pagination button.active {
    background: #4a6fa5;
    color: #fff;
    border-color: #4a6fa5;
}

/* Word Detail Section */
#word-detail {
    padding: 100px 0;
    background: #f9f9f9;
}

#back-btn {
    background: #4a6fa5;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 5px;
}

#back-btn:hover {
    background: #3a5a85;
}

.word-detail-content {
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.word-detail-content h2 {
    font-size: 2.5rem;
    color: #4a6fa5;
    margin-bottom: 20px;
}

.word-detail-content .pronunciation {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

.word-detail-content h3 {
    font-size: 1.5rem;
    color: #333;
    margin: 30px 0 15px;
    border-bottom: 2px solid #4a6fa5;
    padding-bottom: 10px;
}

.word-detail-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.word-detail-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.word-detail-content li {
    margin-bottom: 10px;
}

.example {
    background: #f5f5f5;
    padding: 15px;
    border-left: 4px solid #4a6fa5;
    margin-bottom: 15px;
    border-radius: 0 5px 5px 0;
}

.example p {
    margin-bottom: 5px;
}

.example .translation {
    color: #666;
    font-style: italic;
}

/* Progress Section */
#progress {
    padding: 100px 0;
    background: #fff;
}

#progress h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: #333;
}

.progress-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.progress-card {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.progress-card h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #333;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a6fa5, #6b8eb8);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-card p {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a6fa5;
}

.recent-words {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.recent-words h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.recent-words-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.recent-word-item {
    background: #fff;
    padding: 10px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.recent-word-item:hover {
    background: #4a6fa5;
    color: #fff;
    transform: translateY(-2px);
}

/* Plan Section */
#plan {
    padding: 100px 0;
    background: #f9f9f9;
}

#plan h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: #333;
}

.plan-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.plan-settings {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.plan-settings h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #4a6fa5;
}

.plan-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 500;
    color: #333;
}

.form-group input[type="number"],
.form-group input[type="time"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.reminder-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.reminder-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
}

#save-plan {
    background: #4a6fa5;
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

#save-plan:hover {
    background: #3a5a85;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 111, 165, 0.3);
}

.plan-status {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.plan-status h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #4a6fa5;
}

.plan-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.plan-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 5px;
}

.plan-stat-label {
    font-weight: 500;
    color: #333;
}

.plan-stat-value {
    font-weight: 600;
    color: #4a6fa5;
    font-size: 1.1rem;
}

.plan-progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.plan-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a6fa5, #6b8eb8);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Game Section */
#game {
    padding: 100px 0;
    background: #fff;
}

#game h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: #333;
}

.game-container {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.game-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    justify-content: center;
}

.game-controls select {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background: #fff;
}

#start-game {
    background: #4a6fa5;
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#start-game:hover {
    background: #3a5a85;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 111, 165, 0.3);
}

.game-content {
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    margin-bottom: 30px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.game-start h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #4a6fa5;
}

.game-question {
    width: 100%;
}

.game-question h3 {
    font-size: 2rem;
    margin-bottom: 40px;
    color: #4a6fa5;
}

.game-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.game-option {
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.game-option:hover {
    background: #e8f0fe;
    border-color: #4a6fa5;
    transform: translateY(-2px);
}

.game-option.correct {
    background: #d4edda;
    border-color: #28a745;
}

.game-option.wrong {
    background: #f8d7da;
    border-color: #dc3545;
}

.game-result {
    text-align: center;
}

.game-result h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #4a6fa5;
}

.game-result p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

#restart-game {
    background: #4a6fa5;
    color: #fff;
    border: none;
    padding: 15px 40px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#restart-game:hover {
    background: #3a5a85;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 111, 165, 0.3);
}

.game-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    background: #fff;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    min-width: 120px;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: #4a6fa5;
}

/* About Section */
#about {
    padding: 100px 0;
    background: #f9f9f9;
}

#about h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

#about p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.8;
    text-align: center;
}

#about ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

#about li {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
}

#about li:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #4a6fa5;
}

#about li i {
    font-size: 2rem;
    color: #4a6fa5;
    margin-bottom: 10px;
}

/* Footer */
footer {
    background: #4a6fa5;
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .search-container {
        max-width: 350px;
    }

    .filter-container {
        flex-direction: column;
        align-items: center;
    }

    .filter-container select {
        width: 200px;
    }

    .words-grid {
        grid-template-columns: 1fr;
    }

    .word-detail-content {
        padding: 20px;
    }

    .progress-container {
        grid-template-columns: 1fr;
    }

    #about ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    #words h2,
    #progress h2,
    #about h2 {
        font-size: 2rem;
    }

    .word-card {
        padding: 15px;
    }

    .word-detail-content h2 {
        font-size: 2rem;
    }
}

/* Hidden class */
.hidden {
    display: none;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #4a6fa5;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading.fade {
    opacity: 0;
    pointer-events: none;
}

.loading h1 {
    color: #fff;
    font-size: 3rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}