*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --gold: #FFB800;
    --gold-dim: rgba(255, 184, 0, 0.18);
    --bg: #000000;
    --surface: #0d0d0d;
    --surface2: #141414;
    --border: rgba(255, 184, 0, 0.15);
    --text: #ffffff;
    --text-muted: rgba(255,255,255,0.45);
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    font-family: 'Arial', sans-serif;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.container {
    text-align: center;
    padding: 24px 20px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 2.4rem;
}

.logo {
    font-size: 7rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    opacity: 0;
    transition: letter-spacing 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.logo.expanded {
    letter-spacing: 0.2em;
}

.logo-white { color: #ffffff; }

.logo-gold {
    color: var(--gold);
}

.message {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
    letter-spacing: 0.14em;
    font-family: 'Courier New', monospace;
    opacity: 0;
    text-transform: uppercase;
    min-height: 2rem;
}

.submessage {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--gold);
    margin-bottom: 3.2rem;
    letter-spacing: 0.18em;
    font-family: 'Courier New', monospace;
    opacity: 0;
    text-transform: uppercase;
    min-height: 1.4rem;
}

.btn-row {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    flex-wrap: wrap;
}

.btn-row.visible {
    opacity: 1;
    transform: translateY(0);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 28px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.04);
    opacity: 0;
    transition: opacity 0.2s;
}

.btn:hover::after { opacity: 1; }

.btn-discord {
    background: transparent;
    color: var(--text);
    border-color: rgba(255,255,255,0.18);
}

.btn-discord:hover {
    border-color: rgba(255,255,255,0.45);
    transform: translateY(-1px);
}

.btn-discord:active { transform: scale(0.97); }

.btn-download {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

.btn-download:hover {
    background: transparent;
    color: var(--gold);
    transform: translateY(-1px);
}

.btn-download:active { transform: scale(0.97); }

.btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: filter 0.22s;
}

.btn-discord .btn-icon {
    filter: brightness(0) invert(1);
}

.btn-download .btn-icon {
    stroke: #000;
    transition: stroke 0.22s;
}

.btn-download:hover .btn-icon {
    stroke: var(--gold);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.82);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 44px 40px 36px;
    max-width: 420px;
    width: 100%;
    position: relative;
    transform: translateY(16px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,184,0,0.06);
}

.modal-overlay.open .modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
    color: var(--text);
    background: rgba(255,255,255,0.07);
}

.modal-close svg { width: 18px; height: 18px; }

.modal-icon {
    width: 52px;
    height: 52px;
    background: var(--gold-dim);
    border: 1px solid rgba(255,184,0,0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.modal-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--gold);
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-align: center;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

.modal-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 28px;
    letter-spacing: 0.03em;
    line-height: 1.5;
}

.input-wrap {
    position: relative;
    margin-bottom: 6px;
}

.key-input {
    width: 100%;
    background: var(--surface2);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 13px 16px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.08em;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-user-select: text;
    user-select: text;
}

.key-input::placeholder {
    color: rgba(255,255,255,0.2);
    letter-spacing: 0.06em;
}

.key-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(255,184,0,0.1);
}

.key-input.error {
    border-color: #ff4545;
    box-shadow: 0 0 0 3px rgba(255,69,69,0.12);
}

.key-input.success {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}

.modal-error {
    font-size: 0.78rem;
    color: #ff4545;
    min-height: 1.2rem;
    margin-bottom: 18px;
    letter-spacing: 0.04em;
    padding-left: 2px;
    transition: opacity 0.2s;
}

.btn-verify {
    width: 100%;
    background: var(--gold);
    color: #000;
    border: 2px solid var(--gold);
    border-radius: 8px;
    padding: 14px;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: all 0.22s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
    font-family: 'Arial', sans-serif;
    text-transform: uppercase;
}

.btn-verify:hover:not(:disabled) {
    background: transparent;
    color: var(--gold);
}

.btn-verify:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,0.3);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
    flex-shrink: 0;
}

.btn-verify:hover:not(:disabled) .spinner {
    border-color: rgba(255,184,0,0.3);
    border-top-color: var(--gold);
}

.spinner.active { display: block; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

.modal-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 0.03em;
}

.modal-link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.modal-link:hover { opacity: 0.75; }

@media (max-width: 600px) {
    .logo { font-size: 4rem; }
    .message { font-size: 1.15rem; }
    .submessage { font-size: 0.82rem; }
    .btn-row { flex-direction: column; gap: 10px; width: 100%; }
    .btn { width: 100%; max-width: 320px; }
    .modal { padding: 36px 24px 28px; }
}

@media (max-width: 360px) {
    .logo { font-size: 3.2rem; }
}