@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Modern Color Palette */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --secondary-dark: #db2777;
    --accent: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-gold: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    --gradient-dark: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);

    /* Dark Theme Colors */
    --bg-primary: #0f0f1e;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #252541;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-glass: rgba(255, 255, 255, 0.08);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b8a;

    /* Border & Shadow */
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundPulse 15s ease-in-out infinite;
}

@keyframes backgroundPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

/* RTL Support */
body.rtl {
    direction: rtl;
}

body.rtl .sidebar {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid var(--border-color);
}

body.rtl .main-content {
    margin-left: 0;
    margin-right: 280px;
}

body.rtl .sidebar-nav a {
    flex-direction: row-reverse;
}

body.rtl .sidebar-nav a i {
    order: 2;
    margin-right: 0;
    margin-left: 0.75rem;
}

body.rtl .sidebar-logo {
    flex-direction: row-reverse;
}

body.rtl .header {
    flex-direction: row-reverse;
}

body.rtl .header-title {
    text-align: right;
}

body.rtl .header-actions {
    flex-direction: row-reverse;
}

body.rtl .stats-grid {
    direction: rtl;
}

body.rtl .stat-card {
    text-align: right;
}

body.rtl .stat-icon {
    margin-left: 0;
    margin-right: 0;
}

body.rtl .raffle-grid {
    direction: rtl;
}

body.rtl .raffle-card {
    text-align: right;
}

body.rtl .raffle-badge {
    right: auto;
    left: 1rem;
}

body.rtl .raffle-content {
    text-align: right;
    direction: rtl;
}

body.rtl .raffle-progress {
    text-align: right;
}

body.rtl .progress-text {
    flex-direction: row-reverse;
}

body.rtl table {
    text-align: right;
}

body.rtl th {
    text-align: right;
}

body.rtl td {
    text-align: right;
}

body.rtl .glass-card h2 {
    justify-content: flex-end;
}

body.rtl .glass-card {
    text-align: right;
}

body.rtl .modal-header {
    flex-direction: row-reverse;
}

body.rtl select.form-control {
    background-position: left 1rem center;
    padding-left: 2.5rem;
    padding-right: 1rem;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Glass Card Effect */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
}

.btn-gold {
    background: var(--gradient-gold);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Input Fields */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition-base);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Select Dropdown */
select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    overflow-y: auto;
    z-index: 1000;
    transition: transform var(--transition-base);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
}

.sidebar-logo h2 {
    font-size: 1.5rem;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: var(--spacing-xs);
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    font-weight: 500;
}

.sidebar-nav a:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
    transform: translateX(4px);
}

.sidebar-nav a.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.sidebar-nav i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    padding: var(--spacing-lg);
}

/* Header */
.header {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.header-title p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.user-balance {
    background: var(--gradient-gold);
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.lang-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.lang-btn:hover,
.lang-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stat-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.stat-card:nth-child(2)::before {
    background: var(--gradient-secondary);
}

.stat-card:nth-child(3)::before {
    background: var(--gradient-gold);
}

.stat-card:nth-child(4)::before {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    background: var(--gradient-primary);
    color: white;
}

.stat-card:nth-child(2) .stat-icon {
    background: var(--gradient-secondary);
}

.stat-card:nth-child(3) .stat-icon {
    background: var(--gradient-gold);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Raffle Card */
.raffle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.raffle-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
    position: relative;
}

.raffle-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.raffle-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    position: relative;
}

.raffle-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: var(--gradient-gold);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    color: #1a1a2e;
    box-shadow: var(--shadow-md);
}

.raffle-content {
    padding: var(--spacing-lg);
}

.raffle-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.raffle-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.raffle-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.raffle-info-item {
    text-align: center;
}

.raffle-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.raffle-info-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.raffle-progress {
    margin-bottom: var(--spacing-md);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    transition: width var(--transition-slow);
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.raffle-countdown {
    background: var(--bg-tertiary);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.countdown-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.countdown-time {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Table */
.table-container {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-tertiary);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-primary);
}

tr:hover {
    background: var(--bg-glass);
}

body.rtl .table-container {
    direction: rtl;
    overflow-x: auto;
}

body.rtl table {
    direction: rtl;
    text-align: right;
}

body.rtl th {
    text-align: right;
}

body.rtl td {
    text-align: right;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
}

/* Alert */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--info);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .raffle-grid {
        grid-template-columns: 1fr;
    }

    .header {
        flex-direction: column;
        gap: var(--spacing-md);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

/* ========================================
   LIGHT MODE THEME
   ======================================== */

body.light-mode {
    /* Light Theme Colors */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f5;
    --bg-card: rgba(0, 0, 0, 0.02);
    --bg-glass: rgba(255, 255, 255, 0.9);

    /* Light Text Colors */
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #718096;

    /* Light Border & Shadow */
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);
}

/* Light Mode Background Animation */
body.light-mode::before {
    background:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(245, 158, 11, 0.03) 0%, transparent 50%);
}

/* Light Mode Scrollbar */
body.light-mode ::-webkit-scrollbar-track {
    background: #f1f3f5;
}

body.light-mode ::-webkit-scrollbar-thumb {
    background: #cbd5e0;
}

body.light-mode ::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Light Mode Form Controls */
body.light-mode .form-control {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #1a1a2e;
}

body.light-mode .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

body.light-mode .form-control::placeholder {
    color: #a0aec0;
}

/* Light Mode Select */
body.light-mode select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-color: #ffffff;
}

/* Light Mode Buttons */
body.light-mode .btn-outline {
    border-color: var(--primary);
    color: var(--primary);
}

body.light-mode .btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Light Mode Sidebar */
body.light-mode .sidebar {
    background: #ffffff;
    border-right-color: #e2e8f0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

body.light-mode .sidebar-nav a {
    color: #4a5568;
}

body.light-mode .sidebar-nav a:hover {
    background: #f7fafc;
    color: #1a1a2e;
}

body.light-mode .sidebar-nav a.active {
    background: var(--gradient-primary);
    color: white;
}

/* Light Mode Cards */
body.light-mode .glass-card,
body.light-mode .stat-card,
body.light-mode .raffle-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.light-mode .glass-card:hover,
body.light-mode .stat-card:hover,
body.light-mode .raffle-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

/* Light Mode Header */
body.light-mode .header {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Light Mode Table */
body.light-mode .table-container {
    background: #ffffff;
    border-color: #e2e8f0;
}

body.light-mode thead {
    background: #f7fafc;
}

body.light-mode th {
    color: #4a5568;
}

body.light-mode td {
    border-top-color: #e2e8f0;
    color: #1a1a2e;
}

body.light-mode tr:hover {
    background: #f7fafc;
}

/* Light Mode Modal */
body.light-mode .modal {
    background: rgba(0, 0, 0, 0.5);
}

body.light-mode .modal-content {
    background: #ffffff;
    border-color: #e2e8f0;
}

body.light-mode .modal-close {
    color: #718096;
}

body.light-mode .modal-close:hover {
    color: #1a1a2e;
}

/* Light Mode Lang Switcher */
body.light-mode .lang-btn {
    background: #f7fafc;
    border-color: #e2e8f0;
    color: #4a5568;
}

body.light-mode .lang-btn:hover,
body.light-mode .lang-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Light Mode Raffle Info */
body.light-mode .raffle-info,
body.light-mode .raffle-countdown {
    background: #f7fafc;
}

body.light-mode .progress-bar {
    background: #e2e8f0;
}

/* Light Mode Spinner */

.lang-dropdown.show .lang-dropdown-btn i,
.lang-dropdown-menu.show~.lang-dropdown-btn i {
    transform: rotate(180deg);
}

.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 1000;
    overflow: hidden;
}

.lang-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
}

.lang-dropdown-item:last-child {
    border-bottom: none;
}

.lang-dropdown-item:hover {
    background: var(--bg-glass);
    color: var(--primary);
}

.lang-dropdown-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.lang-dropdown-item .flag {
    font-size: 1.3em;
}

/* RTL Support for Dropdown */
body.rtl .lang-dropdown-menu {
    right: auto;
    left: 0;
}

/* Light Mode Dropdown */
body.light-mode .lang-dropdown-btn {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #1a1a2e;
}

body.light-mode .lang-dropdown-btn:hover {
    border-color: var(--primary);
}

body.light-mode .lang-dropdown-menu {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

body.light-mode .lang-dropdown-item {
    color: #1a1a2e;
    border-bottom-color: #e2e8f0;
}

body.light-mode .lang-dropdown-item:hover {
    background: #f7fafc;
}

body.light-mode .lang-dropdown-item.active {
    background: rgba(99, 102, 241, 0.1);
}

/* Additional RTL Mobile Fixes */
body.rtl .page-content {
    direction: rtl;
    text-align: right;
}

body.rtl .btn {
    flex-direction: row-reverse;
}

body.rtl .btn i {
    margin-right: 0;
    margin-left: 0.5rem;
}

body.rtl .alert {
    flex-direction: row-reverse;
}

body.rtl .modal-content {
    text-align: right;
    direction: rtl;
}

body.rtl .form-label {
    text-align: right;
}

body.rtl .form-group {
    text-align: right;
}

/* Admin Menu Toggle Button */
.menu-toggle-admin {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    transition: transform 0.3s ease;
}

.menu-toggle-admin:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .menu-toggle-admin {
        display: block;
    }
}