/* css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
html, body {
    height: 100%;
    /* НЕ ставим min-height: 100vh, чтобы не было проблем с мобильной высотой */
}

/* body {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #e0e0e0;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
} */
 body {
    /* background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); */
    background: #0f2027;
    color: #e0e0e0;
    /* Убрали overflow: hidden */
    position: relative;
    margin: 0;
    padding: 0;
    /* Разрешаем скролл, если контент не влезает */
    overflow-x: hidden;
    /* overflow-y: auto; — будет по умолчанию */
}
.container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 10;
    /* Добавим минимальную высоту, но разрешим скролл */
    min-height: calc(100vh - 4rem);
}
header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
    /* opacity: 0; */
    transform: translateY(20px);
    transition: all 0.5s ease;
}
h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0, 242, 254, 0.2);
}
.subtitle {
    font-size: 1.2rem;
    color: #a0d2ff;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0.9;
}
 .nav-container {
    position: relative;
    margin-bottom: 2rem;
    padding: 0.5rem 0;
    text-align: center;
}

.nav {
    display: inline-flex;
    gap: 2rem;
    font-size: 1.1rem;
    list-style: none;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 0.5rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    justify-content: center;
}
/* ********* */

.nav a {
    color: #a0d2ff;
    text-decoration: none;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.nav a:hover {
    color: #00f2fe;
    transform: translateY(-2px);
    background: rgba(79, 172, 254, 0.15);
}

.nav a:hover::before {
    opacity: 1;
    right: -5px;
}

/* Активная ссылка — текущая страница */
.nav a.active {
    color: #00f2fe;
    font-weight: 600;
}

/* Градиентная полоса под активной ссылкой */
.nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    border-radius: 2px;
    animation: pulse 2s infinite;
}

/* Анимация подсветки */
@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* Плавное появление пунктов */
.nav a {
    opacity: 0;
    transform: translateY(10px);
}

.nav a:nth-child(1) { animation: fadeIn 0.6s ease forwards 0.2s; }
.nav a:nth-child(2) { animation: fadeIn 0.6s ease forwards 0.4s; }

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Фиксированная навигация (опционально) */
/* .nav-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 32, 39, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.5rem 0;
} */

/* --- Иконки в навигации --- */
 /* --- Общие стили для иконок --- */
.icon {
    width: 20px;
    height: 20px;
    margin-right: 0.7rem;
    stroke: #a0d2ff;
    transition: all 0.3s ease;
    vertical-align: middle;
}

.nav a:hover .icon,
.nav a.active .icon {
    stroke: #00f2fe;
    transform: scale(1.1) translateY(-1px);
}

.nav a.active .icon {
    animation: pulse 2s infinite;
}
/* --- Иконка загрузки --- */
.upload-icon {
    width: 24px;
    height: 24px;
    stroke: #00f2fe;
    margin-right: 0.8rem;
    animation: float 3s ease-in-out infinite;
}

.file-label:hover .upload-icon {
    stroke: #4facfe;
    transform: scale(1.1) translateY(-2px);
}


/* Tooltip для навигации (опционально) */
/* .nav a::before {
    content: attr(data-page);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #00f2fe;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 10;
} */

.nav a:hover::before {
    opacity: 1;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 242, 254, 0.2);
}
.card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #4facfe;
    display: flex;
    align-items: center;
}
.card h2 i {
    margin-right: 0.8rem;
    color: #00f2fe;
}
.card p {
    color: #d0f0ff;
    line-height: 1.7;
    font-size: 0.95rem;
}

.card-icon {
    width: 24px;
    height: 24px;
    stroke: #00f2fe;
    margin-right: 0.8rem;
    transition: all 0.3s ease;
}

.card:hover .card-icon {
    stroke: #4facfe;
    transform: scale(1.1);
}

/* Подсказки при наведении */
.card {
    /* cursor: pointer; */
    cursor: default;
    position: relative;
}

.card::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 0, 0, 0.9);
    color: #00f2fe;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.stat {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin: 0.5rem;
    min-width: 120px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #00f2fe;
    margin-bottom: 0.5rem;
}
.stat-label {
    font-size: 0.9rem;
    color: #a0d2ff;
}
.upload-title {
    font-size: 1.6rem;
    color: #4facfe;
    margin-bottom: 1.2rem;
    text-align: center;
}
.file-input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}
.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.file-label {
    display: block;
    padding: 1rem;
    background: rgba(79, 172, 254, 0.15);
    border: 2px dashed #4facfe;
    border-radius: 12px;
    text-align: center;
    color: #a0d2ff;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}
.file-label:hover {
    background: rgba(79, 172, 254, 0.25);
    border-color: #00f2fe;
}
.file-info {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #d0f0ff;
    text-align: center;
}
.progress-container {
    margin-top: 1.5rem;
    display: none;
}
.progress-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    border-radius: 6px;
    transition: width 0.3s ease;
}
.progress-text {
    font-size: 0.9rem;
    color: #00f2fe;
    text-align: center;
}
.result {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
    color: #a0d2ff;
    display: none;
}
.result.success {
    color: #4fffaa;
}
.result.error {
    color: #ff6b6b;
}

.result-container {
    text-align: center;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.result-icon {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.result-text {
    font-size: 0.95rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.result-text.success {
    color: #4fffaa;
    opacity: 1;
}

.result-text.error {
    color: #ff6b6b;
    opacity: 1;
}

.upload-section {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    transition: transform 0.3s ease;
}

.upload-section:hover {
    transform: translateY(-5px);
}

.success-svg {
    stroke: #4fffaa;
    animation: pulse 2s infinite;
}

.error-svg {
    stroke: #ff6b6b;
    animation: shake 0.5s ease-in-out;
}

/* --- Объединённый блок выбора файла --- */
.file-input-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 2px dashed rgba(79, 172, 254, 0.3);
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    max-width: 400px;
    margin: 0 auto;
    overflow: hidden;
}

.file-input-wrapper:hover {
    border-color: #00f2fe;
    background: rgba(0, 242, 254, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 242, 254, 0.1);
}

.file-input-wrapper.drag-over {
    background: rgba(0, 242, 254, 0.1);
    border-color: #00f2fe;
    transform: translateY(-4px);
    animation: pulse-border 1s infinite alternate;
}

@keyframes pulse-border {
    to {
        box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
    }
}

/* --- Статистика загрузки --- */
.upload-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    color: #a0d2ff;
    width: 100%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #80c0ff;
    opacity: 0.9;
}

.stat-value {
    font-weight: 600;
    color: #00f2fe;
    font-size: 1rem;
}

/* Адаптив */
@media (max-width: 768px) {
    .upload-stats {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.9rem;
    }
}

/* --- Иконка загрузки --- */
.upload-icon-container {
    margin-bottom: 1rem;
}

.upload-svg {
    width: 60px;
    height: 60px;
    stroke: #00f2fe;
    margin: 0 auto;
    filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.3));
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

@keyframes pulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
/* --- Текст под иконкой --- */
.file-label {
    display: block;
    color: #a0d2ff;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.file-input-wrapper:hover .file-label {
    color: #00f2fe;
}

/* --- Прозрачный input --- */
.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}


.wave-container {
    /* position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    overflow: hidden;
    z-index: 1; */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}
.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        rgba(0, 242, 254, 0.05),
        rgba(0, 242, 254, 0.05) 10px,
        rgba(79, 172, 254, 0.05) 10px,
        rgba(79, 172, 254, 0.05) 20px
    );
}
.particles {
    /* position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0; */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(79, 172, 254, 0.6);
    border-radius: 50%;
    pointer-events: none;
}
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }
    .subtitle {
        font-size: 1rem;
    }
    .container {
        padding: 1rem;
    }
    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .nav {
        flex-direction: column;
        align-items: center;
    }
}

/* Адаптив для мобильных - навигация */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .nav a {
        width: 80%;
        text-align: center;
    }

    .nav a.active::after {
        width: 60%;
    }

    .container {
        padding-top: 2rem;
    }
}