/* Sequence of Tenses Page Specific Styles */

/* Page Header Styles */
.page-header {
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* Quick Navigation */
.quick-nav {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.nav-link {
    padding: 0.75rem 1.5rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Rules Sections */
.rules-section,
.rule-section,
.complex-section,
.exceptions-section {
    padding: 4rem 0;
}

.rules-section:nth-child(even),
.rule-section:nth-child(even),
.complex-section:nth-child(even),
.exceptions-section:nth-child(even) {
    background: var(--bg-secondary);
}

.rule-overview {
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.rule-overview h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
}

.rule-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.rule-item {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rule-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.rule-text {
    display: block;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    text-align: center;
}

/* Rules Diagram */
.rules-diagram {
    margin-top: 3rem;
}

.rules-diagram h3 {
    margin-bottom: 2rem;
    color: var(--text-primary);
    text-align: center;
    font-size: 1.75rem;
    font-weight: 600;
}

.diagram-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.diagram-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.diagram-main,
.diagram-dependent {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    min-width: 250px;
}

.diagram-arrow {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: bold;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Rule Explanation */
.rule-explanation {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
}

.rule-explanation h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.rule-explanation p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Usage Sections */
.usage-section {
    margin-top: 3rem;
}

.usage-section h3 {
    margin-bottom: 2rem;
    color: var(--text-primary);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.75rem;
    font-size: 1.75rem;
    font-weight: 600;
}

.usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.usage-single {
    max-width: 800px;
    margin: 0 auto;
}

.usage-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.usage-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.usage-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.usage-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.usage-card h4 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
    padding-right: 3rem;
}

/* Example Items */
.usage-examples {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.example-item {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
}

.example-item:hover {
    background: var(--bg-secondary);
    transform: translateX(4px);
}

.english {
    display: block;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.russian {
    display: block;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.5;
}

.pronounce-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.pronounce-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

/* Grammar Notes */
.grammar-note {
    background: var(--bg-tertiary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-top: 2rem;
    border: 1px solid var(--border-color);
}

.grammar-note.important {
    border-left: 4px solid var(--accent-color);
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, rgba(255, 193, 7, 0.1) 100%);
}

.grammar-note h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.grammar-note p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.translation-note {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    border: 1px dashed var(--border-color);
}

.translation-note p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Feature Highlights */
.feature-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

/* Practice Section */
.practice-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.practice-activities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.activity-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.3s ease;
}

.activity-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.activity-card h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
}

.activity-instruction {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Game and Quiz Styles */
.tense-agreement-game,
.rule-identification-quiz,
.sentence-transformation {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.game-item,
.quiz-item,
.transformation-item {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.sentence {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
}

.options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.option-btn {
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.option-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.option-btn.correct {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.option-btn.incorrect {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

/* Word Bank for Sentence Transformation */
.word-bank {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
}

.word {
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
}

.word:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.word.used {
    opacity: 0.5;
    cursor: not-allowed;
}

.sentence-area {
    min-height: 60px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 1rem 0;
    background: var(--bg-tertiary);
}

.check-transformation {
    padding: 0.75rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.check-transformation:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

/* Related Topics */
.related-topics {
    padding: 4rem 0;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.topic-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    text-align: center;
}

.topic-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background: var(--primary-color);
    color: white;
}

.topic-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.topic-name {
    font-weight: 600;
    line-height: 1.4;
}

/* Sentence Construction Styles */
.sentence-construction {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.construction-item {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.construction-item p {
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    font-size: 1.1rem;
}

.word-bank {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    min-height: 80px;
    border: 2px dashed var(--border-color);
    justify-content: center;
}

.word {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    cursor: grab;
    user-select: none;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.word:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-md);
}

.word:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.word.used {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.sentence-area {
    min-height: 100px;
    border: 3px dashed var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    align-items: center;
    justify-content: center;
}

.sentence-area.drag-over {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sentence-area .word {
    cursor: pointer;
    margin: 0.25rem;
}

.sentence-area .word:hover {
    background: linear-gradient(135deg, var(--error-color), color-mix(in srgb, var(--error-color) 80%, black));
    transform: scale(1.05);
}

.check-construction {
    background: linear-gradient(135deg, var(--success-color), color-mix(in srgb, var(--success-color) 80%, black));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
    min-width: 200px;
    box-shadow: var(--shadow-md);
}

.check-construction:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, color-mix(in srgb, var(--success-color) 80%, black), var(--success-color));
}

.check-construction:active {
    transform: translateY(0);
}

/* Drag and Drop Visual Feedback */
.dragging {
    opacity: 0.5;
    transform: scale(0.9);
}

/* Correct/Incorrect States */
.sentence-area.correct {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.05);
}

.sentence-area.incorrect {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .quick-nav {
        flex-direction: column;
        align-items: center;
    }

    .nav-link {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .diagram-container {
        flex-direction: column;
    }

    .diagram-arrow {
        transform: rotate(90deg);
        margin: 1rem 0;
    }

    .usage-grid {
        grid-template-columns: 1fr;
    }

    .practice-activities {
        grid-template-columns: 1fr;
    }

    .options {
        flex-direction: column;
    }

    .option-btn {
        width: 100%;
    }

    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 2rem 0;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .page-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .usage-card,
    .activity-card {
        padding: 1.5rem;
    }

    .topics-grid {
        grid-template-columns: 1fr;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {

    .diagram-arrow,
    .usage-card,
    .activity-card,
    .topic-card,
    .option-btn,
    .pronounce-btn,
    .nav-link,
    .feature-item,
    .example-item,
    .rule-item {
        animation: none;
        transition: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {

    .usage-card,
    .activity-card,
    .example-item,
    .rule-item {
        border-width: 2px;
    }

    .grammar-note.important {
        border-left-width: 6px;
    }
}

/* Print Styles */
@media print {

    .quick-nav,
    .pronounce-btn,
    .options,
    .word-bank,
    .check-transformation {
        display: none;
    }

    .page-header,
    .content-card,
    .activity-card {
        break-inside: avoid;
        border: 1px solid #000;
    }
}