/* course.css - В стиле theme.php с поддержкой иерархии тем */

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

/* ЗАГОЛОВОК КУРСА В СТИЛЕ THEME-HEADER */
.course-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: clamp(15px, 3vw, 25px);
    margin-bottom: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.course-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

/* Панель управления для владельца курса - ТЕМНАЯ ВЕРСИЯ */
.owner-control-panel {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0 25px 0;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.owner-control-panel .control-label {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.theme-toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.theme-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: .4s;
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

.toggle-slider:hover {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .owner-control-panel {
        padding: 12px;
        margin: 12px -10px 20px -10px;
        border-radius: 0;
        flex-direction: column;
        gap: 10px;
    }

    .owner-control-panel .control-label {
        font-size: 0.9rem;
        text-align: center;
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.course-header > * {
    position: relative;
    z-index: 1;
}

.course-header h1 {
    font-size: clamp(1.4rem, 4.5vw, 2rem);
    font-weight: 700;
    margin: 0 0 clamp(15px, 3vw, 20px) 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    word-wrap: break-word;
    hyphens: auto;
    text-align: center;
    order: 0;
}

.course-header p {
    font-size: clamp(0.9rem, 2.2vw, 1rem);
    line-height: 1.5;
    opacity: 0.9;
    text-align: center;
    margin: 0 0 clamp(15px, 3vw, 20px) 0;
    order: 1;
}

/* Стили для логотипа курса */
.course-header img {
    max-width: clamp(150px, 30vw, 200px) !important;
    margin: 0 auto clamp(15px, 3vw, 20px) auto !important;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    order: -1;
}

/* Стили для кнопок курса */
.course-header .course-buttons {
    display: flex;
    justify-content: center;
    gap: clamp(6px, 1.5vw, 10px);
    flex-wrap: wrap;
    order: 3;
    margin-top: clamp(15px, 3vw, 20px);
}

.course-buttons .u-btn {
    display: flex;
    align-items: center;
    gap: clamp(4px, 1vw, 6px);
    padding: clamp(8px, 1.5vw, 10px) clamp(10px, 2vw, 14px);
    font-size: clamp(0.75rem, 1.6vw, 0.85rem);
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-decoration: none;
    border-radius: 20px;
    white-space: nowrap;
    min-height: 38px;
}

.course-buttons .u-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Стили для прогресса курса */
.course-progress {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: clamp(12px, 2.5vw, 15px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    order: 2;
    margin: clamp(15px, 3vw, 20px) 0;
}

.progress-bar {
    flex-grow: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s ease;
    border-radius: 6px;
}

.progress-text {
    min-width: 120px;
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    color: white;
    opacity: 0.9;
    white-space: nowrap;
}

/* Кнопка подписки с поддержкой валют */
.subscribe-btn {
    padding: clamp(10px, 2vw, 12px) clamp(20px, 4vw, 25px);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-weight: 600;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    margin-top: clamp(15px, 3vw, 20px);
    align-self: center;
    min-width: 180px;
    text-align: center;
}

.subscribe-btn:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Стили для отображения валюты */
.currency-display {
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ТЕМЫ КУРСА С ПОДДЕРЖКОЙ ИЕРАРХИИ */
.course-themes {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.theme-card {
    background: #6c757d !important; /* Светло-серый вместо черного */
    color: #ffffff !important; /* Белый текст для контраста */
    border-radius: 15px;
    padding: clamp(15px, 3vw, 20px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    padding-left: 50px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #5a6268;
    margin-bottom: 10px;
}

/* Различные уровни тем */
.theme-card.theme-level-0 {
    background: #6c757d !important;
    border-left: 4px solid #667eea;
}

.theme-card.theme-level-1 {
    background: #5a6268 !important;
    border-left: 4px solid #73a3de;
}

.theme-card.theme-level-2 {
    background: #495057 !important;
    border-left: 4px solid #85b7e8;
}

.theme-card.theme-level-3 {
    background: #3d4348 !important;
    border-left: 4px solid #97cbf2;
}

.theme-card.locked {
    opacity: 0.7;
    background: #495057 !important; /* Темнее для заблокированных */
}

.theme-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Индикаторы тем */
.theme-indicator {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-theme-indicator {
    color: #73a3de;
}

.last-theme-indicator {
    color: #ffd700;
    animation: pulse 2s infinite;
}

.locked-theme-indicator {
    color: #999;
}

.current-theme-arrow {
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 15px solid #73a3de;
}

/* Анимация пульсации для последней темы */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
    50% { opacity: 0.7; transform: translateY(-50%) scale(1.1); }
}

/* Заголовок темы - АДАПТИВНЫЙ */
.theme-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 20px;
}

.theme-info {
    flex: 1;
    min-width: 0; /* Позволяет тексту сжиматься */
}

.theme-info h3 {
    margin: 0 0 8px 0;
    color: #ffffff !important;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-info p {
    margin: 0;
    color: #e9ecef !important;
    font-size: 0.9rem;
    line-height: 1.4;
}

.theme-actions {
    flex-shrink: 0;
    width: 180px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.theme-progress {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.theme-progress .progress-text {
    color: #e9ecef !important;
    font-size: clamp(0.8rem, 1.6vw, 0.85rem);
    text-align: center;
    white-space: nowrap;
}

.theme-progress .u-btn,
.theme-slides .u-btn,
.theme-video .u-btn {
    padding: clamp(8px, 1.5vw, 10px) clamp(12px, 2vw, 16px);
    background-color: #73a3de;
    color: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
    font-size: clamp(0.75rem, 1.6vw, 0.85rem);
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.theme-progress .u-btn:hover,
.theme-slides .u-btn:hover,
.theme-video .u-btn:hover {
    background-color: #5a8ad0;
    transform: translateY(-1px);
}

.theme-slides .u-btn {
    background-color: #17a2b8 !important;
}

.theme-slides .u-btn:hover {
    background-color: #138496 !important;
}

.video-btn {
    background-color: #e74c3c !important;
}

.video-btn:hover {
    background-color: #c0392b !important;
}

/* Элементы управления раскрытием/сворачиванием тем */
.theme-expand-control {
    margin: 5px 0;
    padding: 12px 15px;
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border: 2px solid #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.theme-expand-control:hover {
    background: linear-gradient(135deg, #5a6578 0%, #3d4758 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theme-expand-control.disabled {
    cursor: not-allowed;
    opacity: 0.5;
    background: linear-gradient(135deg, #4a4a4a 0%, #2a2a2a 100%);
    border-color: #666;
}

.theme-expand-control.disabled:hover {
    transform: none;
    background: linear-gradient(135deg, #4a4a4a 0%, #2a2a2a 100%);
}

.expand-button {
    width: 32px;
    height: 32px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: white;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.theme-expand-control:hover .expand-button {
    background: #5a8ad0;
    transform: scale(1.1);
}

.expand-icon {
    font-size: 20px;
    line-height: 1;
}

.expand-text {
    font-size: 1rem;
    color: #ffffff;
    font-weight: 600;
    flex-grow: 1;
    margin-left: 15px;
}

.expand-arrow {
    color: #ffffff;
    font-size: 16px;
    transition: transform 0.3s ease;
}

/* ИСПРАВЛЕННАЯ АНИМАЦИЯ ДЛЯ КОНТЕЙНЕРА ПОДТЕМ */
.subtemes-container {
    margin: 10px 0 10px 50px;
    background: linear-gradient(135deg, #7a8288 0%, #6c757d 100%);
    border-radius: 12px;
    border-left: 4px solid #85b7e8;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 0;
    padding-bottom: 0;
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out, padding 0.4s ease-out;
}

.subtemes-container.expanded {
    max-height: 2000px;
    opacity: 1;
    padding-top: 15px;
    padding-bottom: 15px;
}

.subtemes-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #85b7e8 0%, transparent 100%);
    border-radius: 12px 12px 0 0;
}

.subtemes-container .theme-card {
    background: #8a9196 !important; /* Светлее родительской темы */
    border-left: 3px solid #97cbf2;
    margin-bottom: 8px;
}

.subtemes-container .theme-card.theme-level-1 {
    background: #8a9196 !important; /* Светлее */
}

.subtemes-container .theme-card.theme-level-2 {
    background: #7a8288 !important; /* Чуть темнее для второго уровня */
}

.subtemes-container .theme-card.theme-level-3 {
    background: #6c757d !important; /* Еще темнее для третьего уровня */
}

/* Подсветка для текущей темы */
.current-theme-highlight {
    box-shadow: 0 0 20px rgba(115, 163, 222, 0.5);
    border-color: #73a3de !important;
}

/* Сообщение о заблокированной теме */
.theme-locked-message {
    text-align: center;
    padding: 15px;
    color: #ccc;
    font-style: italic;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-top: 10px;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.no-themes {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1.1rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 20px 0;
}

/* ПАНЕЛЬ ПОДПИСКИ - уменьшена на 10% */
.subscription-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 22px; /* Уменьшено с 25px */
    margin: 20px 0;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.subscription-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

.subscription-panel-content {
    position: relative;
    z-index: 1;
}

.subscription-panel h3 {
    margin-bottom: 12px; /* Уменьшено с 13.5px */
    font-size: 1.22rem; /* Уменьшено с 1.35rem */
    color: white;
    font-weight: 700;
}

.subscription-panel p {
    margin-bottom: 16px; /* Уменьшено с 18px */
    font-size: 0.9rem; /* Уменьшено с 0.99rem */
    opacity: 0.9;
    line-height: 1.5;
}

.subscription-panel .price {
    font-size: 1.6rem; /* Уменьшено с 1.8rem */
    font-weight: bold;
    margin: 12px 0; /* Уменьшено с 13.5px */
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.subscription-panel .u-btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 10px 24px; /* Уменьшено с 10.8px 27px */
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: inline-block;
    text-align: center;
    text-decoration: none;
    border-radius: 20px;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.subscription-panel .u-btn:hover {
    background-color: white;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Варианты панелей подписки */
.subscription-panel.login-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.subscription-panel.free-panel {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.subscription-panel.paid-panel {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333;
}

.subscription-panel.paid-panel h3,
.subscription-panel.paid-panel p {
    color: #333;
}

.subscription-panel.paid-panel .u-btn {
    border-color: #333;
    color: #333;
    background-color: rgba(51, 51, 51, 0.1);
}

.subscription-panel.paid-panel .u-btn:hover {
    background-color: #333;
    color: white;
}

/* МОДАЛЬНОЕ ОКНО ДЛЯ ВИДЕО */
#videoModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

#videoModal .modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    margin: 50px auto;
    background-color: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

#videoModal .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff6b6b;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#videoModal .close-btn:hover {
    background: #ee5a24;
    transform: scale(1.1);
}

#videoModal .video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#videoModal iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

#videoModal h3 {
    text-align: center;
    color: #333;
    margin-bottom: 15px;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
}

#videoModal .u-btn {
    display: block;
    margin: 15px auto 0;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    max-width: 200px;
}

#videoModal .u-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* АДАПТИВНОСТЬ */
@media (max-width: 1200px) {
    .course-content {
        padding: 15px;
    }
}

/* АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ - ИЗМЕНЕНИЕ ПОРЯДКА ЭЛЕМЕНТОВ ТЕМЫ */
@media (max-width: 768px) {
    .course-content {
        padding: 10px;
    }

    .course-header {
        padding: clamp(12px, 2.5vw, 18px);
        margin: -10px -10px 20px -10px;
        border-radius: 0 0 15px 15px;
    }

    /* МОБИЛЬНАЯ АДАПТАЦИЯ БЛОКА ТЕМЫ */
    .theme-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .theme-info {
        order: 1;
        width: 100%;
    }

    .theme-info h3 {
        margin-bottom: 10px;
    }

    .theme-actions {
        order: 2;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .theme-progress {
        order: 1; /* Прогресс идет первым в блоке actions */
        text-align: center;
    }

    .theme-progress .progress-text {
        text-align: center;
        font-size: 0.9rem;
    }

    .theme-progress .u-btn {
        order: 2; /* Кнопка идет вторым в блоке actions */
        width: 100%;
        margin-top: 5px;
    }

    .theme-slides .u-btn,
    .theme-video .u-btn {
        width: 100%;
    }

    .subscription-panel {
        padding: 18px 12px; /* Дополнительно уменьшили для мобильных */
        margin: 15px -10px;
        border-radius: 0;
    }

    .subscription-panel h3 {
        font-size: 1.1rem;
    }

    .subscription-panel p {
        font-size: 0.85rem;
    }

    .subscription-panel .price {
        font-size: 1.4rem;
    }

    .course-buttons .u-btn {
        min-width: 40px;
        padding: 8px;
        justify-content: center;
    }

    .course-buttons .u-btn i {
        margin: 0;
    }

    .btn-text-desktop {
        display: none !important;
    }

    .subscribe-btn {
        min-width: 160px;
        font-size: 0.9rem;
    }

    .theme-expand-control {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .expand-button {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .expand-text {
        font-size: 0.9rem;
        margin-left: 12px;
    }

    .subtemes-container {
        padding-left: 12px;
        padding-right: 12px;
        margin: 8px 0 8px 35px; /* Увеличен отступ и на мобильных */
    }
}

@media (max-width: 480px) {
    .theme-card {
        padding: 12px 12px 12px 40px;
    }

    .theme-indicator {
        left: 8px;
        width: 24px;
        height: 24px;
    }

    .current-theme-arrow {
        border-top: 12px solid transparent;
        border-bottom: 12px solid transparent;
        border-left: 12px solid #73a3de;
    }

    .subscribe-btn {
        min-width: 140px;
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .theme-actions {
        width: 100%;
    }

    .theme-expand-control {
        padding: 8px 10px;
    }

    .expand-button {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .expand-text {
        font-size: 0.85rem;
        margin-left: 10px;
    }

    .subtemes-container {
        padding-left: 10px;
        padding-right: 10px;
        margin: 6px 0 6px 25px; /* Увеличен отступ и на очень маленьких экранах */
    }
}

@media (max-width: 375px) {
    .course-header {
        padding: 10px;
    }

    .subscription-panel {
        padding: 15px 8px;
    }

    .theme-card {
        padding: 10px 10px 10px 35px;
    }

    .theme-indicator {
        left: 5px;
        width: 20px;
        height: 20px;
    }

    .subscribe-btn {
        min-width: 120px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Улучшения для accessibility */
@media (prefers-reduced-motion: reduce) {
    .course-header::before,
    .subscription-panel::before,
    .theme-card,
    .course-buttons .u-btn,
    .subscription-panel .u-btn,
    .subscribe-btn,
    .theme-expand-control,
    .last-theme-indicator {
        animation: none;
        transition: none;
    }

    .theme-card:hover,
    .course-buttons .u-btn:hover,
    .subscription-panel .u-btn:hover,
    .subscribe-btn:hover,
    .theme-expand-control:hover {
        transform: none;
    }
}

/* Темная тема для устройств с поддержкой */
@media (prefers-color-scheme: dark) {
    .theme-card {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .theme-card.locked {
        background: #1a202c;
    }

    .theme-card h3 {
        color: #e2e8f0;
    }

    .theme-locked-message {
        background: rgba(26, 32, 44, 0.8);
        color: #a0aec0;
    }

    .no-themes {
        background: #1a202c;
        color: #a0aec0;
    }

    .theme-expand-control {
        background: rgba(26, 32, 44, 0.8);
        border-color: #4a5568;
    }
}

/* Стили для высоких DPI экранов */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .course-header,
    .subscription-panel {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }

    .course-header h1 {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    }
}

/* Дополнительные стили для поддержки валют */
.price-loading {
    opacity: 0.5;
    animation: pulse-loading 1.5s infinite;
}

@keyframes pulse-loading {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Стили для индикации валюты */
.currency-indicator {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 0.8em;
    margin-left: 5px;
}

/* Анимация для обновления цены */
.price-update {
    animation: priceChange 0.5s ease-in-out;
}

@keyframes priceChange {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Стили для элементов в области просмотра */
.theme-card.in-viewport {
    opacity: 1;
    transform: translateY(0);
}

/* Стили для загрузки страницы */
.page-loaded .theme-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

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