:root {
    --accent: #bf2450;
    --accent-hover: #9c1d1d;
    --bg-dark: #0a0914;
    --sidebar-bg: #131128;
    --card-bg: #1f1d36;
    --card-border: rgba(255, 255, 255, 0.05);
}

body {
    background-color: var(--bg-dark);
    
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 40%),
        
        linear-gradient(var(--card-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--card-border) 1px, transparent 1px);
    
    background-size: 100% 100%, 100% 100%, 50px 50px, 50px 50px;
    background-position: 0 0, 0 0, center top, center top;
    background-attachment: fixed;
    
    color: #f3f4f6;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><line x1='10' y1='0' x2='10' y2='20' stroke='white' stroke-width='3'/><line x1='0' y1='10' x2='20' y2='10' stroke='white' stroke-width='3'/></svg>") 10 10, crosshair;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    z-index: -1;
}

a, button, input[type="button"], input[type="submit"], [onclick] {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><line x1='10' y1='0' x2='10' y2='20' stroke='red' stroke-width='3'/><line x1='0' y1='10' x2='20' y2='10' stroke='red' stroke-width='3'/></svg>") 10 10, crosshair;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.text-accent { color: var(--accent); }
.bg-accent { background-color: var(--accent); }
.bg-accent:hover { background-color: var(--accent-hover); }
.border-accent { border-color: var(--accent); }

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-input {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: white;
    transition: all 0.3s ease;
    border-radius: 0.75rem;
}
.dashboard-input:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(191, 36, 80, 0.25);
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 0.5rem;
    margin-left: 0.25rem;
}

.dashboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.dashboard-table th {
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--accent);
    padding: 1rem;
    border-bottom: 1px solid var(--card-border);
    text-align: left;
}
.dashboard-table th:first-child { border-top-left-radius: 1rem; }
.dashboard-table th:last-child { border-top-right-radius: 1rem; }
.dashboard-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}
.dashboard-table tr:last-child td { border-bottom: none; }
.dashboard-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.badge {
    background: rgba(191, 36, 80, 0.15);
    color: var(--accent);
    border: 1px solid rgba(191, 36, 80, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}
.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}
.menu-item.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px rgba(191, 36, 80, 0.3);
}

.sidebar {
    width: 280px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--card-border);
    z-index: 40;
    overflow-y: auto;
}
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    padding: 2rem;
}

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 1rem; }
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 0.75rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}
.custom-select-trigger:hover { background: rgba(0, 0, 0, 0.4); }
.custom-select-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    padding: 0.5rem;
    z-index: 100;
    display: none;
    flex-direction: column;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.custom-select-options.open { 
    display: flex; 
}
.custom-select-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.custom-select-option:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.custom-select-option.selected {
    background: rgba(191, 36, 80, 0.2);
    color: var(--accent);
    font-weight: bold;
}

.pagination { display: flex; gap: 0.25rem; justify-content: center; margin-top: 1.5rem; }
.page-link {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    color: white;
    transition: all 0.2s;
}
.page-link:hover { background: rgba(255, 255, 255, 0.1); }
.page-link.active { background: var(--accent); border-color: var(--accent); font-weight: bold; }

.half-circle-container { 
    position: relative; 
    width: 140px; 
    height: 90px; 
    overflow: visible; 
    margin: 0 auto; 
}
.half-circle-svg { 
    width: 100%; 
    height: 100%; 
    overflow: visible; 
}

@layer base {
  input[type="number"]::-webkit-inner-spin-button,
  input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
}

/* Wheel Styles */
.wheel-container {
    position: relative;
    width: 500px;
    height: 500px;
    margin: 0 auto;
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(191, 36, 80, 0.4), inset 0 0 20px rgba(0,0,0,0.8);
    border: 5px solid var(--accent);
    overflow: hidden;
    transition: transform 5s cubic-bezier(0.2, 0.8, 0.1, 1);
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; 
    height: 0; 
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid white;
    z-index: 50;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.8));
}

.canvas-wheel {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg); 
}

.mystic-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(191,36,80,0.2) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
    0% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
}

.winner-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 100;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.winner-content {
    background: var(--card-bg);
    border: 2px solid var(--accent);
    padding: 3rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 0 50px rgba(191,36,80,0.6);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}