.videos-section { padding: 40px 0 80px; }
.auth-section { padding: 60px 0 100px; display: flex; justify-content: center; align-items: center; min-height: 60vh; }
.auth-card { background: var(--card-bg); backdrop-filter: blur(8px); border-radius: 40px; padding: 40px; max-width: 480px; width: 100%; border: 1px solid var(--border-color); box-shadow: 0 15px 30px -12px var(--shadow-color); transition: transform 0.3s ease; }
.auth-card:hover { transform: translateY(-5px); }
.auth-card h2 { font-size: 2rem; text-align: center; margin-bottom: 16px; color: var(--accent); font-weight: normal; }
.separator { width: 60px; height: 2px; background: var(--accent); margin: 0 auto 32px auto; border: none; opacity: 0.5; }
.input-group { margin-bottom: 24px; }
.input-group label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--text-dark); }
.input-group input { width: 100%; padding: 14px 20px; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 60px; font-size: 1rem; color: var(--text-dark); transition: all 0.2s; }
.input-group input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(94,64,64,0.2); }
.btn-login { width: 100%; background: var(--accent); color: white; border: none; padding: 14px; border-radius: 60px; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: background 0.2s, transform 0.1s; }
.btn-login:hover { background: var(--accent-dark); transform: scale(1.02); }
.error-message { background: rgba(220, 53, 69, 0.1); color: #dc3545; padding: 12px; border-radius: 60px; text-align: center; margin-top: 16px; font-size: 0.9rem; }
.choice-buttons { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin-top: 30px; }
.choice-btn { background: var(--accent); color: white !important; padding: 14px 36px; border-radius: 60px; font-weight: 600; transition: all 0.25s ease; box-shadow: 0 2px 8px var(--shadow-color); text-decoration: none; display: inline-block; font-size: 1.2rem; white-space: nowrap; border: none; cursor: pointer; }
.choice-btn:hover { background: var(--accent-dark); transform: scale(1.05); box-shadow: 0 6px 14px var(--shadow-color); }
.logout-link { text-align: center; margin-top: 24px; }
.logout-link a { color: var(--accent); text-decoration: underline; }
@media (max-width: 768px) { .auth-card { padding: 30px 20px; } .choice-btn { padding: 10px 28px; font-size: 1rem; } }
.videos-container {
    background: var(--card-bg);
    backdrop-filter: blur(2px);
    border-radius: 40px;
    border: 1px solid var(--border-color);
    padding: 40px 40px 20px 40px;
    margin-top: 20px;
    box-shadow: 0 15px 30px -12px var(--shadow-color);
    transition: box-shadow 0.3s ease;
}
.videos-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 20px;
    color: var(--accent);
    font-weight: normal;
}
.videos-subtitle {
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-soft);
}
.video-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}
.video-card {
    max-width: 600px;
    width: 100%;
    background: var(--bg-primary);
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px -12px var(--shadow-color);
    border-color: var(--accent);
}
.video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
}
video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    background: #000;
}
.video-card h3 {
    font-size: 1.4rem;
    padding: 16px 16px 8px;
    color: var(--accent);
    font-weight: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
.video-card p {
    padding: 0 16px 16px;
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
.protection-badge {
    display: inline-block;
    margin: 0 16px 16px;
    padding: 4px 12px;
    background: var(--accent);
    border-radius: 40px;
    font-size: 0.7rem;
    color: #fff;
    opacity: 0.8;
}
.return-button-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px auto 0;
    max-width: 600px;
    width: 100%;
}
.return-btn {
    background: var(--accent);
    color: white !important;
    padding: 14px 36px;
    border-radius: 60px;
    font-weight: 600;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
    text-decoration: none;
    display: block;
    font-size: 1.2rem;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}
.return-btn:hover {
    background: var(--accent-dark);
    transform: scale(1.05);
    box-shadow: 0 6px 14px var(--shadow-color);
}
.materials-section {
    margin-top: 40px;
}
.materials-container {
    background: var(--card-bg);
    backdrop-filter: blur(2px);
    border-radius: 40px;
    border: 1px solid var(--border-color);
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 15px 30px -12px var(--shadow-color);
}
.materials-title {
    font-size: 2.4rem;
    text-align: center;
    margin-bottom: 20px;
    color: var(--accent);
    font-weight: normal;
}
.materials-subtitle {
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-soft);
}
.materials-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}
.material-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    width: 220px;
    padding: 24px 16px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-dark);
}
.material-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px -12px var(--shadow-color);
    border-color: var(--accent);
}
.material-icon {
    width: 48px;
    height: 48px;
    background-color: var(--accent);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    display: inline-block;
}
.material-icon-pdf {
    mask-image: url('/assets/icon/file-pdf.svg');
    -webkit-mask-image: url('/assets/icon/file-pdf.svg');
}
.material-icon-doc {
    mask-image: url('/assets/icon/file-word.svg');
    -webkit-mask-image: url('/assets/icon/file-word.svg');
}
.material-icon-xls {
    mask-image: url('/assets/icon/file-excel.svg');
    -webkit-mask-image: url('/assets/icon/file-excel.svg');
}
.material-icon-other {
    mask-image: url('/assets/icon/file-doc.svg');
    -webkit-mask-image: url('/assets/icon/file-doc.svg');
}
.material-card h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--accent);
    margin: 0;
    word-break: break-word;
}

/* ===== ТЁМНЫЕ ТЕМЫ для страниц видео и материалов ===== */
body.dark-theme .auth-card h2,
body.amoled-theme .auth-card h2,
body.dark-theme .videos-title,
body.amoled-theme .videos-title,
body.dark-theme .materials-title,
body.amoled-theme .materials-title,
body.dark-theme .video-card h3,
body.amoled-theme .video-card h3,
body.dark-theme .material-card h4,
body.amoled-theme .material-card h4,
body.dark-theme .logout-link a,
body.amoled-theme .logout-link a {
    color: white !important;
}

body.dark-theme .video-card p,
body.amoled-theme .video-card p,
body.dark-theme .materials-subtitle,
body.amoled-theme .materials-subtitle,
body.dark-theme .videos-subtitle,
body.amoled-theme .videos-subtitle,
body.dark-theme .input-group label,
body.amoled-theme .input-group label,
body.dark-theme .input-group input,
body.amoled-theme .input-group input {
    color: white !important;
}

body.dark-theme .input-group input,
body.amoled-theme .input-group input {
    background: rgba(255,255,255,0.05) !important;
    border-color: rgba(255,255,255,0.3) !important;
}

body.dark-theme .input-group input:focus,
body.amoled-theme .input-group input:focus {
    border-color: white !important;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.2) !important;
}

body.dark-theme .btn-login,
body.amoled-theme .btn-login,
body.dark-theme .choice-btn,
body.amoled-theme .choice-btn,
body.dark-theme .return-btn,
body.amoled-theme .return-btn {
    background: transparent !important;
    color: white !important;
    border: 1px solid white !important;
    box-shadow: none !important;
}

body.dark-theme .btn-login:hover,
body.amoled-theme .btn-login:hover,
body.dark-theme .choice-btn:hover,
body.amoled-theme .choice-btn:hover,
body.dark-theme .return-btn:hover,
body.amoled-theme .return-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: white !important;
}

body.dark-theme .video-card,
body.amoled-theme .video-card,
body.dark-theme .material-card,
body.amoled-theme .material-card {
    background: rgba(255,255,255,0.05) !important;
    border-color: rgba(255,255,255,0.2) !important;
}

body.dark-theme .video-card:hover,
body.amoled-theme .video-card:hover,
body.dark-theme .material-card:hover,
body.amoled-theme .material-card:hover {
    border-color: white !important;
}

body.dark-theme .auth-card,
body.amoled-theme .auth-card,
body.dark-theme .videos-container,
body.amoled-theme .videos-container,
body.dark-theme .materials-container,
body.amoled-theme .materials-container {
    background: rgba(255,255,255,0.05) !important;
    border-color: rgba(255,255,255,0.2) !important;
}

body.dark-theme .separator,
body.amoled-theme .separator {
    background: white !important;
    opacity: 0.5 !important;
}

body.dark-theme .error-message,
body.amoled-theme .error-message {
    background: rgba(255,0,0,0.1) !important;
    color: #ff6b6b !important;
}

body.dark-theme .protection-badge,
body.amoled-theme .protection-badge {
    background: white !important;
    color: black !important;
    opacity: 0.9 !important;
}

@media (max-width: 768px) {
    .videos-title { font-size: 2rem; }
    .materials-title { font-size: 1.8rem; }
    .video-card h3 { font-size: 1.2rem; }
    .videos-container, .materials-container {
        padding: 20px;
    }
    .video-card {
        max-width: 100%;
    }
    .return-btn {
        padding: 10px 28px;
        font-size: 1rem;
    }
    .materials-grid {
        gap: 20px;
    }
    .material-card {
        width: 160px;
        padding: 16px 12px;
    }
    .material-icon {
        width: 36px;
        height: 36px;
    }
    .material-card h4 {
        font-size: 0.95rem;
    }
}
