:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --primary-glow: #eab308;
    --primary-color: #fbbf24;
    --primary-hover: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html, body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    position: relative;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    text-align: center;
    z-index: 1;
}

.header {
    margin-bottom: 2rem;
}

.logo {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-main);
    text-transform: uppercase;
}

.logo span {
    color: var(--primary-color);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.5);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2);
}

.btn-primary, .btn-spin {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #451a03;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:active, .btn-spin:active {
    transform: scale(0.98);
}

.btn-primary:hover, .btn-spin:hover {
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.4);
}

.error-msg {
    color: var(--error);
    font-size: 0.85rem;
    text-align: left;
    height: 20px;
}

/* Utilities */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

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

/* Wheel Display */
.wheel-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 2rem auto;
    aspect-ratio: 1/1;
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(234, 179, 8, 0.2);
    background: #000;
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: #EF4444;
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: transform 5s cubic-bezier(0.25, 0.1, 0.15, 1);
    border: 8px solid var(--bg-card);
}

/* Result Section */
.prize-text {
    font-size: 2.5rem;
    color: var(--primary-glow);
    margin: 1.5rem 0;
    text-shadow: 0 0 20px rgba(234, 179, 8, 0.5);
}

.small-text {
    font-size: 0.8rem !important;
    opacity: 0.7;
    margin-top: 1rem;
}

/* Admin Panel Specifics */
.admin-container {
    max-width: 800px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.table-wrapper {
    overflow-x: auto;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    text-align: left;
}

th, td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    color: var(--primary-color);
    font-weight: 600;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-error { background: rgba(239, 68, 68, 0.2); color: #f87171; }

/* Jackpot Animations */
.jackpot-flash {
    animation: jackpotFlash 1s infinite alternate;
}
@keyframes jackpotFlash {
    0% { background-color: var(--bg-dark); }
    100% { background-color: #451a03; }
}

.jackpot-text {
    animation: goldPulse 0.8s infinite alternate;
}
@keyframes goldPulse {
    0% { text-shadow: 0 0 20px #eab308, 0 0 40px #eab308; transform: scale(1); }
    100% { text-shadow: 0 0 40px #fbbf24, 0 0 80px #fbbf24; transform: scale(1.1); color: #fff; }
}
