@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --primary: #6366f1;
    --secondary: #a855f7;
    --accent: #f59e0b;
    --background: #0f172a;
    --text: #f8fafc;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    background: var(--background);
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
    min-height: 100vh;
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
}

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    animation: fadeIn 0.8s ease-out;
}

h1 {
    font-weight: 800;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

p.subtitle {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #cbd5e1;
}

input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(168, 85, 247, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    margin-top: 1rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

/* Quiz Styles */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    flex-grow: 1;
    margin: 0 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transition: width 0.4s ease;
}

.question-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.options-container {
    display: grid;
    gap: 1rem;
}

.option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 1.25rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.option.selected {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
}

/* Spin Wheel Styles */
.wheel-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 2rem auto;
    max-width: 100%;
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    .glass-card {
        padding: 1.5rem;
    }
    .wheel-container {
        width: 250px;
        height: 250px;
    }
    h1 {
        font-size: 2rem;
    }
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5), 0 0 0 10px var(--glass-border);
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--accent);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    z-index: 10;
}

.prize-display {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    display: none;
}

.prize-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    margin-top: 0.5rem;
}

/* Success Message */
.success-icon {
    font-size: 4rem;
    color: #10b981;
    text-align: center;
    margin-bottom: 1.5rem;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Admin Nav Bar Styles */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
}

.nav-logo {
    font-weight: 800;
    font-size: 1.2rem;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    opacity: 1;
    color: var(--primary);
}

.btn-logout-desktop {
    width: auto !important;
    padding: 0.5rem 1rem !important;
    margin-top: 0 !important;
}

.btn-logout-mobile {
    display: none;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 2px;
}

@media (max-width: 992px) {
    .nav-bar {
        padding: 0 1.5rem;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 2rem;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 0;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        width: 100%;
        padding: 1.5rem;
        text-align: center;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .btn-logout-desktop {
        display: none;
    }

    .btn-logout-mobile {
        display: block !important;
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444 !important;
        font-weight: 700;
    }

    .menu-toggle {
        display: flex;
    }

    /* Hamburger Animation */
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}
