/* ==========================================
   PG PANEL - ELITE UI DESIGN SYSTEM
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;900&display=swap');

:root {
    --primary: #c471ed;
    --secondary: #f64f59;
    --accent: #12c2e9;
    --bg-dark: #020408;
    --sidebar-bg: rgba(5, 7, 12, 0.9);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-heavy: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.1);
    --text-main: #e0e6ed;
    --text-dim: rgba(224, 230, 237, 0.5);
    --transition: 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

body.light-theme {
    --bg-dark: #f0f4f8;
    --sidebar-bg: rgba(255, 255, 255, 0.9);
    --text-main: #1a1c22;
    --text-dim: #5c6370;
    --border: rgba(0, 0, 0, 0.08);
    --glass: rgba(0, 0, 0, 0.03);
    --glass-heavy: rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Effects */
.background-effects {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 10% 10%, #0d1117 0%, transparent 40%), #020408;
}

.orb {
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.1;
    animation: floating 25s infinite alternate;
}

.orb-1 {
    background: var(--primary);
    top: -20%;
    left: -20%;
}

.orb-2 {
    background: var(--accent);
    bottom: -20%;
    right: -20%;
    animation-delay: -7s;
}

@keyframes floating {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(150px, 150px);
    }
}

/* Layout & Stage */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar-v {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(30px);
    padding: 35px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1000;
}

.stage {
    padding: 40px;
}

/* Navigation */
.side-nav ul {
    list-style: none;
    margin-top: 55px;
}

.side-nav li {
    padding: 18px 22px;
    margin-bottom: 10px;
    border-radius: 15px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--text-dim);
    font-weight: 600;
}

.side-nav li.active {
    background: rgba(18, 194, 233, 0.12);
    color: var(--accent);
    border: 1px solid rgba(18, 194, 233, 0.25);
}

/* Glass UI Elements */
.glass {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    border-radius: 25px;
}

.glass-heavy {
    background: var(--glass-heavy);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 25px;
}

.p-20 {
    padding: 20px;
}

.margin-top {
    margin-top: 20px;
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.stat-card {
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.stat-card i {
    font-size: 2.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 900;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Chat Refined */
.chat-container {
    height: 75vh;
    display: flex;
    flex-direction: column;
    border-radius: 40px;
}

.message-list {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 75%;
    padding: 14px 20px;
    border-radius: 22px;
    position: relative;
    animation: popIn 0.3s ease;
    font-size: 0.95rem;
}

.msg-in {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border-bottom-left-radius: 4px;
}

.msg-out {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 5px 15px rgba(18, 194, 233, 0.2);
}

.msg-meta {
    font-size: 0.7rem;
    font-weight: 900;
    opacity: 0.6;
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-msg {
    border: 1px solid var(--accent);
}

/* Buttons & Inputs */
.btn-prime-glow {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    border: none;
    color: #fff;
    font-weight: 900;
    padding: 15px 30px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(18, 194, 233, 0.2);
    transition: 0.3s;
}

.btn-prime-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(18, 194, 233, 0.3);
}

.glass-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 15px;
    color: #fff;
    font-size: 0.95rem;
    transition: 0.3s;
}

.glass-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(18, 194, 233, 0.05);
}

/* Lucky Wheel Overlay */
#wheel-overlay {
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(25px);
}

.wheel-container {
    max-width: 500px;
    width: 90%;
    padding: 40px;
    background: rgba(15, 20, 30, 0.8);
    backdrop-filter: blur(50px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 50px 150px rgba(0, 0, 0, 0.9);
    animation: zoomIn 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

#wheel-canvas {
    transition: transform 5s cubic-bezier(0.15, 0, 0.15, 1);
    filter: drop-shadow(0 0 20px rgba(18, 194, 233, 0.4));
}

/* Common Specs */
.brand-prime {
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(to right, var(--accent), var(--primary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pulsate {
    animation: pulsate 2s infinite alternate;
}

@keyframes pulsate {
    from {
        transform: scale(1);
        filter: drop-shadow(0 0 10px var(--accent));
    }

    to {
        transform: scale(1.05);
        filter: drop-shadow(0 0 30px var(--accent));
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5) translateY(100px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.hidden {
    display: none !important;
}

/* Mobile Utilities */
.mobile-top-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    z-index: 2000;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    border-bottom: 1px solid var(--border);
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
}

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 85px;
    z-index: 2000;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--border);
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    border-radius: 30px 30px 0 0;
}

@media (max-width: 1080px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-v {
        display: none;
    }

    .mobile-top-bar,
    .mobile-bottom-nav {
        display: flex;
    }

    .stage {
        padding: 100px 20px 110px;
    }
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.admin-table th {
    text-align: left;
    padding: 15px;
    color: var(--accent);
    font-size: 0.8rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.9rem;
}

.admin-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Ludo Game Responsive */
.ludo-board-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 40px;
    padding: 20px;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

#ludo-canvas {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}