:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #f59e0b;
    --accent: #ef4444;
    --bg-gradient-start: #1e1b4b;
    --bg-gradient-end: #4c1d95;
    --text-light: #f3f4f6;
    --text-dim: #9ca3af;
    --panel-bg: rgba(255, 255, 255, 0.1);
    --panel-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', system-ui, sans-serif; }

body {
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

header {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--panel-border);
}

h1 {
    font-size: 1.5rem;
    background: linear-gradient(to right, #c084fc, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

nav { display: flex; gap: 1rem; }

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-weight: 600;
}

.nav-btn:hover { color: var(--text-light); background: rgba(255, 255, 255, 0.1); }
.nav-btn.active { background: var(--primary); color: white; box-shadow: 0 0 15px rgba(99, 102, 241, 0.5); }

main { flex: 1; position: relative; width: 100%; max-width: 1200px; margin: 0 auto; padding: 2rem; }

/* Components */
.card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: white;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(45deg, var(--primary), var(--primary-dark)); }
.btn-secondary { background: linear-gradient(45deg, var(--secondary), #d97706); }
.btn-danger { background: var(--accent); }
.btn-icon { padding: 0.4rem; border-radius: 50%; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; }

.modal-mask {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 1000;
    display: flex; justify-content: center; align-items: center;
}
.modal-content {
    background: #1f2937; padding: 2rem; border-radius: 12px;
    width: 90%; max-width: 500px; border: 1px solid var(--panel-border);
    max-height: 80vh; overflow-y: auto;
}

/* Vue Transitions */
.fade-enter-active, .fade-leave-active { transition: opacity 0.3s ease; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

.list-enter-active, .list-leave-active { transition: all 0.4s ease; }
.list-enter-from, .list-leave-to { opacity: 0; transform: translateX(-30px); }

/* Wheel Styles */
.wheel-container { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.wheel-wrapper { position: relative; width: 400px; height: 400px; max-width: 90vw; max-height: 90vw; }
#wheel-canvas { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 20px rgba(99, 102, 241, 0.5); transition: transform 0.1s; }
.wheel-pointer {
    position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
    width: 40px; height: 50px; background: var(--accent);
    clip-path: polygon(50% 100%, 0 0, 100% 0); z-index: 10;
    filter: drop-shadow(0 4px 4px rgba(0,0,0,0.5));
}
.segment-item { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; align-items: center; }
input { padding: 0.5rem; border-radius: 4px; border: 1px solid #444; background: #222; color: white; }

/* Slot Styles */
.slot-machine {
    display: flex; justify-content: center; gap: 1rem; padding: 2rem;
    background: linear-gradient(to bottom, #333, #000);
    border-radius: 20px; box-shadow: 0 0 0 10px #444, 0 0 50px rgba(0,0,0,0.5);
    margin: 2rem auto; width: fit-content;
}
.reel-container {
    width: 120px; height: 180px; overflow: hidden; background: white;
    border-radius: 10px; position: relative; box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}
.reel-container::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.7) 100%);
    z-index: 2; pointer-events: none;
}
.reel-item { height: 90px; display: flex; justify-content: center; align-items: center; font-size: 3rem; }
.slot-settings-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 1rem; }

/* Quiz Styles */
.quiz-container { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; height: calc(100vh - 200px); }
.quiz-panel { background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: 12px; padding: 1.5rem; display: flex; flex-direction: column; overflow: hidden; }
.list-container { flex: 1; overflow-y: auto; margin: 1rem 0; }
.list-item { padding: 0.5rem; margin-bottom: 0.5rem; background: rgba(0,0,0,0.2); border-radius: 4px; display: flex; justify-content: space-between; }
.list-item.used { opacity: 0.5; text-decoration: line-through; }
.result-display { font-size: 2rem; text-align: center; margin: 1rem 0; min-height: 3rem; color: var(--secondary); font-weight: bold; }
.history-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.history-tag { background: rgba(255,255,255,0.1); padding: 0.2rem 0.8rem; border-radius: 15px; font-size: 0.8rem; }

@media (max-width: 768px) { .quiz-container { grid-template-columns: 1fr; height: auto; } }

#global-confetti { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2000; }
