* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 40%, #16213e 70%, #0a0a0a 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    color: #e2e8f0;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.brand-header {
    text-align: center;
    padding: 24px;
}

.brand-logo {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 100px);
    padding: 20px;
}

.landing-box, .key-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.landing-icon-wrapper, .key-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 24px;
}

.landing-icon, .key-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    position: relative;
    z-index: 1;
}

.landing-glow, .key-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.4), transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.landing-title, .key-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-desc, .key-hint {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 28px;
}

.landing-desc strong { color: #a5b4fc; }

.landing-buttons { margin-bottom: 32px; }

.btn-get-key {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.btn-get-key:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.5);
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.step span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.2);
    color: #a5b4fc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.key-display-box {
    margin: 20px 0;
}

.key-display-inner input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 12px;
    color: #e2e8f0;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    text-align: center;
    letter-spacing: 1px;
}

.cred-field {
    margin-bottom: 16px;
    text-align: left;
}

.cred-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #a5b4fc;
    margin-bottom: 8px;
}

.btn-copy-small {
    margin-top: 8px;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.25);
    border: 1px solid rgba(102, 126, 234, 0.4);
    border-radius: 8px;
    color: #c7d2fe;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-copy-small:hover {
    background: rgba(102, 126, 234, 0.4);
}

.ip-info {
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: #64748b;
}

.ip-value {
    color: #a5b4fc;
    font-family: monospace;
}

.expiry-info {
    margin-bottom: 24px;
}

.expiry-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 4px;
}

.expiry-time {
    font-size: 1.2rem;
    font-weight: 600;
    color: #10b981;
}

.expiry-time.warning { color: #f59e0b; }
.expiry-time.expired { color: #ef4444; }

.button-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-copy:hover { transform: translateY(-1px); }

.btn-back, .btn-retry {
    display: inline-flex;
    align-items: center;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 0.95rem;
    cursor: pointer;
}

.btn-back:hover, .btn-retry:hover { color: #e2e8f0; }

.loading-box, .error-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 48px;
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-icon { font-size: 3rem; }
.error-box h2 { color: #f87171; }
.error-box p { color: #94a3b8; }

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 28px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Discord wait page */
.discord-page .container { min-height: calc(100vh - 80px); }

.discord-box {
    background: rgba(30, 31, 34, 0.95);
    border: 1px solid rgba(88, 101, 242, 0.4);
    border-radius: 24px;
    padding: 40px 36px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.discord-badge {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: #5865F2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.discord-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.discord-desc {
    color: #b5bac1;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.discord-server-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
    text-align: left;
}

.server-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.server-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.server-name {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.server-members {
    color: #3ba55d;
    font-size: 0.8rem;
}

.btn-discord-join {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: #5865F2;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 28px;
    transition: background 0.2s, transform 0.2s;
}

.btn-discord-join:hover {
    background: #4752c4;
    transform: translateY(-1px);
}

.countdown-section {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
}

.countdown-label {
    color: #b5bac1;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.countdown-number {
    font-size: 4rem;
    font-weight: 700;
    color: #5865F2;
    line-height: 1;
    margin-bottom: 4px;
}

.countdown-hint {
    color: #72767d;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.countdown-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.countdown-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #5865F2, #764ba2);
    border-radius: 3px;
}

@media (max-width: 480px) {
    .landing-box, .key-box { padding: 32px 24px; }
    .button-group { flex-direction: column; }
    .btn-copy, .btn-back { width: 100%; justify-content: center; }
}
