
* {
    box-sizing: border-box;
}

:root {
    --bg: #09050f;
    --panel: rgba(15, 7, 24, .84);
    --line: rgba(207, 115, 255, .35);
    --pink: #ed8cff;
    --violet: #a95bdf;
    --muted: #b8a6c6;
    --white: #f8edff;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--white);
    font-family: Manrope, system-ui, sans-serif;
    background:
        radial-gradient(ellipse at 75% 20%, #31123e 0, transparent 36%),
        radial-gradient(ellipse at 10% 80%, #1e102d 0, transparent 38%),
        #09050f;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* HEADER */

.site-header {
    height: 82px;
    padding: 0 clamp(20px, 5vw, 76px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(222, 151, 255, .15);
    position: relative;
    z-index: 3;
    background: rgba(7, 4, 12, .55);
    backdrop-filter: blur(14px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--pink);
    font-size: 25px;
    box-shadow: 0 0 24px #a94caa44;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font: 500 17px Cinzel, serif;
    letter-spacing: .04em;
}

.brand small {
    font-size: 10px;
    letter-spacing: .22em;
    color: #c69ad7;
    margin-top: 3px;
}

.site-header nav {
    display: flex;
    gap: clamp(16px, 3vw, 38px);
}

.nav-link {
    font-size: 12px;
    color: #d8c8e2;
    letter-spacing: .08em;
    padding: 12px 0;
}

.nav-link.active,
.nav-link:hover {
    color: var(--pink);
}

/* HERO */

.hero {
    position: relative;
    min-height: calc(100vh - 132px);
    display: grid;
    place-items: center;
    isolation: isolate;
    overflow: hidden;
    padding: 90px 20px;
}

.hero-art {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(
            90deg,
            rgba(8, 4, 13, .35),
            rgba(8, 4, 13, .68) 54%,
            rgba(8, 4, 13, .88)
        ),
        linear-gradient(
            0deg,
            #09050f 0,
            transparent 30%,
            rgba(9, 5, 15, .12)
        ),
        url('/assets/kitsune-hero.jpg') center 38% / cover no-repeat;
    opacity: .82;
}

/* ОСНОВНОЕ ИСПРАВЛЕНИЕ: ЦЕНТРИРОВАНИЕ */

.hero-content {
    text-align: center;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    justify-self: center;
    align-self: center;
    text-shadow: 0 3px 25px #08020c;
}

.eyebrow {
    font-size: 10px;
    letter-spacing: .28em;
    color: #e4b0f2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
}

.eyebrow span {
    height: 1px;
    width: 34px;
    background: #a95bdf;
}

.hero h1,
.files-heading h1 {
    font: 500 clamp(43px, 8vw, 88px) Cinzel, serif;
    line-height: 1.08;
    margin: 24px 0 0;
    letter-spacing: -.04em;
}

.hero h1 em,
.files-heading h1 em {
    font-style: normal;
    color: #e99bff;
    text-shadow: 0 0 30px #d05bff66;
}

.hero-subtitle {
    font: 500 clamp(17px, 2.5vw, 26px) Cinzel, serif;
    letter-spacing: .38em;
    color: #d58be8;
    margin: 10px 0 25px;
}

.hero-copy {
    color: #d6c5df;
    font-size: 14px;
    line-height: 1.9;
    font-weight: 300;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin: 30px 0;
}

.social-button,
.enter-files,
.upload-button {
    border: 1px solid rgba(223, 142, 255, .55);
    border-radius: 999px;
    padding: 13px 21px;
    color: #f2d7ff;
    background: rgba(35, 12, 48, .55);
    transition: .2s;
    backdrop-filter: blur(8px);
    font-size: 12px;
    letter-spacing: .06em;
}

.social-button:hover,
.enter-files:hover,
.upload-button:hover {
    background: #6f2c8e;
    box-shadow: 0 0 25px #b85de866;
    transform: translateY(-2px);
}

.social-icon {
    color: #e5a0ff;
    margin-right: 8px;
}

.enter-files {
    display: inline-flex;
    gap: 18px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(100deg, #55216d, #321442);
    border-radius: 6px;
}

.hero-caption {
    position: absolute;
    bottom: 28px;
    left: clamp(20px, 5vw, 76px);
    font: italic 12px Cinzel, serif;
    color: #c69acb;
    letter-spacing: .1em;
}

/* FOOTER */

.site-footer {
    text-align: center;
    padding: 24px 12px;
    color: #8e779d;
    font-size: 9px;
    letter-spacing: .2em;
    border-top: 1px solid rgba(222, 151, 255, .12);
}

.site-footer span {
    color: #d78cf2;
    margin: 0 8px;
}

/* BACKGROUND EFFECTS */

.ambient {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: -1;
}

.ambient-one {
    width: 260px;
    height: 260px;
    background: #6b1d83;
    opacity: .15;
    top: 20%;
    right: -100px;
}

.ambient-two {
    width: 220px;
    height: 220px;
    background: #3e2b8a;
    opacity: .12;
    bottom: 0;
    left: -90px;
}

/* FILES PAGE */

.files-main {
    min-height: calc(100vh - 132px);
    padding: 64px 20px 80px;
    max-width: 1000px;
    margin: 0 auto;
}

.files-heading {
    text-align: center;
    margin-bottom: 36px;
}

.files-heading h1 {
    font-size: clamp(42px, 7vw, 68px);
    margin: 14px 0;
}

.files-heading > p:last-child {
    color: var(--muted);
    font: italic 14px Cinzel, serif;
}

/* PANELS */

.glass-panel {
    max-width: 540px;
    margin: 0 auto;
    padding: 34px;
    border: 1px solid var(--line);
    background: linear-gradient(
        145deg,
        rgba(32, 13, 45, .88),
        rgba(11, 6, 18, .92)
    );
    box-shadow: 0 20px 80px #0008, 0 0 35px #9d3bb522;
    border-radius: 12px;
    backdrop-filter: blur(18px);
}

.login-panel {
    text-align: center;
}

.panel-symbol {
    font-size: 34px;
    color: var(--pink);
    text-shadow: 0 0 24px #d75cff;
    margin-bottom: 10px;
}

.glass-panel h2 {
    font: 500 23px Cinzel, serif;
    margin: 8px 0 9px;
}

.muted {
    color: #a994b6;
    font-size: 12px;
}

/* LOGIN */

.login-panel form {
    text-align: left;
    margin-top: 27px;
}

.login-panel label {
    display: block;
    color: #d8bce5;
    font-size: 11px;
    letter-spacing: .1em;
    margin: 17px 0 8px;
}

.login-panel input {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid #70408b;
    border-radius: 6px;
    background: #100819;
    color: white;
    outline: none;
    font: 13px Manrope;
}

.login-panel input:focus {
    border-color: #e29aff;
    box-shadow: 0 0 0 3px #c15bff22;
}

.primary-button {
    width: 100%;
    border: 0;
    border-radius: 6px;
    margin-top: 24px;
    padding: 14px;
    background: linear-gradient(100deg, #8b39b1, #4e1c75);
    color: white;
    font: 600 12px Manrope;
    letter-spacing: .08em;
    cursor: pointer;
    box-shadow: 0 7px 24px #792c9b55;
}

.primary-button:hover {
    filter: brightness(1.2);
}

.primary-button span {
    margin-left: 12px;
}

.form-message {
    min-height: 18px;
    color: #ff9fae;
    font-size: 12px;
    margin: 12px 0 0;
}

/* MANAGER */

.manager-panel {
    max-width: 900px;
}

.manager-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ffffff17;
    padding-bottom: 20px;
}

.manager-top .eyebrow {
    justify-content: flex-start;
}

.manager-top h2 {
    font-size: 27px;
}

.quiet-button {
    background: transparent;
    border: 1px solid #70408b;
    color: #e4c7ef;
    border-radius: 5px;
    padding: 10px 14px;
    cursor: pointer;
}

.upload-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 22px 0;
}

.upload-row p {
    margin: 5px 0;
}

.upload-button {
    cursor: pointer;
    white-space: nowrap;
}

.file-table-wrap {
    overflow-x: auto;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.file-table th {
    text-align: left;
    color: #b995c9;
    font-weight: 500;
    padding: 13px 10px;
    border-bottom: 1px solid #ffffff20;
}

.file-table td {
    padding: 14px 10px;
    border-bottom: 1px solid #ffffff12;
    color: #eadcf0;
}

.file-table td:first-child {
    overflow-wrap: anywhere;
}

.file-action {
    border: 1px solid #69407b;
    background: #1b0d26;
    color: #e9c6fa;
    border-radius: 4px;
    padding: 6px 9px;
    cursor: pointer;
    margin-left: 5px;
}

.file-action.delete {
    color: #ff9da9;
}

.empty-state {
    text-align: center;
    padding: 28px;
}

[hidden] {
    display: none !important;
}

/* MOBILE */

@media (max-width: 700px) {

    .site-header {
        height: 72px;
        padding: 0 17px;
    }

    .brand strong {
        font-size: 13px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
    }

    .site-header nav {
        gap: 13px;
    }

    .nav-link {
        font-size: 10px;
    }

    .hero {
        min-height: calc(100svh - 120px);
        padding: 80px 18px;
    }

    .hero-art {
        background-position: 37% center;
        background-image:
            linear-gradient(
                90deg,
                rgba(8, 4, 13, .58),
                rgba(8, 4, 13, .74)
            ),
            linear-gradient(
                0deg,
                #09050f 0,
                transparent 35%
            ),
            url('/assets/kitsune-hero.png');
        opacity: .9;
    }

    .hero-content {
        margin: 0 auto;
        max-width: 100%;
        text-align: center;
    }

    .hero h1 {
        font-size: clamp(38px, 11vw, 58px);
    }

    .hero-subtitle {
        letter-spacing: .25em;
    }

    .hero-copy {
        font-size: 13px;
        text-align: center;
    }

    .hero-caption {
        font-size: 9px;
        bottom: 18px;
    }

    .files-main {
        padding: 45px 15px 60px;
    }

    .glass-panel {
        padding: 25px 19px;
    }

    .upload-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .manager-top h2 {
        font-size: 22px;
    }

    .file-table {
        min-width: 500px;
    }

    .site-footer {
        font-size: 8px;
        line-height: 2;
    }
}

html,
body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
    overflow-y: hidden;
}

/* Главная страница */

.hero {
    height: calc(100vh - 132px);
    min-height: 0;
    overflow: hidden;
}

/* Учитываем высоту шапки и подвала */

.site-header {
    height: 82px;
    flex-shrink: 0;
}

.site-footer {
    height: 50px;
    flex-shrink: 0;
}

/* Мобильные устройства */

@media (max-width: 700px) {
    .hero {
        height: calc(100svh - 120px);
        min-height: 0;
    }

    .site-header {
        height: 72px;
    }

    .site-footer {
        height: 48px;
    }
}
/* FILE PREVIEW MODAL */

.preview-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(4, 2, 9, .92);
    backdrop-filter: blur(12px);
}

.preview-modal[hidden] {
    display: none !important;
}

.preview-window {
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #100819;
    border: 1px solid rgba(207, 115, 255, .45);
    border-radius: 12px;
    box-shadow: 0 0 60px #a95bdf33;
}

.preview-header {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 18px;
    border-bottom: 1px solid rgba(207, 115, 255, .2);
}

.preview-title {
    color: #f8edff;
    font: 500 14px Cinzel, serif;
    overflow-wrap: anywhere;
}

.preview-close {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 1px solid #70408b;
    border-radius: 50%;
    background: #241333;
    color: #ed8cff;
    font-size: 25px;
    cursor: pointer;
}

.preview-close:hover {
    background: #6f2c8e;
}

.preview-content {
    min-height: 200px;
    max-height: calc(90vh - 58px);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    padding: 20px;
}

.preview-image {
    display: block;
    max-width: 100%;
    max-height: calc(90vh - 120px);
    object-fit: contain;
    border-radius: 6px;
}

.preview-video {
    display: block;
    width: 100%;
    max-height: calc(90vh - 120px);
    background: #000;
    border-radius: 6px;
}

.preview-audio {
    width: 100%;
    max-width: 600px;
}

.preview-pdf {
    width: 100%;
    height: 75vh;
    border: 0;
    background: white;
    border-radius: 5px;
}

.preview-text {
    width: 100%;
    max-height: 70vh;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: #eadcf0;
    font: 13px/1.7 monospace;
}

.file-action.preview-action {
    color: #ed8cff;
    border-color: #a95bdf;
}

@media (max-width: 700px) {
    .preview-modal {
        padding: 8px;
    }

    .preview-window {
        max-height: 95vh;
    }

    .preview-content {
        padding: 10px;
        max-height: calc(95vh - 58px);
    }

    .preview-pdf {
        height: 75vh;
    }
}