:root {
    --bg-main: #030306;
    --bg-card: rgba(5, 5, 14, 0.92);

    --accent: rgb(118, 118, 255);
    --accent-soft: rgba(118, 118, 255, 0.12);
    --accent-border: rgba(118, 118, 255, 0.32);
    --accent-glow: rgba(118, 118, 255, 0.24);

    --text-main: #ffffff;
    --text-muted: #b8b8d6;
    --danger: #ff7777;
    --success: #77ff99;
}

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

body {
    min-height: 100vh;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top, rgba(118, 118, 255, 0.18), transparent 35%),
        radial-gradient(circle at bottom right, rgba(118, 118, 255, 0.10), transparent 30%),
        linear-gradient(135deg, #020204 0%, #050510 45%, #080816 100%);
}

/* Homepage */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    z-index: 2;
}

.card {
    width: 100%;
    max-width: 720px;
    padding: 56px 42px;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--accent-border);
    border-radius: 28px;
    box-shadow: 0 0 100px var(--accent-glow);
    backdrop-filter: blur(16px);
    animation: cardIn 1s ease forwards, floatCard 5s ease-in-out infinite;
}

.badge {
    display: inline-block;
    margin-bottom: 22px;
    padding: 8px 16px;
    border: 1px solid var(--accent-border);
    border-radius: 999px;
    color: var(--accent);
    background: var(--accent-soft);
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: none;
}

h1 {
    font-size: clamp(48px, 9vw, 92px);
    line-height: 1;
    margin-bottom: 18px;
    background: linear-gradient(90deg, #ffffff, var(--accent), #ffffff);
    background-size: 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientMove 4s linear infinite;
}

.subtitle {
    font-size: 24px;
    color: var(--text-main);
    margin-bottom: 12px;
}

.message {
    font-size: 18px;
    color: var(--text-muted);
}

.glow-line {
    width: 160px;
    height: 3px;
    margin: 32px auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    box-shadow: 0 0 18px rgba(118, 118, 255, 0.65);
    animation: pulseLine 2s ease-in-out infinite;
}

/* Snowflakes - homepage only if HTML includes them */

.snowflakes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.snowflake {
    position: absolute;
    top: -10vh;
    color: rgba(255, 255, 255, 0.38);
    font-size: 18px;
    animation-name: snowfall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.snowflake:nth-child(1) { left: 2%; animation-duration: 11s; animation-delay: 0s; font-size: 13px; }
.snowflake:nth-child(2) { left: 6%; animation-duration: 14s; animation-delay: 2s; font-size: 19px; }
.snowflake:nth-child(3) { left: 10%; animation-duration: 9s; animation-delay: 1s; font-size: 15px; }
.snowflake:nth-child(4) { left: 14%; animation-duration: 13s; animation-delay: 4s; font-size: 22px; }
.snowflake:nth-child(5) { left: 18%; animation-duration: 10s; animation-delay: 0s; font-size: 17px; }
.snowflake:nth-child(6) { left: 22%; animation-duration: 16s; animation-delay: 3s; font-size: 12px; }
.snowflake:nth-child(7) { left: 26%; animation-duration: 12s; animation-delay: 5s; font-size: 20px; }
.snowflake:nth-child(8) { left: 30%; animation-duration: 15s; animation-delay: 2s; font-size: 14px; }
.snowflake:nth-child(9) { left: 34%; animation-duration: 11s; animation-delay: 1s; font-size: 18px; }
.snowflake:nth-child(10) { left: 38%; animation-duration: 17s; animation-delay: 6s; font-size: 21px; }
.snowflake:nth-child(11) { left: 42%; animation-duration: 10s; animation-delay: 0s; font-size: 13px; }
.snowflake:nth-child(12) { left: 46%; animation-duration: 13s; animation-delay: 3s; font-size: 19px; }
.snowflake:nth-child(13) { left: 50%; animation-duration: 9s; animation-delay: 2s; font-size: 15px; }
.snowflake:nth-child(14) { left: 54%; animation-duration: 14s; animation-delay: 4s; font-size: 23px; }
.snowflake:nth-child(15) { left: 58%; animation-duration: 12s; animation-delay: 1s; font-size: 16px; }
.snowflake:nth-child(16) { left: 62%; animation-duration: 15s; animation-delay: 5s; font-size: 20px; }
.snowflake:nth-child(17) { left: 66%; animation-duration: 11s; animation-delay: 0s; font-size: 14px; }
.snowflake:nth-child(18) { left: 70%; animation-duration: 16s; animation-delay: 3s; font-size: 22px; }
.snowflake:nth-child(19) { left: 74%; animation-duration: 10s; animation-delay: 2s; font-size: 17px; }
.snowflake:nth-child(20) { left: 78%; animation-duration: 13s; animation-delay: 6s; font-size: 12px; }
.snowflake:nth-child(21) { left: 82%; animation-duration: 14s; animation-delay: 1s; font-size: 19px; }
.snowflake:nth-child(22) { left: 86%; animation-duration: 9s; animation-delay: 4s; font-size: 15px; }
.snowflake:nth-child(23) { left: 90%; animation-duration: 12s; animation-delay: 0s; font-size: 21px; }
.snowflake:nth-child(24) { left: 94%; animation-duration: 15s; animation-delay: 3s; font-size: 13px; }
.snowflake:nth-child(25) { left: 98%; animation-duration: 11s; animation-delay: 5s; font-size: 18px; }

.snowflake:nth-child(n+26) {
    opacity: 0.45;
    transform: scale(0.75);
}

/* Register page */

.register-page {
    min-height: 100vh;
    overflow: hidden;
}

.register-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.register-card {
    width: 100%;
    max-width: 440px;
    padding: 34px 32px;
    text-align: center;
    background: rgba(5, 5, 14, 0.94);
    border: 1px solid rgba(118, 118, 255, 0.30);
    border-radius: 22px;
    box-shadow: 0 0 70px rgba(118, 118, 255, 0.18);
    backdrop-filter: blur(16px);
    animation: cardIn 0.8s ease forwards;
}

.register-card .badge {
    margin-bottom: 18px;
}

.register-card h1 {
    font-size: 52px;
    margin-bottom: 24px;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.register-form input {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid rgba(118, 118, 255, 0.32);
    border-radius: 12px;
    background: rgba(3, 3, 10, 0.92);
    color: #ffffff;
    outline: none;
    font-size: 15px;
}

.register-form input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.register-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 18px rgba(118, 118, 255, 0.24);
}

.register-form button {
    margin-top: 4px;
    padding: 13px 15px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    transition: 0.2s ease;
}

.register-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(118, 118, 255, 0.45);
}

.form-error {
    color: var(--danger);
    margin-bottom: 16px;
    font-size: 14px;
}

.form-success {
    color: var(--success);
    margin-bottom: 16px;
    font-size: 14px;
}

/* Animations */

@keyframes snowfall {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        transform: translateY(115vh) translateX(80px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes gradientMove {
    0% {
        background-position: 0%;
    }

    100% {
        background-position: 200%;
    }
}

@keyframes pulseLine {
    0%, 100% {
        opacity: 0.45;
        width: 120px;
    }

    50% {
        opacity: 1;
        width: 220px;
    }
}

/* Mobile */

@media (max-width: 600px) {
    .card {
        padding: 42px 24px;
    }

    .subtitle {
        font-size: 20px;
    }

    .message {
        font-size: 16px;
    }

    .register-card {
        max-width: 100%;
        padding: 32px 24px;
    }

    .register-card h1 {
        font-size: 44px;
    }
}

/* Forum landing page */

.forum-home-page {
    min-height: 100vh;
    overflow: hidden;
}

.forum-home-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.forum-home-card {
    width: 100%;
    max-width: 560px;
    padding: 44px 38px;
    text-align: center;
    background: rgba(5, 5, 14, 0.94);
    border: 1px solid rgba(118, 118, 255, 0.30);
    border-radius: 24px;
    box-shadow: 0 0 80px rgba(118, 118, 255, 0.20);
    backdrop-filter: blur(16px);
    animation: cardIn 0.8s ease forwards;
}

.forum-home-card h1 {
    font-size: clamp(52px, 8vw, 82px);
    margin-bottom: 16px;
}

.forum-home-subtitle {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
}

.forum-home-message {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.forum-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
}

.forum-btn {
    min-width: 140px;
    padding: 13px 18px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: 0.2s ease;
}

.forum-btn-primary {
    background: var(--accent);
    color: #ffffff;
}

.forum-btn-secondary {
    color: var(--accent);
    border: 1px solid rgba(118, 118, 255, 0.36);
    background: rgba(118, 118, 255, 0.08);
}

.forum-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(118, 118, 255, 0.35);
}

.auth-link {
    margin-top: 18px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.auth-link a:hover {
    text-decoration: underline;
}

.forum-panel {
    margin: 24px 0;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.forum-panel-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    color: #aaa;
}

.forum-panel-row + .forum-panel-row {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.forum-panel-row strong {
    color: #fff;
}

.auth-key-box {
    margin: 18px 0;
    padding: 14px;
    border-radius: 12px;
    background: #080812;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #dadaff;
    font-family: Consolas, monospace;
    font-size: 13px;
    word-break: break-all;
}

@media (max-width: 600px) {
    .forum-home-card {
        padding: 36px 24px;
    }

    .forum-actions {
        flex-direction: column;
    }

    .forum-btn {
        width: 100%;
    }
}