/* ==========================================================================
   CSS Variables & Design System
   ========================================================================== */
:root {
    /* Colors - Dark Mode / Cyber Security Theme */
    --bg-dark: #0f1115;
    --bg-card: #181b21;
    --text-primary: #f0f2f5;
    --text-secondary: #9aa0a6;
    
    /* Accents */
    --accent-primary: #00d2ff;
    --accent-secondary: #3a7bd5;
    --success: #00e676;
    --danger: #ff5252;
    --border-color: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-main: 'Inter', sans-serif;
    
    /* Spacing & Borders */
    --radius-md: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* Container */
#app {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
}

#quiz-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Typography Utility Classes */
h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease-in forwards;
}

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

/* ==========================================================================
   Quiz Custom Styles
   ========================================================================== */

/* Quiz Option Button */
.quiz-option {
    width: 100%;
    text-align: left;
    background-color: #0a1128;
    border: 1px solid #1a202c;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    position: relative;
    overflow: hidden;
}

.quiz-option::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 210, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.quiz-option:hover {
    border-color: #00d2ff;
    background-color: #0d1633;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.15);
}

.quiz-option:hover::before {
    opacity: 1;
}

.quiz-option:active {
    transform: scale(0.98);
}

/* Option Text */
.quiz-option-text {
    flex: 1;
    line-height: 1.4;
}

/* Emoji Icon in Options */
.quiz-option-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 1.4rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    flex-shrink: 0;
}

/* Radio Circle */
.quiz-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #1a202c;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.quiz-option:hover .quiz-radio {
    border-color: #00d2ff;
}

/* Selected State */
.quiz-option.selected {
    border-color: #00d2ff;
    background-color: rgba(0, 210, 255, 0.1);
}

.quiz-option.selected .quiz-option-emoji {
    background: rgba(0, 210, 255, 0.15);
}

.quiz-option.selected .quiz-radio {
    border-color: #00d2ff;
}

.quiz-option.selected .quiz-radio::after {
    content: '';
    position: absolute;
    inset: 4px;
    background-color: #00d2ff;
    border-radius: 50%;
}

/* Step Label in Question Title */
.quiz-step-label {
    color: #00d2ff;
    font-weight: 700;
}

/* Confidentiality Footer */
.quiz-confidentiality {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.7rem;
    text-align: center;
    margin-top: 2rem;
    letter-spacing: 0.02em;
}

/* View Transitions */
.view-section {
    display: none;
}

.view-section.active {
    display: flex;
}

/* ==========================================================================
   Background Grid & Glow
   ========================================================================== */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
    background-color: #050a14;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
}

.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -9;
    pointer-events: none;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 210, 255, 0.08), transparent 40%);
    transition: opacity 0.3s ease;
}

/* ==========================================================================
   Design System Utilities
   ========================================================================== */
.font-manrope { font-family: "Manrope", sans-serif !important; }
.font-oswald { font-family: "Oswald", sans-serif !important; }
.font-sans { font-family: "Inter", sans-serif !important; }

@keyframes fadeSlideIn {
  0% { opacity: 0; transform: translateY(30px); filter: blur(8px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.animate-on-scroll { animation-play-state: paused !important; }
.animate-on-scroll.animate { animation-play-state: running !important; }

.gradient-blur { position: fixed; z-index: 5; inset: 0 0 auto 0; height: 12%; pointer-events: none; }
.gradient-blur > div, .gradient-blur::before, .gradient-blur::after { position: absolute; inset: 0; }
.gradient-blur::before { content: ""; z-index: 1; backdrop-filter: blur(.5px); mask: linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 12.5%, rgba(0,0,0,1) 25%, rgba(0,0,0,0) 37.5%); }
.gradient-blur > div:nth-of-type(1) { z-index: 2; backdrop-filter: blur(1px); mask: linear-gradient(to top, rgba(0,0,0,0) 12.5%, rgba(0,0,0,1) 25%, rgba(0,0,0,1) 37.5%, rgba(0,0,0,0) 50%); }
.gradient-blur > div:nth-of-type(2) { z-index: 3; backdrop-filter: blur(2px); mask: linear-gradient(to top, rgba(0,0,0,0) 25%, rgba(0,0,0,1) 37.5%, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 62.5%); }
.gradient-blur > div:nth-of-type(3) { z-index: 4; backdrop-filter: blur(4px); mask: linear-gradient(to top, rgba(0,0,0,0) 37.5%, rgba(0,0,0,1) 50%, rgba(0,0,0,1) 62.5%, rgba(0,0,0,0) 75%); }
.gradient-blur > div:nth-of-type(4) { z-index: 5; backdrop-filter: blur(8px); mask: linear-gradient(to top, rgba(0,0,0,0) 50%, rgba(0,0,0,1) 62.5%, rgba(0,0,0,1) 75%, rgba(0,0,0,0) 87.5%); }
.gradient-blur > div:nth-of-type(5) { z-index: 6; backdrop-filter: blur(16px); mask: linear-gradient(to top, rgba(0,0,0,0) 62.5%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 87.5%, rgba(0,0,0,0) 100%); }
.gradient-blur > div:nth-of-type(6) { z-index: 7; backdrop-filter: blur(32px); mask: linear-gradient(to top, rgba(0,0,0,0) 75%, rgba(0,0,0,1) 87.5%, rgba(0,0,0,1) 100%); }
.gradient-blur::after { content: ""; z-index: 8; backdrop-filter: blur(64px); mask: linear-gradient(to top, rgba(0,0,0,0) 87.5%, rgba(0,0,0,1) 100%); }

[style*="--border-gradient"]::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: var(--border-radius-before, inherit);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  background: var(--border-gradient);
  pointer-events: none;
}
