/* ================================================
   KeyPanel Pro — Custom Styles
   Dark Gaming Theme: Deep Navy + Electric Violet + Neon Cyan
   ================================================ */

/* ── Sidebar ───────────────────────────────────── */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #94A3B8;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}
.sidebar-link:hover {
    background: rgba(255,255,255,0.05);
    color: #F1F5F9;
}
.sidebar-link.active {
    background: rgba(124,58,237,0.15);
    color: #fff;
    border-left: 3px solid #7C3AED;
    padding-left: 9px;
    box-shadow: 0 0 16px rgba(124,58,237,0.15);
}
.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: #1E2340; border-radius: 4px; }

/* ── Alert Banner ──────────────────────────────── */
.alert-banner {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 4px;
    animation: slideDown 0.3s ease;
}
.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #6EE7B7; }
.alert-danger  { background: rgba(239,68,68,0.12);  border: 1px solid rgba(239,68,68,0.3);  color: #FCA5A5; }
.alert-warning { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); color: #FDE68A; }
.alert-info    { background: rgba(6,182,212,0.12);   border: 1px solid rgba(6,182,212,0.3);  color: #67E8F9; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Card ──────────────────────────────────────── */
.kp-card {
    background: #111422;
    border: 1px solid #1E2340;
    border-radius: 12px;
    padding: 24px;
    transition: border-color 0.2s ease;
}
.kp-card-glow:hover {
    border-color: rgba(124,58,237,0.3);
    box-shadow: 0 0 24px rgba(124,58,237,0.08);
}

/* ── Glass Card ────────────────────────────────── */
.glass-card {
    background: rgba(17, 20, 34, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 24px;
}

/* ── Badge VIP ─────────────────────────────────── */
.badge-vip {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.3px;
}
.badge-simple { background: rgba(148,163,184,0.12); color: #94A3B8; }
.badge-room   { background: rgba(6,182,212,0.12);   color: #06B6D4; }
.badge-full   { background: rgba(245,158,11,0.12);  color: #F59E0B; }

/* ── Badge Status ──────────────────────────────── */
.badge-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}
.badge-green  { background: rgba(16,185,129,0.12); color: #10B981; }
.badge-yellow { background: rgba(245,158,11,0.12); color: #F59E0B; }
.badge-red    { background: rgba(239,68,68,0.12);  color: #EF4444; }
.badge-gray   { background: rgba(100,116,139,0.12);color: #94A3B8; }
.badge-cyan   { background: rgba(6,182,212,0.12);  color: #06B6D4; }

/* ── Token Box ─────────────────────────────────── */
.token-box {
    background: #0A0D1A;
    border: 1px solid #7C3AED;
    border-radius: 8px;
    padding: 14px 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    color: #9F67FF;
    letter-spacing: 1.5px;
    word-break: break-all;
    box-shadow: 0 0 20px rgba(124,58,237,0.1);
    user-select: all;
}

/* ── Table ─────────────────────────────────────── */
.kp-table { width: 100%; border-collapse: collapse; }
.kp-table thead th {
    background: #161A2E;
    padding: 12px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94A3B8;
    text-align: left;
    border-bottom: 1px solid #1E2340;
    white-space: nowrap;
}
.kp-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(30,35,64,0.6);
    font-size: 13.5px;
    color: #CBD5E1;
    transition: all 0.15s ease;
}
.kp-table tbody tr {
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}
.kp-table tbody tr:hover {
    background: rgba(124,58,237,0.06);
    border-left: 3px solid #7C3AED;
}
.kp-table tbody tr:last-child td {
    border-bottom: none;
}

/* ── Buttons ───────────────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, #7C3AED, #9F67FF);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 0 24px rgba(124,58,237,0.4);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-danger {
    background: linear-gradient(135deg, #EF4444, #F87171);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-danger:hover {
    opacity: 0.9;
    box-shadow: 0 0 20px rgba(239,68,68,0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10B981, #34D399);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-success:hover {
    opacity: 0.9;
    box-shadow: 0 0 20px rgba(16,185,129,0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid #1E2340;
    color: #94A3B8;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-outline:hover {
    border-color: #7C3AED;
    color: #9F67FF;
    background: rgba(124,58,237,0.05);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-cyan {
    background: linear-gradient(135deg, #06B6D4, #22D3EE);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-cyan:hover {
    opacity: 0.9;
    box-shadow: 0 0 20px rgba(6,182,212,0.3);
}

/* ── Form Controls ─────────────────────────────── */
.kp-input, .kp-select, .kp-textarea {
    width: 100%;
    background: #161A2E;
    border: 1px solid #1E2340;
    border-radius: 8px;
    color: #F1F5F9;
    padding: 10px 14px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.kp-input:focus, .kp-select:focus, .kp-textarea:focus {
    border-color: #7C3AED;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
.kp-input::placeholder { color: #475569; }
.kp-textarea { resize: vertical; min-height: 80px; }
.kp-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #94A3B8;
    margin-bottom: 6px;
}
.kp-select option { background: #161A2E; color: #F1F5F9; }

/* ── Stat Card ─────────────────────────────────── */
.stat-card {
    background: #111422;
    border: 1px solid #1E2340;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent, #7C3AED), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.stat-card:hover {
    border-color: rgba(124,58,237,0.3);
    box-shadow: 0 0 24px rgba(124,58,237,0.08);
    transform: translateY(-2px);
}
.stat-card:hover::before { opacity: 1; }

/* ── Leaderboard ───────────────────────────────── */
.rank-gold   { color: #F59E0B; text-shadow: 0 0 8px rgba(245,158,11,0.4); }
.rank-silver { color: #94A3B8; text-shadow: 0 0 8px rgba(148,163,184,0.3); }
.rank-bronze { color: #CD7F32; text-shadow: 0 0 8px rgba(205,127,50,0.3); }

/* ── Glow Effects ──────────────────────────────── */
.glow-violet { box-shadow: 0 0 24px rgba(124,58,237,0.35); }
.glow-cyan   { box-shadow: 0 0 24px rgba(6,182,212,0.35); }
.glow-green  { box-shadow: 0 0 24px rgba(16,185,129,0.35); }

/* ── Animations ────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 12px rgba(124,58,237,0.2); }
    50%      { box-shadow: 0 0 24px rgba(124,58,237,0.4); }
}
.animate-fade-in-up { animation: fadeInUp 0.4s ease forwards; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }

/* Stagger animation */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }

/* ── Upload Zone ───────────────────────────────── */
.upload-zone {
    border: 2px dashed #1E2340;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: #7C3AED;
    background: rgba(124,58,237,0.05);
}

/* ── API Docs ──────────────────────────────────── */
.code-block {
    background: #0A0D1A;
    border: 1px solid #1E2340;
    border-radius: 8px;
    padding: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #CBD5E1;
    overflow-x: auto;
    line-height: 1.6;
}
.code-block .keyword { color: #7C3AED; }
.code-block .string  { color: #10B981; }
.code-block .comment { color: #475569; }
.code-block .url     { color: #06B6D4; }

/* ── Tooltip ───────────────────────────────────── */
[data-tooltip] {
    position: relative;
}
[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    background: #1E2340;
    color: #F1F5F9;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 50;
    margin-bottom: 4px;
}

/* ── Misc ──────────────────────────────────────── */
.text-gradient-violet {
    background: linear-gradient(135deg, #7C3AED, #9F67FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom scrollbar for main content */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0A0D1A; }
::-webkit-scrollbar-thumb { background: #1E2340; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #2D3458; }

/* Selection color */
::selection { background: rgba(124,58,237,0.3); color: #F1F5F9; }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 1024px) {
    .kp-table { font-size: 12px; }
    .kp-table thead th, .kp-table tbody td { padding: 8px 10px; }
}
