/* Exam Simulators - Professional Certification Portal Styles */
/* Based on CPE Pipelines Portal Design */

/* SVG Grain Filter */
.grain-filter {
    position: relative;
    overflow: hidden;
}
.grain-filter::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="1.2" numOctaves="5" /></filter><rect width="300" height="300" filter="url(%23noise)" opacity="0.8" /></svg>');
    border-radius: 1rem;
    opacity: 0.35;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}

.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.light-theme {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%) !important;
}

.light-theme .glass {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.light-theme .glass-dark {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.light-theme h1, .light-theme h2, .light-theme h3, .light-theme p, .light-theme span, .light-theme label {
    color: #1e293b !important;
}

.light-theme input, .light-theme select, .light-theme textarea {
    color: #1e293b !important;
    background: rgba(255, 255, 255, 0.9) !important;
}

.metallic {
    background: linear-gradient(145deg, #2d3748, #1a202c);
    box-shadow: 20px 20px 60px #0f1419, -20px -20px 60px #374151;
}

.gradient-border {
    background: linear-gradient(45deg, #003f7f, #0066cc, #ffb81c, #003f7f);
    background-size: 400% 400%;
    animation: gradient-xy 6s ease infinite;
}

.shimmer-effect {
    position: relative;
    overflow: hidden;
}

.shimmer-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.7;
    animation: float 8s ease-in-out infinite;
}

.orb-1 {
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, #0a4b8e, #1e90ff);
    top: 15%;
    left: 15%;
    animation: drift 15s ease-in-out infinite, fade-pulse 10s ease-in-out infinite;
    animation-delay: 0s;
}

.orb-2 {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #1e90ff, #4da6ff);
    top: 65%;
    right: 20%;
    animation: drift 18s ease-in-out infinite reverse, fade-pulse 12s ease-in-out infinite;
    animation-delay: 3s;
}

.orb-3 {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #0a4b8e, #1e90ff);
    bottom: 25%;
    left: 60%;
    animation: drift 20s ease-in-out infinite, fade-pulse 14s ease-in-out infinite;
    animation-delay: 6s;
}

.orb-4 {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #1e90ff, #4da6ff);
    top: 40%;
    left: 80%;
    animation: drift 16s ease-in-out infinite reverse, fade-pulse 9s ease-in-out infinite;
    animation-delay: 8s;
}

.orb-5 {
    width: 90px;
    height: 90px;
    background: linear-gradient(45deg, #0a4b8e, #1e90ff);
    top: 80%;
    left: 25%;
    animation: drift 22s ease-in-out infinite, fade-pulse 11s ease-in-out infinite;
    animation-delay: 12s;
}

.input-glow:focus {
    box-shadow: 0 0 20px rgba(0, 102, 204, 0.3);
}

.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.massively-heading {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 900;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    line-height: 1.5;
}

.massively-body {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 300;
    line-height: 2.375;
}

.massively-button {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 900;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.12);
    transition: all 0.2s ease-in-out;
    padding: 0.75rem 2rem;
    font-size: 0.8rem;
    line-height: 1;
    cursor: pointer;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 4px 12px rgba(0,0,0,0.4),
        inset 0 0 20px rgba(255,255,255,0.03);
}

.massively-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.15);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.06),
        0 8px 24px rgba(0,0,0,0.4),
        inset 0 0 20px rgba(255,255,255,0.05);
}

.massively-input {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(145deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    transition: all 0.25s ease;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 2px 8px rgba(0,0,0,0.3),
        inset 0 0 12px rgba(255,255,255,0.02);
}

.massively-input:focus {
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(145deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%);
    box-shadow:
        0 0 0 2px rgba(59,130,246,0.15),
        0 4px 16px rgba(0,0,0,0.4),
        inset 0 0 12px rgba(59,130,246,0.04);
}

/* Exam Card Styling */
.exam-card {
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    box-shadow: 
        0 0 0 1px rgba(255,255,255,0.04),
        0 10px 20px rgba(0, 0, 0, 0.6),
        0 6px 6px rgba(0, 0, 0, 0.4),
        inset 0 0 30px rgba(255,255,255,0.04);
}

.exam-card::after {
    content: '';
    position: absolute;
    inset: 1px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1.5rem;
    pointer-events: none;
    z-index: 2;
}

.exam-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    filter: blur(40px);
    opacity: 0.3;
    z-index: -1;
    border-radius: 1.5rem;
}

.exam-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 12px 12px rgba(0, 0, 0, 0.3),
        inset 0 -3px 8px rgba(0, 0, 0, 0.25);
}

.exam-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

/* Question and Answer Styling */
.question-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    user-select: none;
    color: white;
}

.answer-list {
    padding: 0;
    margin: 0;
}

.answer-list li {
    margin-bottom: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
}

.answer-list li:hover {
    border-color: #1e90ff;
    background-color: rgba(30, 144, 255, 0.1);
}

.answer-list li.selected {
    border-color: #1e90ff;
    background-color: rgba(30, 144, 255, 0.2);
}

/* Answer option styling - clean selection without radio buttons */
.answer-option {
    border: 2px solid #4b5563;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 0.75rem;
    cursor: pointer;
    padding: 1rem;
}

.answer-option:hover {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.answer-option.selected {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

/* Ensure all text is white during exam */
.question-text,
.choice-text,
.answer-label {
    color: white !important;
    font-weight: 500;
}

/* Remove old radio/checkbox styling */
.choice-radio, 
.choice-checkbox {
    display: none;
}

.toggle-button {
    display: flex;
    align-items: flex-start;
    width: 100%;
    cursor: pointer;
    text-decoration: none;
    color: white !important;
    user-select: none;
    padding: 0;
}

.toggle-button:hover {
    text-decoration: none;
    color: white !important;
}

/* Explanation Card */
.explanation-card {
    max-width: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    color: white;
}

#explanation-text {
    line-height: 1.6;
    color: white;
}

#explanation-text ol {
    padding-left: 1.5rem;
}

#references {
    font-size: 0.9rem;
    color: #d1d5db;
}

#references a {
    color: #60a5fa;
}

/* Progress Bar */
.progress {
    height: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
}

.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    background: linear-gradient(45deg, #0a4b8e, #1e90ff);
    border-radius: 1rem;
    color: white;
}

/* Score Summary */
.display-4 {
    font-weight: bold;
}

.text-primary {
    color: #60a5fa !important;
}

/* Domain Scores */
.domain-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.domain-score:last-child {
    border-bottom: none;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Results Page Styling */
.results-card {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    color: white;
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(from 0deg, #1e90ff 0%, #1e90ff var(--score-percentage), rgba(255,255,255,0.1) var(--score-percentage), rgba(255,255,255,0.1) 100%);
    position: relative;
}

.score-circle::before {
    content: '';
    position: absolute;
    inset: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #001122 0%, #002244 50%, #001122 100%);
}

.score-text {
    position: relative;
    z-index: 1;
    text-align: center;
}

/* Domain Performance Cards */
.domain-performance-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1rem;
    transition: all 0.3s ease;
}

.domain-performance-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.performance-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.performance-fill {
    height: 100%;
    background: linear-gradient(90deg, #1e90ff, #4da6ff);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* Mobile-First Exam Interface */
@media (max-width: 768px) {
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .question-text {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .answer-option {
        margin-bottom: 0.5rem;
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .toggle-button {
        padding: 1rem;
        min-height: 60px;
        touch-action: manipulation;
    }
    
    .choice-text {
        margin-left: 0.75rem;
        line-height: 1.4;
    }
    
    .choice-radio, .choice-checkbox {
        width: 24px;
        height: 24px;
        margin-right: 16px;
    }
    
    .glass {
        margin: 0.25rem;
        padding: 1rem;
    }
    
    .exam-card {
        margin: 0.5rem 0;
        padding: 1rem;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
    }
    
    /* Exam navigation buttons */
    .exam-nav-buttons {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(20px);
        padding: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 50;
    }
    
    .exam-nav-buttons .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
    }
    
    /* Question counter mobile */
    .question-counter-mobile {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(10px);
        padding: 0.5rem 1rem;
        text-align: center;
        color: white;
        font-size: 0.9rem;
        z-index: 40;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Adjust main content for fixed elements */
    .exam-content-mobile {
        padding-top: 120px;
        padding-bottom: 100px;
    }
    
    /* Touch-friendly buttons */
    .btn-mobile {
        min-height: 48px;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        touch-action: manipulation;
    }
    
    /* Larger tap targets for radio/checkbox */
    .answer-option {
        min-height: 60px;
        display: flex;
        align-items: center;
    }
}

/* Animation for theme transition */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Custom scrollbar for dark theme */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background-color: white !important;
        color: black !important;
    }
    
    .glass, .glass-dark {
        border: 1px solid #000 !important;
        background-color: white !important;
    }
    
    .question-text, .choice-text, .answer-label {
        color: black !important;
    }
}
/* Exam interface full screen styling */
.exam-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #001122 0%, #002244 50%, #001122 100%);
    overflow-y: auto;
}

/* Ensure consistent white text throughout exam */
.exam-fullscreen * {
    color: white !important;
}

.exam-fullscreen .text-gray-300,
.exam-fullscreen .text-gray-400 {
    color: #d1d5db !important;
}

.exam-fullscreen .text-blue-300 {
    color: #93c5fd !important;
}

.exam-fullscreen .text-green-300 {
    color: #86efac !important;
}

.exam-fullscreen .text-yellow-300 {
    color: #fde047 !important;
}

.exam-fullscreen .text-red-300 {
    color: #fca5a5 !important;
}

/* Navigation button styling */
.exam-nav-btn {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 4px 12px rgba(0,0,0,0.4),
        inset 0 0 20px rgba(255,255,255,0.03);
}
.exam-nav-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.15);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.06),
        0 8px 24px rgba(0,0,0,0.4),
        inset 0 0 20px rgba(255,255,255,0.05);
}

/* Exit button styling */
.exit-btn,
#exit-btn {
    background: linear-gradient(135deg, #1a0000 0%, #dc2626 55%, #0f0000 100%) !important;
    color: white !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(239,68,68,0.25) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4) !important;
    transition: all 0.2s ease;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 4px 12px rgba(0,0,0,0.4),
        inset 0 0 20px rgba(255,255,255,0.03) !important;
}

.exit-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(239,68,68,0.5);
    filter: brightness(1.15);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.06),
        0 8px 24px rgba(0,0,0,0.4),
        inset 0 0 20px rgba(255,255,255,0.05);
}

/* Answer list styling for review mode */
.answer-list li.correct {
    background-color: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
}

.answer-list li.incorrect {
    background-color: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Answer option highlighting after confirm */
.answer-option.correct {
    border-color: #22c55e !important;
    background-color: rgba(34, 197, 94, 0.12) !important;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.2), inset 0 0 8px rgba(34, 197, 94, 0.06) !important;
}
.answer-option.incorrect {
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.08) !important;
}


/* ── Global glass effect for all interactive elements ──────────────────────── */
button:not(.toggle-button) {
  border-radius: 10px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 4px 12px rgba(0,0,0,0.4),
    inset 0 0 20px rgba(255,255,255,0.03);
  transition: all 0.2s ease;
  border: 1px solid rgba(255,255,255,0.1);
}
button:not(.toggle-button):hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 8px 24px rgba(0,0,0,0.4),
    inset 0 0 20px rgba(255,255,255,0.05);
  filter: brightness(1.15);
}
button:not(.toggle-button):active {
  transform: translateY(2px) scale(0.97);
  filter: brightness(0.9);
  transition: all 0.05s ease;
}

/* Glass gradient overrides for common button colours */
button[class*="bg-blue-600"],
button[class*="from-blue-600"] {
  background: linear-gradient(135deg, #001a3d 0%, #2563eb 55%, #001433 100%) !important;
  border-color: rgba(59,130,246,0.25) !important;
}
button[class*="bg-blue-600"]:hover,
button[class*="from-blue-600"]:hover {
  border-color: rgba(59,130,246,0.5) !important;
}

button[class*="bg-green-600"],
button[class*="from-green-600"] {
  background: linear-gradient(135deg, #052e16 0%, #16a34a 55%, #031a0d 100%) !important;
  border-color: rgba(34,197,94,0.25) !important;
}
button[class*="bg-green-600"]:hover,
button[class*="from-green-600"]:hover {
  border-color: rgba(34,197,94,0.5) !important;
}

button[class*="bg-red-600"],
button[class*="from-red-600"] {
  background: linear-gradient(135deg, #1a0000 0%, #dc2626 55%, #0f0000 100%) !important;
  border-color: rgba(239,68,68,0.25) !important;
}
button[class*="bg-red-600"]:hover,
button[class*="from-red-600"]:hover {
  border-color: rgba(239,68,68,0.5) !important;
}

button[class*="bg-purple-600"],
button[class*="from-purple-600"] {
  background: linear-gradient(135deg, #0f0a1a 0%, #7c3aed 55%, #080514 100%) !important;
  border-color: rgba(139,92,246,0.25) !important;
}

/* Ghost/transparent buttons */
button[class*="bg-transparent"],
button[class*="bg-white/5"],
button[class*="bg-white/10"] {
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%) !important;
}
button[class*="bg-transparent"]:hover,
button[class*="bg-white/5"]:hover,
button[class*="bg-white/10"]:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.04) 100%) !important;
}

/* Glass effect for all form inputs, selects, textareas */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 2px 8px rgba(0,0,0,0.3),
    inset 0 0 12px rgba(255,255,255,0.02);
  transition: all 0.25s ease;
  border: 1px solid rgba(255,255,255,0.1);
}
input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="search"]:hover,
select:hover,
textarea:hover {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 4px 12px rgba(0,0,0,0.4),
    inset 0 0 12px rgba(255,255,255,0.03);
}
input:focus,
select:focus,
textarea:focus {
  box-shadow:
    0 0 0 2px rgba(59,130,246,0.15),
    0 4px 16px rgba(0,0,0,0.4),
    inset 0 0 12px rgba(59,130,246,0.04);
  border-color: rgba(59,130,246,0.4);
}


/* ── Local study version — hide payment elements ──────────────────────────── */
#cart-btn,
[onclick*="showCart"],
[onclick*="addToCart"] {
  display: none !important;
}


/* ── Flat style exceptions — search, close, and small icon buttons ─────────── */
#search-toggle,
button[onclick*="remove()"],
button[onclick*="close"],
button[onclick*="Close"],
.fa-times,
button:has(> .fa-times),
button:has(> i.fa-search):not([type="submit"]) {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
#search-toggle:hover,
button[onclick*="remove()"]:hover,
button[onclick*="close"]:hover,
button[onclick*="Close"]:hover {
  background: none !important;
  box-shadow: none !important;
  transform: none !important;
  filter: brightness(1.3) !important;
}


/* ── Header nav buttons — clean style, no heavy glass ─────────────────────── */
.nav-persistent button,
header button {
  box-shadow: none !important;
  text-shadow: none !important;
  border: none !important;
  background: none !important;
  transform: none !important;
  filter: none !important;
}
.nav-persistent button:hover,
header button:hover {
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
}

/* Sign In button — styled like the original blue pill */
#auth-buttons button {
  background: linear-gradient(135deg, #001a3d 0%, #2563eb 55%, #001433 100%) !important;
  border: 1px solid rgba(59,130,246,0.25) !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  color: #fff !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 4px 12px rgba(0,0,0,0.4),
    inset 0 0 20px rgba(255,255,255,0.03) !important;
  cursor: pointer !important;
}
#auth-buttons button:hover {
  border-color: rgba(59,130,246,0.5) !important;
  filter: brightness(1.15) !important;
  transform: translateY(-1px) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 8px 24px rgba(0,0,0,0.4),
    inset 0 0 20px rgba(255,255,255,0.05) !important;
}

/* Learn button — same glass style as Sign In */
#learn-btn {
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 4px 12px rgba(0,0,0,0.4),
    inset 0 0 20px rgba(255,255,255,0.03) !important;
  cursor: pointer !important;
}
#learn-btn:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.04) 100%) !important;
  border-color: rgba(255,255,255,0.2) !important;
  filter: brightness(1.15) !important;
  transform: translateY(-1px) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 8px 24px rgba(0,0,0,0.4),
    inset 0 0 20px rgba(255,255,255,0.05) !important;
}

/* My Learning and User Profile buttons — same clean glass */
#my-learning-btn,
#user-profile-btn {
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 4px 12px rgba(0,0,0,0.4),
    inset 0 0 20px rgba(255,255,255,0.03) !important;
  cursor: pointer !important;
}
#my-learning-btn:hover,
#user-profile-btn:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.04) 100%) !important;
  border-color: rgba(255,255,255,0.2) !important;
  filter: brightness(1.15) !important;
  transform: translateY(-1px) !important;
}


/* ── Enhanced Exam Selection Cards (inspired by AWS Native Portal) ─────────── */

/* Staggered entrance for exam cards */
.exam-paper-card {
    animation: examCardPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.exam-paper-card:nth-child(2) { animation-delay: 0.08s; }
.exam-paper-card:nth-child(3) { animation-delay: 0.16s; }
.exam-paper-card:nth-child(4) { animation-delay: 0.24s; }
.exam-paper-card:nth-child(5) { animation-delay: 0.32s; }
.exam-paper-card:nth-child(6) { animation-delay: 0.40s; }

@keyframes examCardPop {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Glow border on hover for exam cards */
.exam-paper-card {
    position: relative;
    overflow: visible;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 8px 16px rgba(0,0,0,0.4),
        inset 0 0 20px rgba(255,255,255,0.03);
}
.exam-paper-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: var(--card-accent, rgba(59,130,246,0.4));
    box-shadow:
        0 0 0 1px var(--card-accent, rgba(59,130,246,0.15)),
        0 20px 40px rgba(0,0,0,0.3),
        0 0 30px var(--card-glow, rgba(59,130,246,0.1)),
        inset 0 0 20px rgba(255,255,255,0.04);
}
.exam-paper-card:active {
    transform: translateY(-2px) scale(0.98);
    transition: all 0.08s ease;
}

/* Number badge pulse on hover */
.exam-paper-card:hover .exam-number-badge {
    box-shadow: 0 0 20px var(--card-glow, rgba(59,130,246,0.4));
    transform: scale(1.08);
    transition: all 0.3s ease;
}
.exam-number-badge {
    transition: all 0.3s ease;
}

/* Start button inside card — expanding fill on hover */
.exam-start-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    letter-spacing: 0.05em;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
}
.exam-start-btn:hover {
    letter-spacing: 0.1em;
    filter: brightness(1.15);
}
.exam-start-btn:active {
    transform: scale(0.96) translateY(1px) !important;
    filter: brightness(0.88) !important;
    transition: all 0.05s ease !important;
}

/* Domain card stagger entrance */
.domain-practice-card {
    animation: domainSlideIn 0.3s ease-out both;
}
.domain-practice-card:nth-child(2) { animation-delay: 0.04s; }
.domain-practice-card:nth-child(3) { animation-delay: 0.08s; }
.domain-practice-card:nth-child(4) { animation-delay: 0.12s; }
.domain-practice-card:nth-child(5) { animation-delay: 0.16s; }
.domain-practice-card:nth-child(6) { animation-delay: 0.20s; }
.domain-practice-card:nth-child(7) { animation-delay: 0.24s; }
.domain-practice-card:nth-child(8) { animation-delay: 0.28s; }

@keyframes domainSlideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Section header fade in */
.exam-section-header {
    animation: sectionFadeIn 0.5s ease-out;
}
@keyframes sectionFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Exam info stat badges */
.exam-stat-badge {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.exam-stat-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.exam-stat-badge::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--stat-color, #3b82f6);
    opacity: 0;
    transition: opacity 0.2s;
}
.exam-stat-badge:hover::after {
    opacity: 1;
}


/* ── Compact stat cards (from AWS Native Portal) ──────────────────────────── */
.cr-stat-card {
    position: relative;
    padding: 14px 16px;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
    border: 1px solid rgba(255,255,255,0.08);
    animation: examCardPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.cr-stat-card:nth-child(2) { animation-delay: 0.05s; }
.cr-stat-card:nth-child(3) { animation-delay: 0.1s; }
.cr-stat-card:nth-child(4) { animation-delay: 0.15s; }
.cr-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}


/* ── Slanted shadow for cards ─────────────────────────────────────────────── */
.cr-stat-card,
.exam-paper-card {
    box-shadow:
        4px 6px 12px rgba(0,0,0,0.5),
        1px 2px 4px rgba(0,0,0,0.3),
        inset 0 0 20px rgba(255,255,255,0.03);
}
.cr-stat-card:hover,
.exam-paper-card:hover {
    box-shadow:
        6px 10px 20px rgba(0,0,0,0.5),
        2px 4px 8px rgba(0,0,0,0.3),
        inset 0 0 20px rgba(255,255,255,0.04);
}


/* ── Login card design (from AWS Native Portal) ───────────────────────────── */
.cpe-login-card {
    max-width: 400px;
    width: 100%;
    margin: 20px;
    background: linear-gradient(145deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
    border-radius: 32px;
    padding: 32px 36px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow:
        rgba(59,130,246,0.1) 0px 20px 30px -15px,
        rgba(0,0,0,0.6) 0px 20px 40px -10px;
    backdrop-filter: blur(20px);
    animation: login-card-in 0.4s cubic-bezier(0.175,0.885,0.32,1.275) forwards;
}
@keyframes login-card-in {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.cpe-login-header {
    text-align: center;
    margin-bottom: 24px;
}
.cpe-login-title {
    font-family: 'Source Sans Pro', 'Rajdhani', sans-serif;
    font-weight: 900;
    font-size: 1.3rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 4px;
}
.cpe-login-subtitle {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.06em;
}
.cpe-login-btn {
    display: block;
    width: 100%;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.82rem;
    background: linear-gradient(135deg, #001a3d 0%, #003380 55%, #001433 100%);
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    padding: 15px;
    margin-top: 24px;
    border-radius: 16px;
    border: 1px solid rgba(59,130,246,0.2);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 4px 16px rgba(0,0,0,0.5),
        inset 0 0 20px rgba(255,255,255,0.03);
}
.cpe-login-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(59,130,246,0.5);
    filter: brightness(1.15);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.06),
        0 8px 28px rgba(0,0,0,0.5),
        inset 0 0 20px rgba(255,255,255,0.05);
}
.cpe-login-btn:active {
    transform: translateY(2px) scale(0.97);
    filter: brightness(0.9);
    transition: all 0.06s ease;
}

/* ── Pill buttons (from AWS Native Portal) ────────────────────────────────── */
.cpe-pill-btn {
    padding: 14px 32px;
    border-radius: 50px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 900;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 4px 12px rgba(0,0,0,0.4),
        inset 0 0 20px rgba(255,255,255,0.03);
}
.cpe-pill-btn:hover {
    transform: translateY(-1px);
    letter-spacing: 3px;
    filter: brightness(1.15);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.06),
        0 8px 24px rgba(0,0,0,0.4),
        inset 0 0 20px rgba(255,255,255,0.05);
}
.cpe-pill-btn:active {
    transform: translateY(2px) scale(0.97);
    filter: brightness(0.9);
    transition: all 80ms;
}


/* ── Glass filter for mode toggle ─────────────────────────────────────────── */
.mode-card {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}
.mode-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    opacity: 0;
    filter: url(#radio-glass);
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}
.mode-card.mode-active::before {
    opacity: 1;
}
.mode-card.mode-active {
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.15),
        0 8px 24px rgba(0,0,0,0.4),
        inset 0 0 30px rgba(255,255,255,0.04);
}
.mode-card:not(.mode-active) {
    opacity: 0.6;
}
.mode-card:not(.mode-active):hover {
    opacity: 0.85;
}


/* ═══════════════════════════════════════════════
   MOBILE RESPONSIVE
   Targets inline styles with !important overrides
   ═══════════════════════════════════════════════ */

/* ── Tablet (768px and below) ── */
@media (max-width: 768px) {
    /* Header: shrink logo, hide search */
    .skillcraftr-logo-text {
        font-size: 1.1rem !important;
        letter-spacing: 0.1em !important;
    }
    .nav-persistent img[alt="SkillCraftr"] {
        width: 36px !important;
        height: 36px !important;
    }
    .nav-persistent .max-w-7xl > .flex > .flex.items-center.mx-4,
    .nav-persistent .max-w-7xl > .flex > .flex.flex-1.max-w-md {
        display: none !important;
    }

    /* Grids: collapse to fewer columns */
    .grid.grid-cols-1.md\:grid-cols-3 { grid-template-columns: 1fr 1fr !important; }
    .grid.grid-cols-1.md\:grid-cols-2 { grid-template-columns: 1fr !important; }

    /* Results: stack domain bars + donut */
    [style*="grid-template-columns:1fr 280px"] {
        grid-template-columns: 1fr !important;
    }
    /* Score banner */
    [style*="display:flex;align-items:center;gap:20px"] {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
}

/* ── Phone (640px and below) ── */
@media (max-width: 640px) {
    /* Force all inline grids to single/double column */
    [style*="grid-template-columns:repeat(auto-fill"] {
        grid-template-columns: 1fr !important;
    }
    [style*="grid-template-columns:repeat(4,1fr)"] {
        grid-template-columns: 1fr 1fr !important;
    }
    [style*="grid-template-columns:repeat(3,1fr)"] {
        grid-template-columns: 1fr 1fr 1fr !important;
    }
    .grid.grid-cols-1.md\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }

    /* Main content padding */
    main { padding-left: 12px !important; padding-right: 12px !important; }

    /* Exam interface — the screen users spend most time on */
    .fixed.inset-0 .min-h-screen { padding: 6px !important; }
    .fixed.inset-0 .max-w-4xl { max-width: 100% !important; }

    /* Question card */
    [style*="padding:28px"] { padding: 14px !important; }
    [style*="border-radius:20px"][style*="padding:28px"] { border-radius: 14px !important; }

    /* Exam header bar */
    [style*="padding:12px 18px"][style*="border-radius:14px"][style*="margin-bottom:14px"] {
        padding: 8px 12px !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    /* Hide progress bar text on very small screens, keep timer visible */
    [style*="flex:1;margin:0 18px"] { margin: 0 8px !important; }
    #timer { font-size: 0.68rem !important; }
    #current-q, #total-q { font-size: 0.68rem !important; }

    /* Answer options — larger tap targets */
    .answer-option {
        padding: 12px !important;
        border-width: 2px !important;
        margin-bottom: 6px !important;
    }
    .answer-option .answer-label {
        font-size: 1rem !important;
        min-width: 1.5rem !important;
        margin-right: 10px !important;
    }
    .answer-option .choice-text {
        font-size: 0.88rem !important;
        line-height: 1.5 !important;
    }

    /* Nav buttons */
    #prev-btn, #next-btn {
        padding: 10px 16px !important;
        font-size: 0.7rem !important;
    }

    /* Modals — near full width */
    .cpe-login-card {
        max-width: 96vw !important;
        margin: 4px !important;
        padding: 18px !important;
        border-radius: 20px !important;
    }
    /* Mode selection modal */
    .fixed.inset-0.z-50 { padding: 8px !important; }

    /* Stat cards in modals */
    .cr-stat-card { padding: 8px 6px !important; }
    .cr-stat-card [style*="font-size:1.2rem"] { font-size: 0.85rem !important; }
    .cr-stat-card [style*="font-size:1rem"] { font-size: 0.85rem !important; }
    .cr-stat-card [style*="font-size:0.55rem"] { font-size: 0.48rem !important; }

    /* Study mode panels */
    #explanation-section, #ai-reasoning-panel {
        padding: 12px !important;
        border-radius: 12px !important;
    }

    /* Results page */
    [style*="min-height:100vh"][style*="width:100vw"] {
        padding: 12px !important;
    }
    [style*="max-width:95vw"] { max-width: 100% !important; }
    /* Score circle */
    [style*="width:72px;height:72px"] {
        width: 56px !important;
        height: 56px !important;
    }
    [style*="font-size:1.6rem;font-weight:900"] { font-size: 1.2rem !important; }
    /* Donut chart */
    [style*="width:160px;height:160px"] {
        width: 120px !important;
        height: 120px !important;
    }
    /* Question review grid tiles */
    [onclick*="showQuestionDetail"] {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.55rem !important;
    }
    /* Question detail panel */
    #question-detail-panel { padding: 14px !important; }

    /* Show All overlay — full screen */
    #all-questions-overlay > div {
        max-width: 100vw !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }
    #all-questions-overlay [style*="padding:0 24px"] { padding: 0 12px !important; }

    /* Pipeline cards */
    .pipeline-card { padding: 14px !important; }
    .pipeline-card h3 { font-size: 1rem !important; }

    /* Dropdowns — inside mobile menu, not fixed */
    #learn-dropdown,
    #my-learning-dropdown,
    #user-profile-dropdown {
        position: static !important;
        width: 100% !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        margin-top: 4px;
    }

    /* Hide desktop nav, show hamburger */
    .nav-desktop-items {
        display: none !important;
    }
    .mobile-hamburger {
        display: flex !important;
    }

    /* Mobile menu overlay */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,8,20,0.97);
        backdrop-filter: blur(12px);
        z-index: 100;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
        padding: 20px;
    }
    .mobile-menu-overlay.open {
        display: flex;
    }
    .mobile-menu-overlay a,
    .mobile-menu-overlay button {
        width: 80%;
        max-width: 280px;
        text-align: center;
        padding: 14px 16px !important;
        font-size: 0.85rem !important;
        border-radius: 12px;
        background: linear-gradient(135deg,rgba(255,255,255,0.06),rgba(255,255,255,0.02));
        border: 1px solid rgba(255,255,255,0.08);
        color: #fff;
        text-decoration: none;
        cursor: pointer;
        transition: all 0.2s;
    }
    .mobile-menu-overlay a:hover,
    .mobile-menu-overlay button:hover {
        background: linear-gradient(135deg,rgba(255,255,255,0.1),rgba(255,255,255,0.04));
        border-color: rgba(255,255,255,0.15);
    }
    .mobile-menu-close {
        position: absolute;
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: rgba(255,255,255,0.06) !important;
        border: 1px solid rgba(255,255,255,0.1) !important;
        color: #fff;
        font-size: 1rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        width: auto !important;
        max-width: none !important;
        padding: 0 !important;
        width: 40px !important;
    }

    /* Auth modal */
    #auth-modal .glass { max-width: 95vw !important; padding: 20px !important; }

    /* Confirm answer button */
    #confirm-answer-btn { font-size: 0.72rem !important; padding: 12px !important; }

    /* Exit modal buttons */
    .cpe-pill-btn { font-size: 0.68rem !important; padding: 10px 12px !important; }
}

/* Hamburger button — hidden on desktop, shown on mobile */
.mobile-hamburger {
    display: none !important;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg,rgba(255,255,255,0.06),rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}
.mobile-hamburger:hover { color: #fff; border-color: rgba(255,255,255,0.15); }

/* Desktop default — ensure nav items are visible */
.nav-desktop-items {
    display: flex !important;
}

/* Mobile overlay — hidden by default on desktop */
.mobile-menu-overlay {
    display: none !important;
}

/* ── Small phone (380px and below) ── */
@media (max-width: 380px) {
    .skillcraftr-logo-text { font-size: 0.95rem !important; }
    .nav-persistent img[alt="SkillCraftr"] { width: 30px !important; height: 30px !important; }
    .answer-option .choice-text { font-size: 0.82rem !important; }
    [style*="grid-template-columns:repeat(3,1fr)"] { grid-template-columns: 1fr 1fr !important; }
    .cr-stat-card [style*="font-size:0.82rem"] { font-size: 0.7rem !important; }
}
