:root {
    --bg-dark: #0a0a0a;
    --bg-panel: #111111;
    --text-main: #ffffff;
    --text-muted: #888888;
    --accent: #bdf45b; /* Зеленый акцент из видео */
    --intro-bg: #f7f7f3;
    --intro-text: #050505;
    --intro-muted: #6e6e68;
    --letter-size: 5.35rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden; /* Блокируем скролл во время анимации */
}

/* Preloader */
#preloader {
    position: fixed;
    inset: 0;
    background-color: var(--intro-bg);
    color: var(--intro-text);
    overflow: hidden;
    z-index: 9999;
}

.preloader-frame {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.preloader-frame::before {
    content: none;
}

.preloader-brand {
    position: absolute;
    top: 26px;
    left: 28px;
    z-index: 4;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.preloader-stack {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.preloader-stack,
.preloader-page {
    height: 100%;
}

.preloader-page {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: var(--page-width);
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: var(--intro-bg);
    overflow: hidden;
    border: none;
    box-shadow: none;
    transform-origin: left center;
    will-change: transform, opacity;
}

.preloader-page::before {
    content: none;
}

.preloader-page::after {
    content: none;
}

.preloader-letter {
    display: block;
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
    color: var(--intro-text);
    font-size: var(--letter-size);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    text-shadow: none;
}

.preloader-caption {
    display: none;
}

.preloader-caption strong {
    display: block;
    margin-bottom: 8px;
    color: var(--intro-text);
    font-size: 1.45rem;
    font-weight: 600;
}

.preloader-progress {
    display: none;
}

.preloader-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background-color: var(--intro-text);
    transform: scaleX(0);
    transform-origin: left center;
}

/* Main Layout */
#main-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
    opacity: 0; /* Скрыто по умолчанию для GSAP */
    visibility: hidden;
}

.panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
}

.left-panel {
    background-color: var(--bg-dark);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.right-panel {
    background-color: var(--bg-panel);
}

/* Typography & Elements */
.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: block;
}

.main-title {
    font-size: 4rem;
    line-height: 1.1;
    letter-spacing: -1px;
}

.main-title .highlight {
    border-bottom: 4px solid var(--accent);
    padding-bottom: 5px;
}

.explore-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 4px;
    transition: border-color 0.3s;
}

.explore-link:hover {
    border-color: var(--text-main);
}

/* Right Panel Elements */
.right-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

.btn-register {
    background-color: var(--accent);
    color: var(--bg-dark);
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-register:hover {
    transform: translateY(-2px);
}

.qr-section {
    text-align: center;
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    background-color: #fff;
    margin: 0 auto;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qr-placeholder:hover {
    transform: translateY(-3px);
    box-shadow: 0 30px 86px rgba(0, 0, 0, 0.55);
}

.qr-placeholder:active {
    transform: scale(0.98);
}

.qr-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    border-radius: 8px;
}

.desc-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.5;
}

.content-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Адаптив под мобильные устройства */
@media (max-width: 900px) {
    :root {
        --letter-size: 3.4rem;
    }

    .preloader-progress {
        left: 28px;
        right: auto;
        top: 54px;
        width: 180px;
    }

    #main-layout {
        flex-direction: column;
        height: auto;
        overflow-y: auto;
    }
    .panel {
        min-height: 100vh;
    }
    body {
        overflow: auto;
    }
}

@media (max-width: 600px) {
    :root {
        --letter-size: 1.72rem;
    }

    .preloader-page {
        padding-top: 98px;
    }

    html,
    body,
    #main-layout {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .panel {
        width: 100%;
        padding: 28px 20px;
    }

    .main-title {
        font-size: 3rem;
    }

    .right-top {
        flex-direction: column;
        flex-wrap: wrap;
        gap: 20px;
        align-items: center;
        justify-content: flex-start;
    }

    .nav-links {
        order: 2;
        flex: 1 1 100%;
        flex-wrap: wrap;
        justify-content: center;
        column-gap: 18px;
        row-gap: 10px;
        text-align: center;
    }

    .btn-register {
        order: 1;
        margin-left: 0;
        flex: 0 0 auto;
    }

    .qr-placeholder {
        width: min(200px, 100%);
        height: auto;
        aspect-ratio: 1;
    }
}

@media (max-width: 380px) {
    :root {
        --letter-size: 1.5rem;
    }

    .main-title {
        font-size: 2.55rem;
    }
}
