/* Стили для страниц топиков */

/* Hero секция топика */
.topic-hero {
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 2rem;
    border-radius: 2rem;
    margin: 2rem 1rem 4rem;
    position: relative;
    overflow: hidden;
}

.topic-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.topic-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.topic-hero__badge-icon {
    width: 1rem;
    height: 1rem;
}

.topic-hero__title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.topic-hero__subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.topic-hero__stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.topic-hero__stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.topic-hero__stat-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Секция алфавита */
.alphabet-section {
    margin-bottom: 4rem;
    padding: 0 1rem;
}

.alphabet-section__title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 1rem;
}

.alphabet-section__subtitle {
    text-align: center;
    font-size: 1.25rem;
    color: var(--warm-gray);
    margin-bottom: 3rem;
}

.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.alphabet-letter {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.alphabet-letter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-accent), #4a89e8);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.alphabet-letter:hover::before {
    transform: scaleX(1);
}

.alphabet-letter:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(95, 157, 255, 0.2);
    border-color: var(--brand-accent);
}

.alphabet-letter__char {
    font-size: 4rem;
    font-weight: 800;
    color: var(--brand-primary);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.alphabet-letter__pronunciation {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--brand-accent);
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.alphabet-letter__example {
    font-size: 1rem;
    color: var(--warm-gray);
    font-weight: 500;
}

/* Секция практики */
.practice-section {
    background: white;
    border-radius: 2rem;
    padding: 3rem;
    margin: 0 1rem 4rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.practice-section__title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 1rem;
}

.practice-section__subtitle {
    text-align: center;
    font-size: 1.25rem;
    color: var(--warm-gray);
    margin-bottom: 3rem;
}

.practice-game {
    max-width: 600px;
    margin: 0 auto;
}

.practice-game__question {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 1rem;
    border: 2px solid var(--brand-accent);
}

.practice-game__question p {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--brand-primary);
    margin: 0;
}

.practice-game__input {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.practice-game__input input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid hsl(var(--border));
    border-radius: 1rem;
    font-size: 1.25rem;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.practice-game__input input:focus {
    outline: none;
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(95, 157, 255, 0.1);
}

.practice-game__check-btn {
    padding: 1rem 2rem;
    background: var(--brand-accent);
    color: white;
    border: 2px solid var(--brand-accent);
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.practice-game__check-btn:hover {
    background: #4a89e8;
    border-color: #4a89e8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(95, 157, 255, 0.3);
}

.practice-game__result {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 1rem;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.practice-game__result--correct {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 2px solid #10b981;
}

.practice-game__result--incorrect {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 2px solid #ef4444;
}

.practice-game__controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.practice-game__next-btn,
.practice-game__reset-btn {
    padding: 1rem 2rem;
    border: 2px solid var(--brand-accent);
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.practice-game__next-btn {
    background: var(--brand-accent);
    color: white;
}

.practice-game__next-btn:hover {
    background: #4a89e8;
    border-color: #4a89e8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(95, 157, 255, 0.3);
}

.practice-game__reset-btn {
    background: white;
    color: var(--brand-accent);
}

.practice-game__reset-btn:hover {
    background: var(--brand-accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(95, 157, 255, 0.3);
}

/* Стили для контента страниц топиков */
.topic {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.topic__header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1.5rem;
    color: white;
}

.topic__title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.topic__content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* План изучения */
.topic__plan {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.topic__plan-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.topic__plan-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.topic__plan-step {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.topic__plan-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-accent), #4a89e8);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.topic__plan-step:hover::before {
    transform: scaleX(1);
}

.topic__plan-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(95, 157, 255, 0.2);
    border-color: var(--brand-accent);
}

.topic__plan-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.topic__plan-step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 1rem;
}

.topic__plan-step-description {
    color: var(--warm-gray);
    line-height: 1.6;
    font-size: 1rem;
    margin: 0;
}

/* Материалы для изучения */
.topic__documents {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.topic__documents-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.topic__document {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.topic__document::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-accent), #4a89e8);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.topic__document:hover::before {
    transform: scaleX(1);
}

.topic__document:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(95, 157, 255, 0.15);
    border-color: var(--brand-accent);
}

.topic__document-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.topic__document-info {
    flex: 1;
}

.topic__document-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 0.5rem;
}

.topic__document-description {
    color: var(--warm-gray);
    line-height: 1.5;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.topic__document-download {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--brand-accent) 0%, #4a89e8 100%);
    color: white;
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(95, 157, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.topic__document-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.topic__document-download:hover::before {
    left: 100%;
}

.topic__document-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(95, 157, 255, 0.4);
    text-decoration: none;
    color: white;
}

/* Советы по изучению */
.topic__tips {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.topic__tips-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.topic__tips-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.topic__tip {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 1rem;
    padding: 2rem;
    border: 2px solid #0ea5e9;
    position: relative;
    overflow: hidden;
}

.topic__tip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0ea5e9, #0284c7);
}

.topic__tip-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0ea5e9;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topic__tip-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.topic__tip-list li {
    padding: 0.5rem 0;
    color: var(--warm-gray);
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.6;
}

.topic__tip-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #0ea5e9;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Навигация между топиками */
.topic__footer {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 2rem;
}

.topic__navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.topic__nav-btn {
    padding: 1rem 2rem;
    border: 2px solid var(--brand-accent);
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    color: var(--brand-accent);
    position: relative;
    overflow: hidden;
}

.topic__nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(95, 157, 255, 0.1), transparent);
    transition: left 0.5s;
}

.topic__nav-btn:hover::before {
    left: 100%;
}

.topic__nav-btn:hover {
    background: var(--brand-accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(95, 157, 255, 0.3);
}

.topic__nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f3f4f6;
    color: #9ca3af;
    border-color: #d1d5db;
}

.topic__nav-btn:disabled:hover {
    transform: none;
    box-shadow: none;
    background: #f3f4f6;
    color: #9ca3af;
}

/* Адаптивность */
@media (max-width: 768px) {
    .topic-hero {
        padding: 3rem 1.5rem;
        margin: 1rem;
    }
    
    .topic-hero__title {
        font-size: 2.5rem;
    }
    
    .topic-hero__subtitle {
        font-size: 1.25rem;
    }
    
    .topic-hero__stats {
        gap: 1.5rem;
    }
    
    .alphabet-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .alphabet-letter {
        padding: 1.5rem;
    }
    
    .alphabet-letter__char {
        font-size: 3rem;
    }
    
    .practice-section {
        padding: 2rem 1.5rem;
        margin: 0 1rem 2rem;
    }
    
    .practice-game__input {
        flex-direction: column;
    }
    
    .practice-game__controls {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .topic-hero__title {
        font-size: 2rem;
    }
    
    .alphabet-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .alphabet-letter__char {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .topic-hero {
        padding: 2rem 1rem;
        margin: 0.5rem;
    }
    
    .topic-hero__title {
        font-size: 2rem;
    }
    
    .topic-hero__subtitle {
        font-size: 1rem;
    }
    
    .topic-hero__stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .alphabet-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.5rem;
    }
    
    .alphabet-letter {
        padding: 0.75rem;
    }
    
    .alphabet-letter__char {
        font-size: 2rem;
    }
    
    .practice-section {
        padding: 1.5rem 1rem;
        margin: 0 0.5rem 1.5rem;
    }
    
    .practice-game__input {
        gap: 0.75rem;
    }
    
    .practice-game__input input {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    .practice-game__buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .practice-game__btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .topic__nav {
        margin: 0 0.5rem 1rem;
        padding: 1rem;
    }
    
    .topic__nav-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .topic__nav-btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .topic__nav-btn i {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* Стили для стрелочек в навигации */
.topic__nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-accent) 0%, #4a89e8 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(95, 157, 255, 0.3);
}

.topic__nav-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #4a89e8 0%, #3b82f6 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(95, 157, 255, 0.4);
}

.topic__nav-btn:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

.topic__nav-btn i {
    width: 1.5rem;
    height: 1.5rem;
}