/* Global Styles */
:root {
    --primary-color: #003366;
    --secondary-color: #1a75ff;
    --accent-color: #ff6b6b;
    --text-color: #333333;
    --light-bg: #f9f9f9;
    --white: #ffffff;
    --gray: #e0e0e0;
    --dark-gray: #555555;
    --success: #28a745;
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

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

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

/* Header */
header {
    background-color: var(--primary-color);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 700;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--white);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav ul li a:hover, nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 51, 102, 0.9), rgba(0, 51, 102, 0.6)), url('https://images.unsplash.com/photo-1508896694512-1eade558679c?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: var(--white);
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    color: var(--primary-color);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid var(--gray);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background-color: rgba(26, 117, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--secondary-color);
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.feature-card p {
    margin-bottom: 20px;
    color: var(--dark-gray);
}

.feature-link {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 600;
    position: relative;
}

.feature-link:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.feature-link:hover:after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* How It Works Section */
.how-it-works {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.how-it-works h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    color: var(--primary-color);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step {
    text-align: center;
    padding: 20px;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.step h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h2 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.footer-links h3, .footer-disclaimer h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--white);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Study Content Pages (Writing, Vocabulary, Civics) */
.page-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

/* Writing Practice Area */
.writing-practice {
    margin-top: 15px;
    width: 100%;
}

.practice-area {
    width: 100%;
    min-height: 60px;
    padding: 10px;
    border: 1px solid var(--gray);
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    resize: vertical;
    transition: all 0.3s ease;
}

.practice-area:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 5px rgba(26, 117, 255, 0.3);
    outline: none;
}

.sentence-item {
    padding-bottom: 20px;
    margin-bottom: 15px;
}

.practice-actions {
    display: flex;
    align-items: center;
    margin-top: 10px;
    gap: 15px;
}

.check-answer-button {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.check-answer-button:hover {
    background-color: var(--primary-color);
}

.answer-result {
    flex-grow: 1;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 500;
}

.answer-result.correct {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.answer-result.incorrect {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.listen-hide-button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.listen-hide-button:hover {
    background-color: #002244;
}

.listen-hide-button i {
    font-size: 14px;
}

.hidden-content {
    color: transparent;
    user-select: none;
    background-color: #e9e9e9;
    border-radius: 4px;
    padding: 2px 0;
}

.page-header h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.page-header p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

.content-section {
    padding: 60px 0;
    background-color: var(--white);
}

.content-container {
    max-width: 900px;
    margin: 0 auto;
}

.study-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 15px 20px;
    background-color: var(--light-bg);
    border-radius: 8px;
}

.voice-controls button {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-right: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.voice-controls button:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

.voice-controls button i {
    font-size: 16px;
}

.study-options select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--gray);
    background-color: var(--white);
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
}

/* Content Card Styles */
.content-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid var(--gray);
    transition: all 0.3s ease;
    position: relative;
}

.content-card:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.content-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.sentence-item, .vocab-item, .question-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray);
    position: relative;
}

.sentence-item:last-child, .vocab-item:last-child, .question-item:last-child {
    border-bottom: none;
}

.item-number {
    min-width: 30px;
    font-weight: 700;
    color: var(--primary-color);
}

.item-content {
    flex-grow: 1;
}

.item-actions {
    display: flex;
    align-items: center;
}

.play-button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--secondary-color);
    font-size: 18px;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.play-button:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.check-item {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.check-item.checked {
    background-color: var(--success);
    border-color: var(--success);
    position: relative;
}

.check-item.checked:after {
    content: "✓";
    position: absolute;
    color: var(--white);
    font-size: 14px;
    line-height: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Vocabulary Special Styling */
.vocab-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.vocab-category {
    padding: 6px 15px;
    background-color: var(--light-bg);
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vocab-category:hover, .vocab-category.active {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Civics Questions Special Styling */
.question-text {
    font-weight: 500;
    margin-bottom: 8px;
}

.answer-text {
    color: var(--dark-gray);
    margin-left: 10px;
    padding-left: 15px;
    border-left: 3px solid var(--secondary-color);
}

.category-label {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 0.8rem;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.repeat-control {
    background-color: var(--light-bg);
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.repeat-control:hover {
    background-color: var(--gray);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.4rem;
    }
    
    nav ul li {
        margin-left: 10px;
    }
    
    nav ul li a {
        padding: 6px 8px;
        font-size: 0.9rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .study-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .voice-controls, .study-options {
        width: 100%;
        display: flex;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    header .container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    nav ul {
        justify-content: center;
    }
    
    .cta-button {
        width: 100%;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
}
