/* Dashboard Specific Styles */
:root {
    --primary-color: #32CD32;
    /* Gigs Pesa Cash Green */
    --secondary-color: #00f2ff;
    --dark-bg: #0a0a0a;
    --card-bg: #ffffff;
    --text-color: #333333;
    --menu-bg: #32CD32;
    --bg-color: #f4f6f9;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0a0a0a;
        --card-bg: #1a1a1a;
        --text-color: #eeeeee;
        --dark-bg: #000000;
    }
}

body.dark-mode {
    --bg-color: #0a0a0a;
    --card-bg: #1a1a1a;
    --text-color: #eeeeee;
    --dark-bg: #000000;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Skeleton Loading Animation */
@keyframes skeleton-pulse {
    0% {
        background-color: rgba(0, 0, 0, 0.05);
    }

    50% {
        background-color: rgba(0, 0, 0, 0.1);
    }

    100% {
        background-color: rgba(0, 0, 0, 0.05);
    }
}

body.dark-mode .skeleton {
    animation: skeleton-pulse-dark 1.5s infinite linear;
}

@keyframes skeleton-pulse-dark {
    0% {
        background-color: rgba(255, 255, 255, 0.05);
    }

    50% {
        background-color: rgba(255, 255, 255, 0.1);
    }

    100% {
        background-color: rgba(255, 255, 255, 0.05);
    }
}

.skeleton {
    animation: skeleton-loading 1.5s infinite linear;
    border-radius: 4px;
    display: inline-block;
    min-height: 1em;
}

.skeleton-text {
    width: 100%;
    height: 0.8rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    width: 60%;
    height: 1.2rem;
    margin-bottom: 1rem;
}

.skeleton-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.skeleton-card {
    height: 120px;
    width: 100%;
    border-radius: 15px;
}

/* Profile Section */
.profile-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.05));
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: #e0e0e0;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: #444;
    margin-right: 20px;
}

.profile-info h2 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.profile-details p {
    margin: 5px 0;
    color: #666;
    font-size: 0.9rem;
}

.wallet-badge {
    color: var(--primary-color);
    font-weight: bold;
}

.status-badge {
    background-color: #ff4d4d;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.status-badge.active {
    background-color: #28a745;
}

.ref-link-box {
    margin-top: 10px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    word-break: break-all;
    font-size: 0.85rem;
}

.btn-copy {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Menu Grid */
.menu-grid {
    background: var(--menu-bg);
    border-radius: 0;
    /* Screenshot shows it full width sometimes */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    /* border effect */
    margin-bottom: 30px;
}

.menu-item {
    background: var(--menu-bg);
    /* transparent to grid bg if defined */
    padding: 20px;
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-item i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card {
    border-radius: 10px;
    padding: 20px;
    color: white;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card.green {
    background-color: var(--card-green);
}

.stat-card.orange {
    background-color: var(--card-orange);
}

.stat-card.red {
    background-color: var(--card-red);
}

.stat-card.blue {
    background-color: var(--card-blue);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 5px 0;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Earnings & Summary */
.white-card {
    background: white;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.summary-list p {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    padding: 10px 0;
    margin: 0;
}

.summary-list p:last-child {
    border-bottom: none;
}

/* Subscription Management */
.sub-management {
    margin-bottom: 30px;
}

.sub-card {
    border: 1px solid red;
    /* As per screenshot */
    border-radius: 5px;
    padding: 20px;
    background: #f9f9f9;
    margin-bottom: 15px;
}

.btn-renew-sub {
    background: #008CBA;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    margin-top: 10px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-action {
    display: block;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    text-transform: uppercase;
}

.btn-purple {
    background: linear-gradient(to right, #6a11cb 0%, #2575fc 100%);
}

.btn-orange {
    background: linear-gradient(to right, #ff9966 0%, #ff5e62 100%);
}

.btn-red {
    background: linear-gradient(to right, #cb2d3e 0%, #ef473a 100%);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
}

@media (max-width: 768px) {
    .menu-grid {
        grid-template-columns: 1fr 1fr;
        /* Keep 2 cols on mobile for compact view */
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-title {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* SPIN WHEEL PROFESSIONAL STYLE */
.wheel-box {
    background: #000;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.2);
    /* Subtle Gold Glow */
}

#spinWheel {
    background: conic-gradient(#111 0deg 25.71deg,
            /* 10 - Black */
            #d00 25.71deg 51.42deg,
            /* 20 - Red */
            #111 51.42deg 77.13deg,
            /* 50 - Black */
            #d00 77.13deg 102.84deg,
            /* 70 - Red */
            #0055ff 102.84deg 128.55deg,
            /* 100 - Blue (Refund) */
            #d00 128.55deg 154.26deg,
            /* 150 - Red */
            #111 154.26deg 179.97deg,
            /* 200 - Black */
            #d00 179.97deg 205.68deg,
            /* 300 - Red */
            #111 205.68deg 231.39deg,
            /* 500 - Black */
            #d00 231.39deg 257.1deg,
            /* 1k - Red */
            #111 257.1deg 282.81deg,
            /* 1.5k - Black */
            #d00 282.81deg 308.52deg,
            /* 2k - Red */
            #111 308.52deg 334.23deg,
            /* 3.5k - Black */
            #ffd700 334.23deg 360deg
            /* JACKPOT - Gold */
        );
    border-radius: 50%;
}

/* Center Cap */
#spinWheel::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #444, #000);
    border-radius: 50%;
    border: 3px solid #ffd700;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    z-index: 5;
}

.wheel-label {
    position: absolute;
    top: 0;
    left: 50%;
    width: 40px;
    /* Wider for clear text */
    height: 50%;
    /* Radius length */
    margin-left: -20px;
    /* Center horizontally */
    transform-origin: bottom center;

    /* Text Styling */
    color: white;
    font-weight: 800;
    font-size: 14px;
    font-family: 'Verdana', sans-serif;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 1);

    /* Alignment */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15px;
    /* Distance from rim */
    z-index: 2;
}

/* --- MOBILE BOTTOM NAVIGATION --- */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 10000;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.08);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #888;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
}

.nav-item i {
    font-size: 1.5rem;
    margin-bottom: 3px;
}

.nav-item.active {
    color: #28a745;
    /* Gigs Pesa Cash Green */
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 20px !important;
    }
}

/* --- SIDEBAR DRAWER STYLES --- */
.sidebar-drawer {
    position: fixed;
    top: 0;
    left: -280px;
    /* Hidden by default */
    width: 280px;
    height: 100%;
    background: #1a1a1a;
    color: white;
    z-index: 2050;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.sidebar-drawer.open {
    left: 0;
}

.drawer-header {
    padding: 20px;
    background: #121212;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-body {
    padding: 10px 0;
    overflow-y: auto;
    flex: 1;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: #ccc;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 1rem;
}

.drawer-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.drawer-link:hover,
.drawer-link.active {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.drawer-link.active {
    border-left: 4px solid var(--primary-color);
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2049;
    display: none;
    backdrop-filter: blur(2px);
}

.drawer-overlay.visible {
    display: block;
}

/* Profile mini in header */
.profile-avatar-mini i {
    font-size: 1.2rem;
    color: #666;
}

body.dark-mode .sidebar-drawer {
    background: #000;
}

body.dark-mode .drawer-header {
    background: #0a0a0a;
}
