/* Основные сбросы и настройки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

img {
    max-width: 100%;
    height: auto;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
.header {
    background: linear-gradient(90deg, #1a237e, #283593);
    color: white;
    padding: 2.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo {
    width: 130px;
    height: auto;
    margin-bottom: 1.2rem;
    border-radius: 14px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.header h1 {
    font-size: 2.7rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 300;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Основной контент */
.main {
    flex: 1;
    padding: 2.5rem 0;
}

section {
    background: white;
    border-radius: 18px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
}

.intro p {
    font-size: 1.25rem;
    color: #444;
    text-align: center;
    line-height: 1.8;
}

/* Кнопки */
.actions {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary, .btn-tertiary, .btn-captcha, .btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: 60px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    gap: 12px;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(90deg, #00c853, #64dd17);
    color: white;
    box-shadow: 0 6px 16px rgba(0, 200, 83, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(90deg, #00e676, #76ff03);
    box-shadow: 0 10px 24px rgba(0, 200, 83, 0.6);
    transform: scale(1.08);
}

.btn-secondary {
    background: linear-gradient(90deg, #2979ff, #448aff);
    color: white;
    box-shadow: 0 6px 16px rgba(41, 121, 255, 0.4);
}

.btn-secondary:hover {
    background: linear-gradient(90deg, #2962ff, #82b1ff);
    box-shadow: 0 10px 24px rgba(41, 121, 255, 0.6);
    transform: scale(1.08);
}

.btn-tertiary {
    background: linear-gradient(90deg, #00c853, #64dd17);
    color: white;
    box-shadow: 0 6px 16px rgba(0, 200, 83, 0.4);
}

.btn-tertiary:hover {
    background: linear-gradient(90deg, #00e676, #76ff03);
    box-shadow: 0 10px 24px rgba(0, 200, 83, 0.6);
    transform: scale(1.08);
}

.btn-captcha {
    background: linear-gradient(90deg, #ff6f00, #ff9800);
    color: white;
    margin-top: 1.5rem;
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.3);
}

.btn-captcha:hover {
    background: linear-gradient(90deg, #ff8f00, #ffb300);
    box-shadow: 0 8px 20px rgba(255, 111, 0, 0.5);
}

.btn-back {
    background: linear-gradient(90deg, #757575, #9e9e9e);
    color: white;
    margin-top: 2.5rem;
    box-shadow: 0 4px 12px rgba(117, 117, 117, 0.3);
}

.btn-back:hover {
    background: linear-gradient(90deg, #616161, #bdbdbd);
    box-shadow: 0 8px 20px rgba(117, 117, 117, 0.5);
}

/* Секция капчи */
.captcha-section h2, .folders-section h2, .files-section h2, .info h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1a237e;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.captcha-placeholder {
    background: #f9f9f9;
    border: 2px dashed #aaa;
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    transition: border-color 0.3s;
}

.captcha-placeholder:hover {
    border-color: #2979ff;
}

.captcha-box {
    max-width: 420px;
    margin: 0 auto;
}
/* Стили для Яндекс SmartCaptcha */
.smart-captcha {
    margin: 1.5rem auto;
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Fallback сообщение */
.fallback-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 12px;
    padding: 1.5rem;
    color: #856404;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.captcha-hint {
    font-size: 0.95rem;
    color: #666;
    margin-top: 1rem;
    text-align: center;
    font-style: italic;
}

/* Сетка папок и файлов */
.folders-grid, .files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Индикатор загрузки папок */
.loading-spinner {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #1a237e;
    font-size: 1.2rem;
    text-align: center;
}

.loading-spinner i {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: #2979ff;
}

/* Сообщение об ошибке загрузки папок */
.folders-error {
    grid-column: 1 / -1;
    background: #ffebee;
    border: 2px solid #f44336;
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    color: #c62828;
}

.folders-error i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #d32f2f;
}

.folders-error p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.folders-error button {
    margin-top: 1rem;
}

.folder-btn, .file-btn {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: none;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #1565c0;
    font-weight: 700;
    box-shadow: 0 6px 14px rgba(21, 101, 192, 0.15);
}

.folder-btn:hover, .file-btn:hover {
    background: linear-gradient(135deg, #bbdefb, #90caf9);
    transform: translateY(-10px);
    box-shadow: 0 14px 28px rgba(21, 101, 192, 0.25);
}

.folder-btn i, .file-btn i {
    font-size: 3rem;
    margin-bottom: 0.8rem;
}

.file-btn .download-hint {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #0d47a1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.9;
}

/* Информационная секция */
.info {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-left: 8px solid #4caf50;
    padding: 2.5rem;
}

.info p {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.info code {
    background: #333;
    color: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.95rem;
}

/* Подвал */
.footer {
    background: #1a237e;
    color: #e8eaf6;
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

.footer-links a {
    color: #bbdefb;
    text-decoration: none;
    margin: 0 12px;
    transition: color 0.3s;
    font-weight: 500;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Утилиты */
.hidden {
    display: none !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.2rem;
    }
    .subtitle {
        font-size: 1.1rem;
    }
    .logo {
        width: 100px;
    }
    .folders-grid, .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1.5rem;
    }
    .btn-primary, .btn-secondary, .btn-tertiary {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
    section {
        padding: 2rem;
    }
    .folder-btn, .file-btn {
        padding: 1.5rem 1rem;
    }
    .folder-btn i, .file-btn i {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 2rem 0;
    }
    .header h1 {
        font-size: 1.8rem;
    }
    .subtitle {
        font-size: 1rem;
    }
    .actions {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
    .btn-primary, .btn-secondary, .btn-tertiary, .btn-captcha, .btn-back {
        width: 100%;
        max-width: 300px;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    section {
        padding: 1.5rem;
        border-radius: 14px;
    }
    .folders-grid, .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 1rem;
    }
    .folder-btn, .file-btn {
        padding: 1.2rem 0.8rem;
    }
    .folder-btn i, .file-btn i {
        font-size: 2rem;
    }
    .footer-links a {
        display: block;
        margin: 8px 0;
    }
}
