/* ==============================================
   VIBRANT QUIZ PAGE STYLES
   Modern Grid/Flexbox Layout
   ============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ⚡ PERFORMANCE OPTIMIZATIONS ⚡ */
/* Improve rendering performance across the app */
*,
*::before,
*::after {
    /* Reduce paint/layout costs */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Optimize animations to use GPU */
@media (prefers-reduced-motion: no-preference) {
    :root {
        scroll-behavior: smooth;
    }
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Import GL Variables - تأكد من تحميل gl-components.css أولاً */

/* Quiz-Specific Variables */
:root {
    --primary-gradient: var(--gl-gradient-rainbow);
    --success-color: var(--gl-accent);
    --error-color: var(--gl-red);
    --warning-color: var(--gl-orange);
    --info-color: var(--gl-cyan);
    --shadow-light: var(--gl-shadow-sm);
    --shadow-medium: var(--gl-shadow-md);
    --shadow-heavy: var(--gl-shadow-xl);
    --border-radius: var(--gl-radius-lg);
    --transition: var(--gl-transition-bounce);
}

body {
    font-family: var(--gl-font-sans);
    background: var(--cyber-dark-1);
    min-height: 100vh;
    color: #ffffff;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Cyber Grid Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Cyber Particles Effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 243, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 237, 78, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: particleShimmer 15s ease infinite;
}

@keyframes particleShimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* Main Container - Cyber Style */
.quiz-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Header - Vibrant Design */
.quiz-header {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(30px);
    padding: var(--gl-space-lg) var(--gl-space-2xl);
    box-shadow: var(--gl-shadow-lg), var(--gl-glow-rainbow);
    position: sticky;
    top: 0;
    z-index: var(--gl-z-sticky);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid transparent;
    border-image: var(--gl-gradient-rainbow);
    border-image-slice: 1;
}

.quiz-title {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: var(--gl-weight-black);
    background: var(--gl-gradient-rainbow);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 5s ease infinite;
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    letter-spacing: -0.02em;
}

.quiz-progress {
    display: flex;
    align-items: center;
    gap: var(--gl-space-lg);
}

.progress-bar {
    width: 250px;
    height: 12px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: var(--gl-radius-full);
    overflow: hidden;
    position: relative;
    box-shadow: var(--gl-shadow-inner);
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyber-cyan), var(--cyber-magenta), var(--cyber-yellow));
    background-size: 200% auto;
    border-radius: var(--gl-radius-full);
    transition: width 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    width: 0%;
    box-shadow: var(--glow-cyber-cyan);
    position: relative;
    overflow: hidden;
    animation: progressGlow 2s ease infinite;
}

@keyframes progressGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 212, 255, 0.5); }
    50% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.8), 0 0 30px rgba(0, 230, 118, 0.5); }
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressShine 2s ease infinite;
}

@keyframes progressShine {
    to { left: 100%; }
}

.progress-text {
    font-weight: var(--gl-weight-bold);
    color: var(--gl-primary);
    min-width: 140px;
    text-align: right;
    font-size: var(--gl-text-lg);
    background: var(--gl-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Legacy controls removed - using compact versions */

/* Compact Order Controls */
.order-controls-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0; /* Prevent shrinking when logo pushes it */
}

.order-group-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-label-compact {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

.order-label-compact.secondary {
    color: rgba(255, 255, 255, 0.7);
}

.order-dropdown-compact {
    min-width: 140px;
    padding: 0.4rem 0.6rem;
    border: 2px solid var(--cyber-cyan);
    border-radius: var(--voxel-radius-sm);
    background: var(--cyber-dark-3);
    backdrop-filter: blur(10px);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cyber-cyan);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--voxel-shadow-sm);
}

.order-dropdown-compact:hover {
    border-color: var(--cyber-magenta);
    box-shadow: var(--voxel-shadow-md), var(--glow-cyber-cyan);
}

.order-dropdown-compact.secondary {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(248, 249, 250, 0.9);
    color: #666;
    min-width: 120px;
}

.order-dropdown-compact:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* Quiz Header - Cyber-Voxel Style */
.quiz-header {
    background: rgba(10, 10, 18, 0.95);
    color: var(--cyber-cyan);
    padding: var(--voxel-unit) var(--voxel-2x);
    border-radius: 0;
    box-shadow: var(--voxel-shadow-lg), var(--glow-cyber-cyan);
    margin-bottom: 0;
    border-bottom: 4px solid transparent;
    border-image: var(--gradient-synthwave-1);
    border-image-slice: 1;
    position: relative;
    backdrop-filter: blur(30px);
}

.quiz-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 243, 255, 0.03),
        rgba(0, 243, 255, 0.03) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 0;
}

/* Controls Row (Row 1) */
.header-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 0.75rem;
    margin-left: 240px; /* Make space for the logo */
}

/* Info Row (Row 2) */
.header-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-left: 240px; /* Make space for the logo */
}

/* Title Section */
.title-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    flex: 1;
}

.quiz-title-compact {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.quiz-stats-compact {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    align-items: center;
}

.current-element-compact, .quiz-score-compact {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
    font-weight: 500;
}

/* Element Audio Button */
.element-audio-btn {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.95);
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 26px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.element-audio-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.element-audio-btn.playing {
    background: linear-gradient(135deg, #4caf50, #45a049);
    border-color: #4caf50;
    animation: audioPulse 1.5s ease-in-out infinite;
}

@keyframes audioPulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.audio-icon {
    font-size: 0.9rem;
    line-height: 1;
    white-space: nowrap;
}

/* Progress Section */
.progress-section-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    justify-content: center;
}

.progress-text-compact {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    min-width: 50px;
    text-align: center;
    font-size: 0.9rem;
}

/* Navigation Section */
.navigation-section {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-btn-compact {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.95);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 40px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.nav-btn-compact:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.nav-btn-compact.primary {
    background: rgba(255, 255, 255, 0.95);
    color: #2c3e50;
    border-color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.nav-btn-compact.primary:hover {
    background: white;
    color: #1a252f;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-btn-compact.refresh {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.25), rgba(56, 142, 60, 0.25));
    border-color: rgba(76, 175, 80, 0.6);
    color: rgba(255, 255, 255, 0.98);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 70px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.nav-btn-compact.refresh:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.4), rgba(56, 142, 60, 0.4));
    border-color: rgba(76, 175, 80, 0.8);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 12px rgba(76, 175, 80, 0.4);
}

.nav-btn-compact.refresh:active {
    transform: translateY(0) scale(0.98);
}

.refresh-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.nav-btn-compact.refresh:hover .refresh-icon {
    transform: rotate(180deg);
    animation: refreshSpin 0.6s ease-in-out;
}

.refresh-text {
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

@keyframes refreshSpin {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg); }
}

.nav-btn-compact.refresh::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.nav-btn-compact.refresh:hover::before {
    left: 100%;
}

.nav-btn-compact:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Random Quiz Controls */
.random-controls-compact {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.random-btn-compact {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 80px;
    justify-content: center;
}

.random-btn-compact:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.random-btn-compact.active {
    background: linear-gradient(135deg, #ff6b6b, #ff5722);
    color: white;
    border-color: #ff5722;
    animation: randomPulse 2s infinite;
}

.random-btn-compact.active:hover {
    background: linear-gradient(135deg, #ff5722, #e64a19);
    transform: translateY(-1px);
    box-shadow: 0 2px 12px rgba(255, 87, 34, 0.4);
}

.random-icon {
    font-size: 1rem;
    transition: var(--transition);
}

.random-btn-compact.active .random-icon {
    animation: randomSpin 3s linear infinite;
}

.random-text {
    font-weight: 600;
    white-space: nowrap;
}

@keyframes randomPulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(255, 87, 34, 0.3); }
    50% { box-shadow: 0 2px 16px rgba(255, 87, 34, 0.6); }
}

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

/* Compact Search Controls */
.search-controls-compact,
.text-search-controls-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Text Search Controls - Distinct Green Theme */
.text-search-controls-compact {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}

.text-search-controls-compact:hover {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
}

.search-label-compact {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

.search-input-compact {
    width: 60px;
    padding: 0.4rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    text-align: center;
    color: #333;
}

.search-input-compact:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* Text Search Input - Wider and Green Focus */
.search-input-compact.text-search {
    width: 120px;
    text-align: left;
    padding-left: 0.7rem;
}

.search-input-compact.text-search:focus {
    border-color: rgba(76, 175, 80, 0.8);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
}

.search-input-compact.text-search.searching {
    background: rgba(255, 255, 255, 0.95);
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.4);
    animation: searchPulse 1s ease-in-out infinite;
}

@keyframes searchPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Search Clear Button */
.search-clear-btn-compact {
    background: rgba(244, 67, 54, 0.8);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
    min-width: 24px;
}

.search-clear-btn-compact:hover {
    background: rgba(244, 67, 54, 1);
    opacity: 1;
    transform: scale(1.1);
}

.search-go-btn-compact {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
    font-weight: 600;
}

.search-go-btn-compact:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.copy-list-btn-compact {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #2e7d32;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.copy-list-btn-compact:hover {
    background: rgba(76, 175, 80, 0.25);
    border-color: rgba(76, 175, 80, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(76, 175, 80, 0.2);
}

.copy-list-btn-compact:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(76, 175, 80, 0.3);
}

.copy-list-btn-compact.copying {
    background: rgba(33, 150, 243, 0.15);
    border-color: rgba(33, 150, 243, 0.3);
    color: #1976d2;
    pointer-events: none;
}

.copy-list-btn-compact.success {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.6);
    color: #1b5e20;
}

.copy-list-btn-compact.success::after {
    content: '✓';
    position: absolute;
    font-size: 0.7rem;
    animation: successPulse 0.3s ease-out;
}

@keyframes successPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Dynamic Search Dropdown Styles */
.dynamic-search-wrapper {
    position: relative;
    width: 100%;
}

.dynamic-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: -4px;
    right: -4px;
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.95) 0%,
        rgba(30, 41, 59, 0.95) 50%,
        rgba(51, 65, 85, 0.95) 100%
    );
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.6),
        0 10px 25px -5px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px) saturate(180%);
    z-index: 1000;
    max-height: 420px;
    overflow: hidden;
    transform: translateY(-8px) scale(0.96) rotateX(5deg);
    transform-origin: top center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.15));
}

.dynamic-search-dropdown.show {
    transform: translateY(0) scale(1) rotateX(0deg);
    opacity: 1;
    visibility: visible;
}

.search-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.1) 0%,
        rgba(168, 85, 247, 0.1) 100%
    );
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 16px 16px 0 0;
    position: relative;
}

.search-dropdown-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(99, 102, 241, 0.4) 20%,
        rgba(168, 85, 247, 0.4) 50%,
        rgba(236, 72, 153, 0.4) 80%,
        transparent 100%
    );
}

.search-dropdown-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 2px;
    background: rgba(99, 102, 241, 0.3);
    border-radius: 0 0 2px 2px;
}

.dropdown-title {
    font-weight: 700;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.025em;
}

.dropdown-title::before {
    content: '';
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
    animation: smartPulse 2s ease-in-out infinite;
}

@keyframes smartPulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
        box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.2);
        box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
    }
}

.dropdown-close {
    background: rgba(248, 250, 252, 0.05);
    border: 1px solid rgba(248, 250, 252, 0.1);
    color: rgba(248, 250, 252, 0.7);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-close:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    transform: scale(1.05) rotate(90deg);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.search-results-container {
    max-height: 340px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
    padding: 8px 0;
    position: relative;
}

.search-results-container::before {
    content: '';
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.4), transparent);
    pointer-events: none;
    z-index: 1;
}

.search-results-container::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(0deg, rgba(30, 41, 59, 0.4), transparent);
    pointer-events: none;
    z-index: 1;
}

.search-results-container::-webkit-scrollbar {
    width: 6px;
}

.search-results-container::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 3px;
    margin: 8px 0;
}

.search-results-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, 
        rgba(99, 102, 241, 0.4), 
        rgba(168, 85, 247, 0.4)
    );
    border-radius: 3px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.search-results-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, 
        rgba(99, 102, 241, 0.6), 
        rgba(168, 85, 247, 0.6)
    );
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.3);
}

.search-result-item {
    display: flex;
    align-items: center;
    margin: 4px 12px;
    background: linear-gradient(135deg, 
        rgba(248, 250, 252, 0.03) 0%,
        rgba(226, 232, 240, 0.03) 100%
    );
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(8px);
}

.search-result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.02) 0%,
        rgba(168, 85, 247, 0.02) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.search-result-item:hover {
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.05) 0%,
        rgba(168, 85, 247, 0.03) 100%
    );
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.1);
}

.search-result-item:hover::before {
    opacity: 1;
}

.element-quiz-section {
    flex: 1;
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 12px 0 0 12px;
}

.element-quiz-section:hover {
    background: linear-gradient(90deg, 
        rgba(99, 102, 241, 0.08) 0%,
        rgba(59, 130, 246, 0.05) 100%
    );
}

.element-quiz-section::after {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 2px;
    background: linear-gradient(180deg, 
        rgba(99, 102, 241, 0.8) 0%,
        rgba(59, 130, 246, 0.8) 50%,
        rgba(99, 102, 241, 0.8) 100%
    );
    border-radius: 0 2px 2px 0;
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

.element-quiz-section:hover::after {
    transform: scaleY(1);
}

.element-quiz-section::before {
    content: '🧪';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 0.7rem;
    opacity: 0;
    transform: scale(0.8) rotate(-10deg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.element-quiz-section:hover::before {
    opacity: 0.6;
    transform: scale(1) rotate(0deg);
}

.element-report-section {
    padding: 14px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid rgba(148, 163, 184, 0.1);
    background: linear-gradient(135deg, 
        rgba(248, 250, 252, 0.02) 0%,
        rgba(226, 232, 240, 0.02) 100%
    );
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 85px;
    position: relative;
    border-radius: 0 12px 12px 0;
}

.element-report-section:hover {
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(245, 158, 11, 0.08) 100%
    );
    color: #f59e0b;
    transform: translateX(2px) scale(1.02);
}

.element-report-section::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    bottom: 10%;
    width: 2px;
    background: linear-gradient(180deg, 
        rgba(245, 158, 11, 0.8) 0%,
        rgba(251, 191, 36, 0.8) 50%,
        rgba(245, 158, 11, 0.8) 100%
    );
    border-radius: 2px 0 0 2px;
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.element-report-section:hover::after {
    transform: scaleY(1);
}

.element-report-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, 
        rgba(245, 158, 11, 0.6) 0%,
        transparent 70%
    );
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
}

.element-report-section:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(3);
}

.element-symbol {
    font-weight: 800;
    font-size: 1.15rem;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.15) 0%,
        rgba(59, 130, 246, 0.15) 100%
    );
    color: #6366f1;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1.5px solid rgba(99, 102, 241, 0.25);
    position: relative;
    transition: all 0.3s ease;
    letter-spacing: 0.025em;
}

.element-symbol::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.3),
        rgba(59, 130, 246, 0.3)
    );
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.search-result-item:hover .element-symbol::before {
    opacity: 1;
}

.search-result-item:hover .element-symbol {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.element-info {
    flex: 1;
    min-width: 0;
}

.element-name {
    font-weight: 600;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.975rem;
    margin-bottom: 3px;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.element-details {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
}

.element-atomic-number {
    background: linear-gradient(135deg, #f59e0b, #eab308);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    font-size: 0.75rem;
}

.element-classification {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 500;
    font-size: 0.75rem;
}

.element-details::before {
    content: '•';
    color: rgba(148, 163, 184, 0.4);
    font-weight: 600;
}

.report-icon {
    font-size: 1.2rem;
    opacity: 0.7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.2));
}

.element-report-section:hover .report-icon {
    opacity: 1;
    transform: rotate(8deg) scale(1.15);
    filter: drop-shadow(0 4px 8px rgba(245, 158, 11, 0.4));
}

.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    color: rgba(148, 163, 184, 0.8);
    gap: 12px;
}

.search-loading .loading-spinner {
    font-size: 1.5rem;
    animation: smartSpin 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    background: linear-gradient(45deg, #6366f1, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes smartSpin {
    0% { 
        transform: rotate(0deg) scale(1);
        filter: hue-rotate(0deg);
    }
    50% { 
        transform: rotate(180deg) scale(1.1);
        filter: hue-rotate(180deg);
    }
    100% { 
        transform: rotate(360deg) scale(1);
        filter: hue-rotate(360deg);
    }
}

.search-loading span:last-child {
    font-size: 0.85rem;
    font-weight: 500;
    background: linear-gradient(135deg, #94a3b8, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.025em;
}

.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: rgba(148, 163, 184, 0.7);
    text-align: center;
}

.no-results-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.4;
    filter: grayscale(0.3);
}

.no-results > div:first-of-type {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #94a3b8, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.no-results small {
    font-size: 0.8rem;
    opacity: 0.8;
    line-height: 1.4;
}

.search-dropdown-footer {
    padding: 12px 20px;
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.6) 0%,
        rgba(30, 41, 59, 0.6) 100%
    );
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 0 0 16px 16px;
    position: relative;
}

.search-dropdown-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(99, 102, 241, 0.3) 50%,
        transparent 100%
    );
}

.search-help-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.8);
    font-weight: 500;
    letter-spacing: 0.025em;
}

.help-icon {
    opacity: 0.7;
    font-size: 0.8rem;
    animation: helpPulse 3s ease-in-out infinite;
}

@keyframes helpPulse {
    0%, 100% { 
        opacity: 0.7; 
        transform: scale(1);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.1);
    }
}

.search-help-text span:last-child {
    background: linear-gradient(135deg, #94a3b8, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-highlight {
    background: linear-gradient(90deg, 
        rgba(245, 158, 11, 0.4) 0%, 
        rgba(251, 191, 36, 0.3) 50%,
        rgba(245, 158, 11, 0.2) 100%
    );
    color: #f59e0b;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 4px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
    letter-spacing: 0.025em;
}

/* Enhanced element classification indicators */
.alkali-metals-search { 
    border-left: 3px solid #ef4444; 
    box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.1);
}
.alkaline-earth-metals-search { 
    border-left: 3px solid #f97316; 
    box-shadow: inset 3px 0 0 rgba(249, 115, 22, 0.1);
}
.transition-metals-search { 
    border-left: 3px solid #3b82f6; 
    box-shadow: inset 3px 0 0 rgba(59, 130, 246, 0.1);
}
.post-transition-metals-search { 
    border-left: 3px solid #22c55e; 
    box-shadow: inset 3px 0 0 rgba(34, 197, 94, 0.1);
}
.metalloids-search { 
    border-left: 3px solid #a855f7; 
    box-shadow: inset 3px 0 0 rgba(168, 85, 247, 0.1);
}
.nonmetals-search { 
    border-left: 3px solid #06b6d4; 
    box-shadow: inset 3px 0 0 rgba(6, 182, 212, 0.1);
}
.halogens-search { 
    border-left: 3px solid #eab308; 
    box-shadow: inset 3px 0 0 rgba(234, 179, 8, 0.1);
}
.noble-gases-search { 
    border-left: 3px solid #78716c; 
    box-shadow: inset 3px 0 0 rgba(120, 113, 108, 0.1);
}
.lanthanides-search { 
    border-left: 3px solid #ec4899; 
    box-shadow: inset 3px 0 0 rgba(236, 72, 153, 0.1);
}
.actinides-search { 
    border-left: 3px solid #6366f1; 
    box-shadow: inset 3px 0 0 rgba(99, 102, 241, 0.1);
}

/* Advanced Ghost Search Container Styles */
.advanced-search-container {
    position: relative;
    flex: 1;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
}

.search-input-wrapper .fas {
    position: absolute;
    right: 12px;
    color: #667eea;
    transition: all 0.3s ease;
    z-index: 10;
    pointer-events: none;
}

.search-input-wrapper .fas.fa-spinner {
    animation: spin 1s linear infinite;
}

.search-input-wrapper .fas.fa-check {
    color: #28a745;
    animation: checkPulse 0.5s ease-in-out;
}

@keyframes checkPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.search-input-wrapper .fas.loading {
    color: #ffc107;
    animation: spin 1s linear infinite;
}

.search-input-wrapper .fas.found {
    color: #28a745;
}

.search-input-wrapper .fas.error {
    color: #dc3545;
}

#elementTextSearch {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    position: relative;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 12px 45px 12px 15px;
    font-size: 1rem;
    width: 100%;
    outline: none;
    color: #333;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

#elementTextSearch:focus {
    border-color: #4facfe;
    box-shadow: 0 0 0 4px rgba(79, 172, 254, 0.1), 
                0 8px 25px rgba(102, 126, 234, 0.25);
    transform: translateY(-1px);
}

#elementTextSearch:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

#searchDropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 35px rgba(102, 126, 234, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    transform: translateY(-5px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    scroll-behavior: smooth;
}

#searchDropdown.show {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

#searchDropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(255, 255, 255, 0.95);
    z-index: 1001;
}

.ghost-search-item {
    padding: 14px 18px;
    color: #333;
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ghost-search-item:last-child {
    border-bottom: none;
}

.ghost-search-item:hover,
.ghost-search-item.highlighted {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(79, 172, 254, 0.08) 100%);
    color: #4facfe;
    transform: translateX(6px);
    box-shadow: inset 4px 0 0 rgba(79, 172, 254, 0.6);
}

.ghost-search-item.highlighted {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.18) 0%, rgba(79, 172, 254, 0.12) 100%);
    box-shadow: inset 4px 0 0 rgba(79, 172, 254, 0.8);
}

.ghost-search-item-word {
    font-weight: 600;
    letter-spacing: 0.3px;
}

.ghost-search-item-indicator {
    font-size: 0.75rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    color: #667eea;
    font-weight: 500;
}

.ghost-search-item:hover .ghost-search-item-indicator,
.ghost-search-item.highlighted .ghost-search-item-indicator {
    opacity: 1;
    background: rgba(79, 172, 254, 0.15);
    color: #4facfe;
}

.ghost-search-loading {
    padding: 20px;
    text-align: center;
    color: #667eea;
    font-size: 0.9rem;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ghost-search-no-results {
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ghost-search-hints {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.7rem;
    color: rgba(102, 126, 234, 0.6);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#elementTextSearch:focus + * .ghost-search-hints {
    opacity: 1;
}

#searchDropdown::-webkit-scrollbar {
    width: 6px;
}

#searchDropdown::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 3px;
}

#searchDropdown::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

#searchDropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

.search-refresh-btn,
.data-export-btn,
.data-import-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.search-refresh-btn:hover,
.data-export-btn:hover,
.data-import-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.search-refresh-btn:active,
.data-export-btn:active,
.data-import-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

@media (max-width: 768px) {
    .dynamic-search-dropdown {
        left: -12px;
        right: -12px;
        max-height: 360px;
        border-radius: 20px;
        box-shadow: 
            0 20px 40px -8px rgba(0, 0, 0, 0.7),
            0 8px 20px -4px rgba(0, 0, 0, 0.4),
            0 0 0 1px rgba(255, 255, 255, 0.08);
    }

    #searchDropdown {
        max-height: 250px;
    }
    
    .ghost-search-item {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .ghost-search-item-indicator {
        font-size: 0.7rem;
        padding: 1px 6px;
    }
    
    .ghost-search-hints {
        display: none;
    }
}
    
    .search-dropdown-header {
        padding: 18px 24px;
        border-radius: 20px 20px 0 0;
    }
    
    .search-results-container {
        max-height: 300px;
        padding: 12px 0;
    }
    
    .search-result-item {
        margin: 6px 16px;
        border-radius: 16px;
    }
    
    .element-quiz-section {
        padding: 16px 20px;
        gap: 16px;
        border-radius: 16px 0 0 16px;
    }
    
    .element-report-section {
        padding: 16px 22px;
        min-width: 90px;
        border-radius: 0 16px 16px 0;
    }
    
    .element-symbol {
        min-width: 42px;
        height: 42px;
        font-size: 1.2rem;
        border-radius: 12px;
    }
    
    .element-name {
        font-size: 1rem;
        margin-bottom: 4px;
    }
    
    .element-details {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }
    
    .element-atomic-number,
    .element-classification {
        font-size: 0.8rem;
    }
    
    .search-dropdown-footer {
        padding: 16px 24px;
        border-radius: 0 0 20px 20px;
    }
    
    .search-help-text {
        font-size: 0.8rem;
        gap: 10px;
    }
    
    .dropdown-title {
        font-size: 1rem;
    }
    
    .dropdown-close {
        width: 32px;
        height: 32px;
        padding: 8px;
        border-radius: 10px;
    }
}

.order-dropdown:focus {
    outline: none;
    border-color: var(--info-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    transform: translateY(-1px);
}

.order-dropdown:hover {
    border-color: var(--info-color);
    transform: translateY(-1px);
}

.order-dropdown option {
    padding: 0.5rem;
    background: white;
    color: #333;
}

.order-dropdown option:disabled {
    color: #999;
    font-weight: 600;
}

.controls-divider {
    width: 1px;
    height: 40px;
    background: rgba(0,0,0,0.15);
    margin: 0 0.5rem;
}

.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 0.5rem;
    box-shadow: var(--shadow-light);
    border: 2px solid rgba(102, 126, 234, 0.2);
    transition: var(--transition);
}

.search-container:focus-within {
    border-color: var(--info-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    transform: translateY(-1px);
}

.search-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.search-label-icon {
    font-size: 1rem;
}

.search-input {
    width: 80px;
    padding: 0.4rem 0.6rem;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: var(--info-color);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.search-input.element-number {
    width: 60px;
}

.search-divider {
    width: 1px;
    height: 24px;
    background: rgba(0,0,0,0.15);
    margin: 0 0.5rem;
}

.search-go-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.search-go-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.search-go-btn:active {
    transform: translateY(0);
}

.search-go-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.search-go-icon {
    font-size: 1rem;
    animation: searchPulse 2s infinite;
}

@keyframes searchPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Search Notifications */
.search-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1001;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-heavy);
    border-left: 4px solid var(--info-color);
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.search-notification.error {
    border-left-color: var(--error-color);
}

.search-notification.success {
    border-left-color: var(--success-color);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

.notification-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notification-message {
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
}

/* Navigation Controls */
.nav-controls {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    background: white;
    color: #666;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
    font-weight: 500;
}

.nav-btn:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.nav-btn.primary {
    background: var(--primary-gradient);
    color: white;
}

.nav-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* Main Content Container with Dashboard */
.main-content-container {
    flex: 1;
    display: flex;
    gap: 0.75rem; /* Reduced gap to allow score container margins to work */
    padding: 0 0.75rem;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    max-width: 1600px; /* Increased to accommodate 4 containers */
    margin: 0 auto;
}

/* Original Chemistry Logo Container - now hidden */
.chemistry-logo-container {
    display: none;
}

/* New Chemistry Logo Container - Top Left with Original Styling */
.chemistry-logo-container-new {
    position: fixed;
    left: 20px;
    top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    max-width: 220px;
    height: fit-content;
    z-index: 1000;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: logoFloat 6s ease-in-out infinite;
}

.chemistry-logo-container-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ff6b6b 100%);
    transition: background 0.5s ease;
}

.chemistry-logo-container-new:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.chemistry-logo-container-new .chemistry-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: logoFloat 6s ease-in-out infinite;
}

.chemistry-logo-container-new .logo-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-top: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: logoFloat 6s ease-in-out infinite;
}

.chemistry-logo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ff6b6b 100%);
    transition: background 0.5s ease;
}

.chemistry-logo-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.chemistry-logo {
    width: 120px;
    height: 120px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.chemistry-logo:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.logo-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    text-align: center;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    -webkit-text-fill-color: white;
}

@keyframes logoFloat {
    0%, 100% { 
        transform: translateY(0);
    }
    50% { 
        transform: translateY(-10px);
    }
}

/* Slides Container */
.slides-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-width: 0; /* Allow flex shrinking */
    max-width: 950px; /* Increased for better layout with new fields */
}

/* Left Side Flex Container */
.left-side-flex-container {
    position: fixed;
    left: 1rem;
    top: 17rem;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: fit-content;
}

/* Logo Container */
.container-8h1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.logo-y8w {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.title-chs {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin-top: 0.5rem;
    text-align: center;
}

/* Homepage Button - Cyber-Voxel Style */
.btn-wwa {
    display: flex;
    text-decoration: none;
    background: linear-gradient(135deg, var(--cyber-dark-3), var(--cyber-dark-4));
    border-radius: var(--voxel-radius-md);
    padding: var(--voxel-2x);
    box-shadow: var(--voxel-shadow-md), var(--glow-cyber-cyan);
    border: 3px solid var(--cyber-cyan);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-width: 200px;
    max-width: 250px;
}

/* Scanline effect on button */
.btn-wwa::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 243, 255, 0.05),
        rgba(0, 243, 255, 0.05) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 1;
}

.content-51r {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
}

.section-h4p {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.main-ya6 {
    font-size: 2rem;
    filter: drop-shadow(0 0 15px var(--cyber-cyan));
    animation: homeIconFloat 3s ease-in-out infinite;
}

@keyframes homeIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.icon-he6 {
    font-size: 1.2rem;
    color: var(--cyber-yellow);
    filter: drop-shadow(0 0 10px var(--cyber-yellow));
}

.section-swi {
    flex: 1;
}

.title-dv9 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--cyber-cyan);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 15px var(--cyber-cyan);
}

.subtitle-x99 {
    font-size: 0.75rem;
    color: var(--cyber-yellow);
    margin: 2px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px var(--cyber-yellow);
}

.row-kne {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.icon-t57 {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.text-xh9 {
    font-size: 0.7rem;
    color: var(--cyber-cyan);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px var(--cyber-cyan);
}

.btn-xoq, .btn-qrv {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.btn-wwa:hover {
    transform: translateY(-8px);
    box-shadow: var(--voxel-shadow-lg), var(--glow-synthwave);
    border-color: var(--cyber-magenta);
    background: linear-gradient(135deg, var(--cyber-dark-2), var(--cyber-dark-3));
}

.btn-wwa:hover .icon-t57 {
    transform: translateX(-5px);
    color: var(--cyber-magenta);
}

.btn-wwa:hover .title-dv9 {
    color: var(--cyber-magenta);
    text-shadow: 0 0 20px var(--cyber-magenta);
}

.btn-wwa:hover .subtitle-x99 {
    color: var(--cyber-cyan);
}

@keyframes floatIn {
    0% {
        opacity: 0;
        transform: translateX(-100px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.home-website-btn {
    display: flex;
    text-decoration: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ff6b6b 100%);
    border-radius: 20px;
    padding: 0.75rem 1rem;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-width: 200px;
    max-width: 250px;
}

.home-website-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #ff6b6b 50%, #667eea 100%);
    border-color: rgba(255, 255, 255, 0.6);
    animation: none; /* Stop subtle attention animation on hover */
}

.home-website-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.home-btn-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    position: relative;
    z-index: 2;
}

.home-btn-icon-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.home-icon-main {
    font-size: 1.8rem;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.home-icon-chemistry {
    font-size: 1rem;
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    transition: all 0.3s ease;
    animation: chemistryBounce 2s ease-in-out infinite;
}

@keyframes chemistryBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-3px) rotate(10deg); }
}

.home-website-btn:hover .home-icon-main {
    transform: scale(1.2) rotate(-10deg);
    animation: homeIconPulse 0.6s ease infinite;
}

.home-website-btn:hover .home-icon-chemistry {
    transform: scale(1.3) rotate(360deg);
    animation: none;
}

@keyframes homeIconPulse {
    0%, 100% { transform: scale(1.2) rotate(-10deg); }
    50% { transform: scale(1.3) rotate(-15deg); }
}

.home-btn-text-section {
    flex: 1;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.home-btn-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
    letter-spacing: 0.5px;
}

.home-btn-subtitle {
    font-size: 0.7rem;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.home-btn-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    transition: all 0.3s ease;
}

.arrow-icon {
    font-size: 1.2rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.go-text {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.home-website-btn:hover .home-btn-arrow {
    transform: translateX(5px);
}

.home-website-btn:hover .arrow-icon {
    animation: arrowBounce 0.8s ease infinite;
    color: rgba(255, 255, 255, 1);
}

@keyframes arrowBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(3px); }
}

.home-btn-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    border-radius: 20px;
    pointer-events: none;
}

.home-website-btn:hover .home-btn-glow {
    transform: translateX(100%);
}

/* Pulsing border animation */
.home-website-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #f9ca24, #f0932b, #eb4d4b, #6c5ce7);
    border-radius: 22px;
    z-index: -1;
    animation: borderRotate 3s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.home-website-btn:hover::before {
    opacity: 0.7;
}

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

/* Attention grabbing animation */
.home-website-btn {
    animation: subtleAttention 4s ease-in-out infinite;
}

@keyframes subtleAttention {
    0%, 100% { 
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
        transform: translateY(0);
    }
    50% { 
        box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
        transform: translateY(-1px);
    }
}



/* Special sparkle effect */
.home-website-btn::after {
    content: '✨';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.8rem;
    opacity: 0;
    animation: sparkle 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sparkle {
    0%, 90%, 100% { 
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    45%, 55% { 
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

.home-website-btn:hover::after {
    animation: sparkleHover 0.6s ease infinite;
}

@keyframes sparkleHover {
    0%, 100% { 
        opacity: 0.7;
        transform: scale(0.8) rotate(0deg);
    }
    50% { 
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
}

/* Pulse ring effect */
.home-btn-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    animation: pulseRing 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulseRing {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.home-website-btn:hover .home-btn-pulse-ring {
    animation: none;
    opacity: 0;
}

/* Score Display Container */
.score-display-container {
    width: 280px;
    min-width: 260px;
    max-width: 300px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 215, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.4);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    align-self: center;
    height: fit-content;
    animation: scoreContainerFloat 4s ease-in-out infinite;
    /* Centered positioning between element and dashboard containers */
    margin-left: 2.5rem;
    margin-right: 2.5rem;
}

.score-display-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FF6B6B, #4ECDC4, #45B7D1, #96CEB4, #FECA57);
    background-size: 400% 400%;
    border-radius: 22px;
    z-index: -1;
    animation: gradientShift 3s ease infinite;
    opacity: 0.7;
}

.score-display-container:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 215, 0, 0.5);
    border-color: rgba(255, 215, 0, 0.6);
}

@keyframes scoreContainerFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Score Display Header */
.score-display-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 18px 18px 0 0;
    margin: -1px -1px 0 -1px;
    position: relative;
    overflow: hidden;
}

.score-display-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: scoreHeaderShimmer 2s ease-in-out infinite;
}

@keyframes scoreHeaderShimmer {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

.score-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.score-icon {
    font-size: 1.2rem;
    animation: scoreIconPulse 2s ease-in-out infinite;
}

@keyframes scoreIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.score-element-indicator {
    background: rgba(255, 255, 255, 0.9);
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.score-status-mini {
    display: inline-block;
    margin-right: 0.3rem;
    font-size: 1rem;
    animation: statusPulse 1.5s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.8); }
}

/* Score Display Content */
.score-display-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Main Score Section */
.main-score-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.score-circle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
}

.score-ring {
    transform: rotate(-90deg);
    overflow: visible;
}

.score-ring-background {
    fill: none;
    stroke: rgba(0, 0, 0, 0.1);
    stroke-width: 8;
}

.score-ring-progress {
    fill: none;
    stroke: url(#scoreGradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 1s ease-in-out;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.6));
}

.score-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, #FFD700, #FF6B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: scoreTextPulse 2s ease-in-out infinite;
}

@keyframes scoreTextPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

/* Score Stats */
.score-stats {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    width: 100%;
}

.score-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.6);
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 60px;
}

.score-stat-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 1.2rem;
    animation: statIconFloat 3s ease-in-out infinite;
}

.score-stat-item:nth-child(1) .stat-icon { animation-delay: 0s; }
.score-stat-item:nth-child(2) .stat-icon { animation-delay: 1s; }
.score-stat-item:nth-child(3) .stat-icon { animation-delay: 2s; }

@keyframes statIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

/* Achievements Section */
.achievements-section {
    margin-top: 0.5rem;
}

.achievement-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.75rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.achievement-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.achievement-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.3rem;
    border-radius: 10px;
    transition: all 0.4s ease;
    background: rgba(200, 200, 200, 0.3);
    border: 1px solid rgba(200, 200, 200, 0.5);
    min-height: 60px;
    justify-content: center;
}

.achievement-badge.locked {
    opacity: 0.4;
    filter: grayscale(100%);
}

.achievement-badge.unlocked {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-color: #FFD700;
    opacity: 1;
    filter: none;
    animation: badgeUnlock 0.6s ease-out;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

@keyframes badgeUnlock {
    0% { transform: scale(0.5) rotate(-180deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(-90deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.badge-icon {
    font-size: 1.2rem;
    margin-bottom: 0.1rem;
}

.badge-text {
    font-size: 0.65rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    line-height: 1.1;
}

.achievement-badge.unlocked .badge-icon {
    animation: badgeIconGlow 2s ease-in-out infinite;
}

@keyframes badgeIconGlow {
    0%, 100% { text-shadow: 0 0 5px rgba(255, 215, 0, 0.8); }
    50% { text-shadow: 0 0 15px rgba(255, 215, 0, 1), 0 0 25px rgba(255, 215, 0, 0.8); }
}

/* SVG Gradient Definition (will be added via JavaScript) */
.score-ring defs {
    display: block;
}

/* Quiz Dashboard */
.quiz-dashboard {
    width: 300px;
    min-width: 280px;
    max-width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: var(--shadow-heavy);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    flex-shrink: 0;
    align-self: center;
    height: fit-content;
}

.quiz-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transition: background 0.5s ease;
}

/* Dashboard Header */
.dashboard-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(248,249,250,0.9));
}

.dashboard-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: #333;
}

.dashboard-icon {
    font-size: 1.2rem;
    animation: dashboardPulse 3s ease-in-out infinite;
}

@keyframes dashboardPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.dashboard-element-indicator {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 1.2rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    background: var(--primary-gradient);
    transition: all 0.5s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
}

.dashboard-content::-webkit-scrollbar {
    width: 6px;
}

.dashboard-content::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-content::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

/* Dashboard Sections */
.dashboard-section {
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    padding: 1rem;
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

.dashboard-section:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.section-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.section-title {
    font-weight: 600;
    color: #333;
    flex: 1;
}

.section-toggle {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    transition: var(--transition);
}

.section-toggle:hover {
    background: rgba(0,0,0,0.1);
    transform: scale(1.1);
}

/* Timer Section */
.timer-section {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 152, 0, 0.1));
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.timer-controls {
    transition: var(--transition);
}

.timer-controls.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
}

.timer-display {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border: 2px solid rgba(255, 193, 7, 0.3);
}

.time-remaining {
    font-size: 2.5rem;
    font-weight: 900;
    color: #ff6b35;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
    margin-bottom: 0.25rem;
}

.time-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Timer Settings */
.timer-settings {
    margin-bottom: 1.5rem;
}

.setting-group {
    margin-bottom: 1rem;
}

.setting-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
}

.timer-input, .scope-select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
    background: white;
}

.timer-input:focus, .scope-select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Range Settings */
.range-settings {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 0.5rem;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.range-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}

.range-separator {
    color: #ff6b35;
    font-weight: bold;
    font-size: 1.1rem;
}

.range-info {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    font-weight: 500;
}

/* Quiz Status Info */
.quiz-status-info {
    background: rgba(33, 150, 243, 0.1);
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid rgba(33, 150, 243, 0.2);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.status-item:last-child {
    margin-bottom: 0;
}

.status-icon {
    font-size: 0.9rem;
}

.status-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
}

/* Timer Actions */
.timer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.timer-btn {
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
}

.timer-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.timer-btn:hover::before {
    left: 100%;
}

.timer-btn.start {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.timer-btn.start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(76, 175, 80, 0.4);
}

.timer-btn.pause {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.timer-btn.resume {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.timer-btn.stop {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.timer-btn.refresh {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: white;
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
}



.timer-btn.force-reset {
    background: linear-gradient(135deg, #8e44ad, #9b59b6), 
                radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    color: white;
    box-shadow: 0 6px 20px rgba(142, 68, 173, 0.6), 
                0 0 30px rgba(142, 68, 173, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.5);
    grid-column: 1 / -1;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 1.2rem 1.8rem;
    animation: purplePulse 2s ease-in-out infinite;
    transform: scale(1.08);
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.timer-btn.force-reset:hover {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    box-shadow: 0 8px 25px rgba(142, 68, 173, 0.8), 0 0 40px rgba(142, 68, 173, 0.5);
    transform: translateY(-4px) scale(1.08);
    border-color: rgba(255, 255, 255, 0.7);
    animation: purpleGlow 1s ease-in-out infinite;
}

.timer-btn.force-reset::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    animation: shimmer 3s ease-in-out infinite;
    z-index: 1;
}

.timer-btn.force-reset::after {
    content: '⚡';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    opacity: 0.9;
    animation: purpleSparkle 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(155, 89, 182, 0.8));
}

.timer-btn.force-reset .btn-icon,
.timer-btn.force-reset .btn-text {
    position: relative;
    z-index: 2;
}

@keyframes purplePulse {
    0%, 100% { 
        box-shadow: 0 6px 20px rgba(142, 68, 173, 0.6), 0 0 30px rgba(142, 68, 173, 0.3);
    }
    50% { 
        box-shadow: 0 8px 25px rgba(142, 68, 173, 0.9), 0 0 50px rgba(142, 68, 173, 0.6);
    }
}

@keyframes purpleSparkle {
    0%, 100% { 
        opacity: 0.9;
        transform: translateY(-50%) scale(1) rotate(0deg);
    }
    50% { 
        opacity: 1;
        transform: translateY(-50%) scale(1.2) rotate(10deg);
    }
}

@keyframes purpleGlow {
    0%, 100% { 
        box-shadow: 0 8px 25px rgba(142, 68, 173, 0.8), 0 0 40px rgba(142, 68, 173, 0.5);
    }
    50% { 
        box-shadow: 0 10px 30px rgba(142, 68, 173, 1), 0 0 60px rgba(142, 68, 173, 0.8);
    }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Reset Info Banner */
.reset-info-banner {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.1), rgba(255, 71, 87, 0.05));
    border: 2px dashed rgba(255, 71, 87, 0.3);
    border-radius: 8px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #ff4757;
    font-weight: 600;
    animation: bannerFloat 3s ease-in-out infinite;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.banner-icon {
    font-size: 1.1rem;
    animation: iconSpin 2s ease-in-out infinite;
}

.banner-text {
    flex-grow: 1;
    letter-spacing: 0.3px;
}

.banner-arrow {
    font-size: 1.2rem;
    animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes bannerFloat {
    0%, 100% { 
        transform: translateY(0px);
        border-color: rgba(255, 71, 87, 0.3);
    }
    50% { 
        transform: translateY(-2px);
        border-color: rgba(255, 71, 87, 0.5);
    }
}

@keyframes iconSpin {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
}

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-3px) scale(1.1); }
}

.timer-btn:hover {
    transform: translateY(-2px);
}

.timer-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1rem;
}

.btn-text {
    font-weight: 600;
}

.slides-wrapper {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
}

.slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    position: relative;
}

/* Element Card */
.element-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1rem 1.5rem;
    max-width: 850px;
    width: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideIn 0.4s ease;
    margin: 0 auto;
    align-self: center;
    /* ⚡ PERFORMANCE: Optimize rendering */
    contain: layout style paint;
    will-change: transform, opacity;
    transform: translateZ(0);
}

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

.element-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

/* Element Header */
.element-header {
    text-align: center;
    margin-bottom: 0.75rem;
    position: relative;
}

/* Prompt Copy Buttons */
.prompt-copy-btn {
    position: absolute;
    top: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.prompt-copy-btn-english {
    right: 0;
}

.prompt-copy-btn-arabic {
    right: 40px;
    background: rgba(76, 175, 80, 0.2);
}

.prompt-copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.prompt-copy-btn-arabic:hover {
    background: rgba(76, 175, 80, 0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.prompt-copy-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.4);
}

.prompt-copy-btn-arabic:active {
    transform: scale(0.95);
    background: rgba(76, 175, 80, 0.4);
}

.element-number {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.element-symbol-display {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0.15rem 0;
    padding: 0.6rem 1rem;
    border-radius: var(--border-radius);
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.element-symbol-display .symbol-text {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.element-symbol-display .symbol-divider {
    font-size: 2rem;
    font-weight: 300;
    opacity: 0.6;
    margin: 0 0.2rem;
}

.element-symbol-display .symbol-arabic {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Segoe UI', 'Tahoma', 'Arial', 'Simplified Arabic', 'Traditional Arabic', 'Arabic Typesetting', sans-serif;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
    direction: rtl;
}

.element-classification {
    display: none !important;
}

/* Element Classification Colors */
.alkali-metals { background: linear-gradient(135deg, #ff6b6b, #ff5252); }
.alkaline-earth-metals { background: linear-gradient(135deg, #ffa726, #ff9800); }
.transition-metals { background: linear-gradient(135deg, #42a5f5, #2196f3); }
.post-transition-metals { background: linear-gradient(135deg, #66bb6a, #4caf50); }
.metalloids { background: linear-gradient(135deg, #ab47bc, #9c27b0); }
.nonmetals { background: linear-gradient(135deg, #26c6da, #00bcd4); }
.halogens { background: linear-gradient(135deg, #ffca28, #ffc107); color: #333; }
.noble-gases { background: linear-gradient(135deg, #8d6e63, #795548); }
.lanthanides { background: linear-gradient(135deg, #ec407a, #e91e63); }
.actinides { background: linear-gradient(135deg, #5c6bc0, #3f51b5); }

/* Checkpoint System */
.checkpoint-container {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.checkpoint-marker {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 6px 14px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
}

.checkpoint-marker::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s;
}

.checkpoint-marker:hover::before {
    left: 100%;
}

.checkpoint-marker:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.checkpoint-marker.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: rgba(255,255,255,0.2);
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3); }
    50% { box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6); }
}

.checkpoint-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkpoint-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    margin: 0;
    transition: all 0.3s ease;
}

.checkpoint-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.checkpoint-marker:hover .checkpoint-icon {
    transform: scale(1.2) rotate(15deg);
}

.checkpoint-marker.active .checkpoint-icon {
    animation: pinBounce 0.6s ease;
}

@keyframes pinBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) scale(1); }
    40% { transform: translateY(-8px) scale(1.1); }
    60% { transform: translateY(-4px) scale(1.05); }
}

.checkpoint-text {
    font-size: 0.85rem;
    white-space: nowrap;
}

.checkpoint-marker.active .checkpoint-text {
    font-weight: 600;
}

/* Checkpoint Dropdown in Navigation */
.checkpoint-dropdown-container {
    position: relative;
    display: flex;
    align-items: center;
    animation: fadeIn 0.5s ease;
}

.checkpoint-dropdown {
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
    color: white;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    outline: none;
    min-width: 160px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='white' d='M6 8L2 4h8z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.checkpoint-dropdown:hover {
    background: linear-gradient(135deg, #ff5252, #ff9800);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.checkpoint-dropdown:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.3);
}

.checkpoint-dropdown option {
    background: white;
    color: #333;
    padding: 8px 12px;
    font-weight: 500;
}

.checkpoint-dropdown optgroup {
    background: #f5f5f5;
    color: #666;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 4px 8px;
}

/* Animated icon for checkpoint dropdown */
.checkpoint-dropdown-container::before {
    content: '📌';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    animation: pinPulse 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes pinPulse {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.1); }
}

.checkpoint-dropdown {
    padding-left: 32px; /* Make room for the pin icon */
}

/* Checkpoint Notifications */
.checkpoint-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    border-left: 4px solid var(--info-color);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 350px;
    font-size: 0.9rem;
}

.checkpoint-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.checkpoint-notification.warning {
    border-left-color: var(--warning-color);
    background: rgba(255, 248, 225, 0.95);
}

.checkpoint-notification.error {
    border-left-color: var(--error-color);
    background: rgba(255, 235, 238, 0.95);
}

.notification-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notification-message {
    font-weight: 500;
    color: #333;
}

/* Quiz Fields */
.quiz-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.quiz-field {
    position: relative;
}

.quiz-field.full-width {
    grid-column: 1 / -1;
}

/* Electron Shells Row */
.electron-shells-row {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.electron-shells-row > label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.75rem;
    display: block;
}

.shells-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.shell-input-group {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.shell-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #667eea;
    min-width: 20px;
    margin: 0;
}

.shell-input {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    text-align: center;
    font-weight: 600;
    padding: 0.3rem 0.2rem !important;
}

.shell-separator {
    font-size: 1.1rem;
    font-weight: bold;
    color: #764ba2;
    margin: 0 0.2rem;
}

.shell-equals {
    font-size: 1.3rem;
    font-weight: bold;
    color: #4caf50;
    margin: 0 0.5rem;
}

.shell-total-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #4caf50, #45a049);
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    border: 2px solid rgba(76, 175, 80, 0.5);
}

.shell-total-group .shell-label {
    color: white;
    font-weight: 700;
}

.shell-total-value {
    font-size: 1rem;
    font-weight: 800;
    color: white;
    min-width: 40px;
    text-align: center;
}

.quiz-field label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
}

.quiz-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    /* ⚡ PERFORMANCE: Optimized transition */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: white;
    will-change: border-color;
}

/* Compact inputs for small fields */
.quiz-input.compact {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
}

/* Small width inputs for single character or short answers */
.quiz-input.small {
    max-width: 80px;
    min-width: 60px;
}

.quiz-input:focus {
    outline: none;
    border-color: var(--info-color);
    /* ⚡ PERFORMANCE: Simplified shadow */
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.quiz-input.correct {
    border-color: var(--success-color);
    background: rgba(76, 175, 80, 0.05);
    color: var(--success-color);
    font-weight: 600;
}

.quiz-input.incorrect {
    border-color: var(--error-color);
    background: rgba(244, 67, 54, 0.05);
    color: var(--error-color);
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Special Input Groups */
.input-group {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.input-group .quiz-input {
    flex: 1;
    min-width: 0;
    padding: 0.4rem 0.6rem;
}

.input-separator {
    color: #999;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Original Floating Pop-up Help System - now hidden */
.help-popup {
    display: none;
}

/* New Help Popup Container - Next to Quiz Element */
.help-popup-container-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 1rem;
    min-width: 450px !important;
    max-width: 470px !important;
    width: 470px !important;
    height: fit-content;
}

/* New Help Popup Styling */
.help-popup-new {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    backdrop-filter: blur(15px);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.1rem;
    line-height: 1.6;
    height: auto;
    overflow-y: visible;
}

.help-popup-new.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: auto;
}

.help-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0) scale(1);
    pointer-events: auto;
}

.help-popup::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -10px;
    transform: translateY(-50%);
    border: 10px solid transparent;
    border-left-color: rgba(102, 126, 234, 0.9);
}

.help-popup-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    font-weight: 700;
    font-size: 1.3rem;
}

.help-popup-icon {
    font-size: 2rem;
    margin-right: 0.75rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.help-popup-content {
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.help-popup-examples {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    border-left: 3px solid rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    line-height: 1.5;
}

.help-popup-examples h6 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 600;
}

.help-examples-grid {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 0.75rem 1rem;
    font-size: 1rem;
}

.help-example-key {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.help-example-value {
    color: rgba(255, 255, 255, 0.8);
}

.help-popup-note {
    font-size: 0.9rem;
    opacity: 0.8;
    font-style: italic;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Enhanced focus states for inputs */
.quiz-input:focus {
    outline: none;
    border-color: var(--info-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    transform: translateY(-1px);
}

/* Pop-up variations for different field types */
.help-popup.symbol-help {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.95), rgba(67, 160, 71, 0.95));
}

.help-popup.symbol-help::before {
    border-left-color: rgba(76, 175, 80, 0.9);
}

.help-popup.name-help {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.95), rgba(142, 36, 170, 0.95));
}

.help-popup.name-help::before {
    border-left-color: rgba(156, 39, 176, 0.9);
}

.help-popup.mass-help {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.95), rgba(245, 124, 0, 0.95));
}

.help-popup.mass-help::before {
    border-left-color: rgba(255, 152, 0, 0.9);
}

.help-popup.properties-help {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.95), rgba(229, 57, 53, 0.95));
}

.help-popup.properties-help::before {
    border-left-color: rgba(244, 67, 54, 0.9);
}

.help-popup.abundance-help {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.95), rgba(67, 160, 71, 0.95));
}

.help-popup.abundance-help::before {
    border-left-color: rgba(76, 175, 80, 0.9);
}

.help-popup.cost-help {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.95), rgba(255, 152, 0, 0.95));
}

.help-popup.cost-help::before {
    border-left-color: rgba(255, 193, 7, 0.9);
}

.help-popup.magnetic-help {
    background: linear-gradient(135deg, rgba(63, 81, 181, 0.95), rgba(57, 73, 171, 0.95));
}

.help-popup.magnetic-help::before {
    border-left-color: rgba(63, 81, 181, 0.9);
}

.help-popup.electrical-help {
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.95), rgba(0, 172, 193, 0.95));
}

.help-popup.electrical-help::before {
    border-left-color: rgba(0, 188, 212, 0.9);
}

.help-popup.thermal-help {
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.95), rgba(244, 67, 54, 0.95));
}

.help-popup.thermal-help::before {
    border-left-color: rgba(255, 87, 34, 0.9);
}

/* Action Buttons */
.quiz-actions {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    border-top: 2px solid #e0e0e0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0 0 15px 15px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    flex-wrap: nowrap;
    overflow-x: auto;
    position: relative;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modern Action Buttons */
.action-btn-modern {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    min-height: 44px;
    max-width: 200px;
    flex: 0 1 auto;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    text-align: center;
    /* ⚡ PERFORMANCE: Optimized transition - only animate specific properties */
    transition: transform 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: visible;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    /* ⚡ PERFORMANCE: GPU acceleration hint */
    will-change: transform;
    transform: translateZ(0);
}

/* Full Text Button - Show Answers */
.action-btn-full-text {
    flex: 0 1 auto !important;
    min-width: 140px;
    max-width: 200px;
    padding: 0.75rem 1.25rem !important;
    font-size: 0.85rem !important;
}

.action-btn-full-text .btn-text {
    display: inline-block !important;
}

.action-btn-full-text .btn-icon {
    font-size: 1.2rem;
}

/* Icon-Only Buttons - Report, Reset, Next */
.action-btn-icon-only {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    min-height: 48px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    gap: 0 !important;
    flex: none !important;
    position: relative;
    overflow: visible;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.action-btn-icon-only .btn-text {
    display: none !important;
}

.action-btn-icon-only .btn-icon {
    font-size: 1.5rem !important;
    margin: 0 !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Old icon-only class for backward compatibility */
.action-btn-modern.icon-only .btn-text {
    display: none;
}

.action-btn-modern.icon-only {
    width: 50px;
    height: 50px;
    min-height: 50px;
    max-width: 50px;
    padding: 0;
    border-radius: 50%;
    gap: 0;
    flex: none;
    position: relative;
    overflow: visible;
}

.action-btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
    pointer-events: none;
}

.action-btn-modern:hover::before {
    left: 100%;
}

.action-btn-modern:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.action-btn-modern:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

.btn-icon {
    font-size: 1rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.action-btn-modern.icon-only .btn-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.action-btn-modern:hover .btn-icon {
    transform: scale(1.1) rotate(5deg);
}

.action-btn-modern.icon-only:hover .btn-icon {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.4));
}

/* Icon-Only Buttons Hover Effects */
.action-btn-icon-only:hover {
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
}

.action-btn-icon-only:active {
    transform: translateY(0) scale(0.95) !important;
}

.action-btn-icon-only:hover .btn-icon {
    transform: scale(1.15) rotate(8deg);
}

/* Specific Colors for Icon-Only Buttons */
.action-btn-icon-only.btn-info {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%) !important;
}

.action-btn-icon-only.btn-warning {
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%) !important;
}

.action-btn-icon-only.btn-primary {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%) !important;
}

.action-btn-icon-only.btn-info:hover {
    background: linear-gradient(135deg, #e84393 0%, #d63031 100%) !important;
}

.action-btn-icon-only.btn-warning:hover {
    background: linear-gradient(135deg, #e17055 0%, #d63031 100%) !important;
}

.action-btn-icon-only.btn-primary:hover {
    background: linear-gradient(135deg, #00cec9 0%, #0984e3 100%) !important;
}

.btn-text {
    display: inline-block;
    position: relative;
    z-index: 2;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    font-size: 0.75rem;
    line-height: 1.2;
}

.btn-icon {
    display: inline-block;
}

/* Responsive Design for Action Buttons */
@media (max-width: 768px) {
    .quiz-actions {
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        flex-wrap: nowrap;
        justify-content: space-evenly;
    }
    
    /* Show Answers Button */
    .action-btn-full-text {
        flex: 0 1 auto !important;
        min-width: 100px !important;
        max-width: 130px !important;
    }
    
    /* Icon-Only Buttons */
    .action-btn-icon-only {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        flex: none !important;
    }
    
    .action-btn-icon-only .btn-icon {
        font-size: 1.4rem !important;
    }
    
    .action-btn-modern.icon-only {
        width: 45px;
        height: 45px;
        min-height: 45px;
        max-width: 45px;
    }
    
    .action-btn-modern.icon-only .btn-icon {
        font-size: 1.2rem;
    }
    
    .action-btn-modern[data-tooltip]:before {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
    
    .action-btn-modern[data-tooltip]:after {
        font-size: 0.6rem;
        padding: 4px 8px;
        max-width: 150px;
    }
    
    /* Audio Button Mobile Responsive */
    .element-audio-btn {
        min-width: 28px;
        min-height: 24px;
        padding: 0.2rem 0.4rem;
        gap: 0;
    }
    
    .audio-icon {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .quiz-actions {
        gap: 0.4rem;
        padding: 0.5rem 0.75rem;
        justify-content: space-evenly;
    }
    
    /* Show Answers Button */
    .action-btn-full-text {
        flex: 0 1 auto !important;
        min-width: 90px !important;
        max-width: 120px !important;
        padding: 0.65rem 0.9rem !important;
        font-size: 0.75rem !important;
    }
    
    /* Icon-Only Buttons - Smaller on very small screens */
    .action-btn-icon-only {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        min-height: 40px !important;
    }
    
    .action-btn-icon-only .btn-icon {
        font-size: 1.3rem !important;
    }
    
    .action-btn-modern.icon-only {
        width: 42px;
        height: 42px;
        min-height: 42px;
        max-width: 42px;
        flex-shrink: 0;
    }
    
    .action-btn-modern.icon-only .btn-icon {
        font-size: 1.1rem;
    }
    
    .action-btn-modern[data-tooltip]:before {
        font-size: 0.65rem;
        padding: 5px 8px;
        border-radius: 6px;
    }
    
    .action-btn-modern[data-tooltip]:after {
        font-size: 0.55rem;
        padding: 3px 6px;
        max-width: 120px;
        border-radius: 4px;
    }
}

/* Pulse Animation for Active States */
@keyframes buttonPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.action-btn-modern.active {
    animation: buttonPulse 1s infinite;
}

/* Loading State */
.action-btn-modern.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.action-btn-modern.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Special Effects for Element Report Button */
.element-report-btn {
    position: relative;
    overflow: visible;
}

.element-report-btn::after {
    content: '✨';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.7rem;
    opacity: 0;
    transition: all 0.3s ease;
    animation: sparkle 2s infinite;
    z-index: 3;
}

.element-report-btn:hover::after {
    opacity: 1;
    top: -5px;
    right: -5px;
    animation: sparkle 1s infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.8) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(180deg); }
}

/* Circular Button Glowing Effect */
.action-btn-modern.icon-only {
    position: relative;
}

.action-btn-modern.icon-only::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: inherit;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1;
}

.action-btn-modern.icon-only:hover::before {
    opacity: 0.3;
    width: 120%;
    height: 120%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.1; }
}

/* Special Icon Animations */
.action-btn-modern.icon-only:hover .btn-icon {
    animation: iconBounce 0.6s ease-in-out;
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1.2) rotate(10deg); }
    25% { transform: scale(1.3) rotate(-5deg); }
    50% { transform: scale(1.35) rotate(15deg); }
    75% { transform: scale(1.25) rotate(-8deg); }
}

/* Different Pulse Colors for Different Button Types */
.action-btn-modern.btn-secondary.icon-only:hover::before {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
}

.action-btn-modern.btn-warning.icon-only:hover::before {
    background: linear-gradient(135deg, #fdcb6e 0%, #e84393 100%);
}

.action-btn-modern.btn-primary.icon-only:hover::before {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
}

.action-btn-modern.btn-info.icon-only:hover::before {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
}

/* Compact Button Optimization */
.action-btn-modern .btn-text {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
}

/* Hover Effect Enhancement for Compact Buttons */
.action-btn-modern:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Focus State for Accessibility */
.action-btn-modern:focus {
    outline: 2px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* Active State */
.action-btn-modern:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Fancy Colorful Tooltips */
.action-btn-modern[data-tooltip] {
    position: relative;
}

.action-btn-modern[data-tooltip]:before,
.action-btn-modern[data-tooltip]:after {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(10px);
    z-index: 1000;
}

.action-btn-modern[data-tooltip]:before {
    content: attr(data-tooltip);
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.action-btn-modern[data-tooltip]:after {
    content: attr(data-tooltip-desc);
    bottom: 80%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(30, 30, 30, 0.95) 100%);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 400;
    white-space: nowrap;
    max-width: 200px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn-modern[data-tooltip]:hover:before,
.action-btn-modern[data-tooltip]:hover:after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Special Tooltip Colors for Different Button Types */
.action-btn-modern.btn-secondary[data-tooltip]:before {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    box-shadow: 0 8px 25px rgba(116, 185, 255, 0.4);
}

.action-btn-modern.btn-warning[data-tooltip]:before {
    background: linear-gradient(135deg, #fdcb6e 0%, #e84393 100%);
    box-shadow: 0 8px 25px rgba(253, 203, 110, 0.4);
}

.action-btn-modern.btn-primary[data-tooltip]:before {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.4);
}

.action-btn-modern.btn-info[data-tooltip]:before {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    box-shadow: 0 8px 25px rgba(253, 121, 168, 0.4);
}

/* Tooltip Arrow */
.action-btn-modern[data-tooltip]:before {
    position: relative;
}

.action-btn-modern[data-tooltip]:before::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: inherit;
}

/* Animated Sparkles for Tooltips */
@keyframes sparkleTooltip {
    0%, 100% { 
        opacity: 0; 
        transform: scale(0.5) rotate(0deg); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1) rotate(180deg); 
    }
}

.action-btn-modern[data-tooltip]:hover:before {
    animation: none;
    position: relative;
}

.action-btn-modern[data-tooltip]:hover:before::before {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 0.7rem;
    animation: sparkleTooltip 1.5s infinite;
}

/* Enhanced Button Colors for Modern Buttons */
.action-btn-modern.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.action-btn-modern.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.action-btn-modern.btn-secondary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    border: 2px solid #dee2e6;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.action-btn-modern.btn-secondary:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #212529;
    border-color: #adb5bd;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.action-btn-modern.btn-warning {
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    color: #2d3436;
    box-shadow: 0 4px 15px rgba(255, 234, 167, 0.4);
}

.action-btn-modern.btn-warning:hover {
    background: linear-gradient(135deg, #fdcb6e 0%, #e84393 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(255, 234, 167, 0.6);
}

.action-btn-modern.btn-info {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(116, 185, 255, 0.4);
}

.action-btn-modern.btn-info:hover {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    box-shadow: 0 8px 25px rgba(116, 185, 255, 0.6);
}

.action-btn-modern.btn-success {
    background: linear-gradient(135deg, #55efc4 0%, #00b894 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(85, 239, 196, 0.4);
}

.action-btn-modern.btn-success:hover {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    box-shadow: 0 8px 25px rgba(85, 239, 196, 0.6);
}

/* Legacy Button Styles (for compatibility) */
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.btn-secondary {
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-info:hover {
    background: #1976d2;
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

/* Score Display */
.score-display {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.score-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--success-color);
}

.score-total {
    color: #666;
    font-size: 0.9rem;
}

/* Element Info */
.element-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.info-label {
    color: #666;
    font-weight: 500;
}

.info-value {
    font-weight: 600;
    color: #333;
}

/* Completion Screen */
.completion-screen {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: var(--shadow-heavy);
    max-width: 500px;
    margin: 0 auto;
}

.completion-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.completion-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.completion-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--info-color);
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Loading Animation */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Better Balance for Medium Screens */
@media (max-width: 1200px) {
    .main-content-container {
        max-width: 100%;
        padding: 0 0.5rem;
        gap: 0.5rem;
    }
    
    .chemistry-logo-container {
        min-width: 180px;
        max-width: 200px;
        padding: 1.5rem 0.8rem;
    }
    
    .chemistry-logo {
        width: 100px;
        height: 100px;
    }
    
    .logo-title {
        font-size: 1.1rem;
    }
    
    .home-website-btn-container {
        left: 0.25rem;
        top: 5rem;
    }
    
    .home-website-btn {
        min-width: 180px;
        max-width: 230px;
    }
    
    .slides-container {
        max-width: 600px;
    }
    
    .quiz-dashboard {
        width: 280px;
        min-width: 260px;
        max-width: 300px;
    }
}

@media (max-width: 1000px) {
    .main-content-container {
        gap: 0.4rem;
        padding: 0 0.4rem;
    }
    
    .chemistry-logo-container {
        min-width: 160px;
        max-width: 180px;
        padding: 1.2rem 0.6rem;
    }
    
    .chemistry-logo {
        width: 80px;
        height: 80px;
    }
    
    .logo-title {
        font-size: 1rem;
    }
    
    .slides-container {
        max-width: 550px;
    }
    
    .quiz-dashboard {
        width: 260px;
        min-width: 240px;
        max-width: 280px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Mobile Home Button */
    .home-website-btn-container {
        position: static;
        margin: 0.75rem 0;
        display: flex;
        justify-content: center;
        animation: none;
    }
    
    .home-website-btn {
        min-width: 180px;
        max-width: 220px;
        padding: 0.6rem 0.8rem;
    }
    
    .home-btn-title {
        font-size: 0.9rem;
    }
    
    .home-btn-subtitle {
        font-size: 0.65rem;
    }
    
    .home-icon-main {
        font-size: 1.6rem;
    }
    
    .home-icon-chemistry {
        font-size: 0.9rem;
    }
    
    /* Mobile Dashboard Layout */
    .main-content-container {
        flex-direction: column;
        padding: 0 0.5rem;
        gap: 0.75rem;
        max-width: 100%;
        align-items: stretch;
    }
    
    /* Mobile Chemistry Logo */
    .chemistry-logo-container {
        order: 0;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        min-width: auto;
        max-width: 100%;
        padding: 1rem;
        margin-bottom: 0.5rem;
        animation: none;
    }
    
    .chemistry-logo {
        width: 60px;
        height: 60px;
    }
    
    .logo-title {
        font-size: 1.2rem;
        padding: 0.3rem 0.8rem;
    }
    
    .quiz-dashboard {
        width: 100%;
        order: 3;
        margin-bottom: 1rem;
        align-self: stretch;
    }
    
    /* Mobile Score Display - Positioned between slides and dashboard */
    .score-display-container {
        width: 100%;
        order: 2;
        margin-bottom: 1rem;
        align-self: stretch;
        min-width: auto;
        max-width: 100%;
        margin-left: 0; /* Remove horizontal margins on mobile */
        margin-right: 0;
    }
    
    .score-display-content {
        padding: 1rem;
    }
    
    .main-score-section {
        gap: 0.75rem;
    }
    
    .score-circle {
        transform: scale(0.9);
    }
    
    .score-stats {
        gap: 0.5rem;
    }
    
    .score-stat-item {
        padding: 0.4rem 0.6rem;
        min-width: 50px;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .achievement-badges {
        gap: 0.4rem;
    }
    
    .achievement-badge {
        padding: 0.4rem 0.25rem;
        min-height: 50px;
    }
    
    .badge-text {
        font-size: 0.6rem;
    }
    
    .slides-container {
        order: 1;
    }
    
    .dashboard-header {
        padding: 1rem 1rem 0.75rem 1rem;
    }
    
    .dashboard-title {
        font-size: 1rem;
    }
    
    .dashboard-element-indicator {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .dashboard-content {
        padding: 0.75rem 1rem 1rem 1rem;
    }
    
    .timer-display {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .time-remaining {
        font-size: 2rem;
    }
    
    .timer-actions {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .timer-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .timer-btn.refresh {
        grid-column: 1;
    }
    
    .quiz-header {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .quiz-title {
        font-size: 1.2rem;
    }
    
    .quiz-progress {
        width: 100%;
        justify-content: space-between;
    }
    
    .progress-bar {
        width: 150px;
    }
    
    .element-card {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .element-symbol-display {
        font-size: 3rem;
        min-height: 80px;
        gap: 1rem;
    }
    
    .element-symbol-display .symbol-text {
        font-size: 3rem;
    }
    
    .element-symbol-display .symbol-divider {
        font-size: 2.5rem;
    }
    
    .element-symbol-display .symbol-arabic {
        font-size: 1.8rem;
    }
    
    .quiz-fields {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .quiz-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-controls {
        order: -1;
        width: 100%;
        justify-content: center;
    }
    
    .completion-stats {
        grid-template-columns: 1fr;
    }
    
    /* Mobile-specific header controls adjustments */
    .header-controls {
        flex-direction: column;
        gap: 0.75rem;
        margin-right: 0;
        margin-bottom: 0.5rem;
        order: 2;
        width: 100%;
    }
    
    /* Mobile Header Adjustments */
    .quiz-header {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .header-controls-row {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.5rem 0;
        margin-left: 0; /* Remove logo space on mobile */
        margin-top: 70px; /* Push below fixed logo */
    }
    
    .header-info-row {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        margin-left: 0; /* Remove logo space on mobile */
    }
    
    /* Mobile Order Controls */
    .order-controls-compact {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .order-group-compact {
        width: 100%;
        flex-direction: column;
        gap: 0.25rem;
        align-items: center;
    }
    
    .order-label-compact {
        font-size: 0.7rem;
        text-align: center;
    }
    
    .order-dropdown-compact {
        width: 100%;
        min-width: auto;
        max-width: 100%;
        font-size: 0.75rem;
        text-align: center;
    }
    
    .order-dropdown-compact.secondary {
        width: 100%;
        min-width: auto;
    }
    
    /* Mobile Random Controls */
    .random-controls-compact {
        width: 100%;
        justify-content: center;
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .random-btn-compact {
        width: 100%;
        min-width: auto;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Mobile Search Controls */
    .search-controls-compact,
    .text-search-controls-compact {
        width: 100%;
        justify-content: center;
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .search-input-compact {
        width: 80px;
    }
    
    .search-input-compact.text-search {
        width: 100px;
    }
    
    /* Stack search controls vertically on mobile */
    .header-controls-row {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    /* Mobile Title Section */
    .title-section {
        align-items: center;
        width: 100%;
    }
    
    .quiz-title-compact {
        font-size: 1rem;
        text-align: center;
    }
    
    .quiz-stats-compact {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Mobile Progress */
    .progress-section-compact {
        width: 100%;
        justify-content: center;
    }
    
    .progress-bar {
        width: 150px;
        height: 6px;
    }
    
    .progress-text-compact {
        font-size: 0.8rem;
    }
    
    /* Mobile Navigation */
    .navigation-section {
        justify-content: center;
        width: 100%;
    }
    
    .nav-btn-compact {
        padding: 0.5rem 0.75rem;
        min-width: 50px;
        font-size: 1rem;
        font-weight: 600;
    }
    
    .nav-btn-compact.primary {
        color: #2c3e50;
        font-weight: 700;
    }
    
    .nav-btn-compact.refresh {
        background: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(56, 142, 60, 0.3));
        border-color: rgba(76, 175, 80, 0.7);
        color: white;
        min-width: 60px;
        gap: 0.25rem;
    }
    
    .nav-btn-compact.refresh:hover {
        background: linear-gradient(135deg, rgba(76, 175, 80, 0.5), rgba(56, 142, 60, 0.5));
        border-color: rgba(76, 175, 80, 0.9);
        transform: translateY(-1px);
        box-shadow: 0 2px 10px rgba(76, 175, 80, 0.5);
    }
    
    .refresh-text {
        font-size: 0.7rem;
        font-weight: 700;
    }
    
    .controls-divider {
        display: none !important;
    }
    
    .search-controls {
        margin-right: 0;
        width: 100%;
    }
    
    .search-container {
        padding: 0.4rem;
        border-radius: 12px;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-group {
        width: 100%;
        justify-content: center;
    }
    
    .search-field {
        flex-direction: column;
        gap: 0.25rem;
        align-items: center;
    }
    
    .search-label {
        font-size: 0.75rem;
    }
    
    .search-input {
        width: 70px;
        padding: 0.35rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .search-input.element-number {
        width: 55px;
    }
    
    .search-go-btn {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }
    
    .search-divider {
        display: none !important;
    }
    
    .search-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        top: 80px;
    }
    
    /* Mobile adjustments for new layout */
    .chemistry-logo-container-new {
        left: 10px;
        top: 10px;
        min-width: 120px;
        max-width: 150px;
        padding: 1rem 0.75rem;
        gap: 0.75rem;
    }
    
    .chemistry-logo-container-new .chemistry-logo {
        width: 60px;
        height: 60px;
    }
    
    .chemistry-logo-container-new .logo-title {
        font-size: 0.9rem;
        margin-top: 0.25rem;
    }
    
    .help-popup-container-new {
        display: none; /* Hide on mobile - too cramped */
    }
    
    .main-content-container {
        padding-left: 80px; /* Make room for fixed logo */
    }
    
    /* Mobile-specific help popup adjustments */
    .help-popup {
        left: 50%;
        top: 20px;
        transform: translateX(-50%);
        max-width: calc(100vw - 40px);
        min-width: calc(100vw - 40px);
        position: fixed;
    }
    
    .help-popup.show {
        transform: translateX(-50%) scale(1);
    }
    
    .help-popup::before {
        top: -10px;
        right: 50%;
        transform: translateX(50%);
        border: 10px solid transparent;
        border-bottom-color: rgba(102, 126, 234, 0.9);
        border-left-color: transparent;
    }
    
    .help-popup.symbol-help::before {
        border-bottom-color: rgba(76, 175, 80, 0.9);
    }
    
    .help-popup.name-help::before {
        border-bottom-color: rgba(156, 39, 176, 0.9);
    }
    
    .help-popup.mass-help::before {
        border-bottom-color: rgba(255, 152, 0, 0.9);
    }
    
    .help-popup.properties-help::before {
        border-bottom-color: rgba(244, 67, 54, 0.9);
    }

    .help-popup.abundance-help::before {
        border-bottom-color: rgba(76, 175, 80, 0.9);
    }
    
    .help-popup.cost-help::before {
        border-bottom-color: rgba(255, 193, 7, 0.9);
    }
    
    .help-popup.magnetic-help::before {
        border-bottom-color: rgba(63, 81, 181, 0.9);
    }
    
    .help-popup.electrical-help::before {
        border-bottom-color: rgba(0, 188, 212, 0.9);
    }
    
    .help-popup.thermal-help::before {
        border-bottom-color: rgba(255, 87, 34, 0.9);
    }
}

@media (max-width: 480px) {
    /* Extra Small Mobile Chemistry Logo */
    .chemistry-logo-container {
        gap: 0.75rem;
        padding: 0.8rem;
    }
    
    .chemistry-logo {
        width: 50px;
        height: 50px;
    }
    
    .logo-title {
        font-size: 1rem;
        padding: 0.2rem 0.6rem;
        letter-spacing: 0.5px;
    }
    
    /* Extra Small Mobile Home Button */
    .home-website-btn {
        min-width: 160px;
        max-width: 200px;
        padding: 0.5rem 0.7rem;
        gap: 0.5rem;
    }
    
    .home-btn-content {
        gap: 0.5rem;
    }
    
    .home-btn-title {
        font-size: 0.85rem;
    }
    
    .home-btn-subtitle {
        font-size: 0.6rem;
    }
    
    .home-icon-main {
        font-size: 1.4rem;
    }
    
    .home-icon-chemistry {
        font-size: 0.8rem;
    }
    
    .arrow-icon {
        font-size: 1rem;
    }
    
    .go-text {
        font-size: 0.55rem;
    }
    
    .slide {
        padding: 1rem;
    }
    
    .element-card {
        padding: 1rem;
    }
    
    .element-symbol-display {
        font-size: 2.5rem;
        min-height: 70px;
        gap: 0.5rem;
        flex-direction: column;
        padding: 0.8rem 0.5rem;
    }
    
    .element-symbol-display .symbol-text {
        font-size: 2.5rem;
    }
    
    .element-symbol-display .symbol-divider {
        display: none;
    }
    
    .element-symbol-display .symbol-arabic {
        font-size: 1.2rem;
    }
    
    .quiz-header {
        padding: 0.5rem;
    }
    
    /* Mobile Dashboard Adjustments */
    .dashboard-header {
        padding: 0.75rem;
    }
    
    .dashboard-content {
        padding: 0.5rem 0.75rem 0.75rem 0.75rem;
    }
    
    .dashboard-section {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .timer-display {
        padding: 0.5rem;
    }
    
    .time-remaining {
        font-size: 1.8rem;
    }
    
    .setting-group {
        margin-bottom: 0.75rem;
    }
    
    .timer-input, .scope-select {
        padding: 0.5rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .range-settings {
        padding: 0.75rem;
    }
    
    .quiz-status-info {
        padding: 0.75rem;
    }
}

/* Desktop Enhancements for 4-Container Layout */
@media (min-width: 1200px) {
    .main-content-container {
        max-width: 1800px;
        gap: 1rem; /* Increased gap for larger screens */
    }
    
    .help-popup-container-new {
        min-width: 450px !important;
        max-width: 470px !important;
        width: 470px !important;
    }
    
    .slides-container {
        max-width: 800px;
    }
    
    .score-display-container {
        min-width: 300px;
        max-width: 320px;
        margin-left: 2.5rem; /* Equal spacing for centered positioning */
        margin-right: 2.5rem;
    }
    
    .quiz-dashboard {
        min-width: 320px;
        max-width: 340px;
    }
}

/* Ultra-wide screen optimizations */
@media (min-width: 1600px) {
    .main-content-container {
        max-width: 2000px;
        gap: 1.25rem;
    }
    
    .score-display-container {
        min-width: 320px;
        max-width: 350px;
        margin-left: 3.5rem; /* Increased spacing for ultra-wide screens */
        margin-right: 3.5rem;
    }
    
    .quiz-dashboard {
        min-width: 340px;
        max-width: 370px;
    }
    
    .score-circle {
        transform: scale(1.1);
    }
    
    .score-percentage {
        font-size: 2rem;
    }
}

/* Tablet landscape adjustments */
@media (min-width: 769px) and (max-width: 1199px) {
    .main-content-container {
        gap: 0.5rem; /* Tighter gap for tablet */
        padding: 0 0.5rem;
    }
    
    .help-popup-container-new {
        min-width: 450px !important;
        max-width: 470px !important;
        width: 470px !important;
    }
    
    .score-display-container {
        min-width: 240px;
        max-width: 260px;
        margin-left: 1.5rem; /* Centered spacing for tablet */
        margin-right: 1.5rem;
    }
    
    .quiz-dashboard {
        min-width: 260px;
        max-width: 280px;
    }
    
    .score-circle {
        transform: scale(0.95);
    }
    
    .score-stats {
        gap: 0.5rem;
    }
    
    .score-stat-item {
        padding: 0.4rem 0.6rem;
        min-width: 55px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.quiz-input:focus,
.nav-btn:focus,
.action-btn:focus {
    outline: 2px solid var(--info-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .element-card {
        border: 2px solid #000;
    }
    
    .quiz-input {
        border-width: 2px;
    }
}

/* Print styles */
@media print {
    .quiz-header,
    .nav-controls,
    .quiz-actions {
        display: none;
    }
    
    .slides-container {
        overflow: visible;
    }
    
    .slides-wrapper {
        flex-direction: column;
    }
    
    .slide {
        min-width: auto;
        page-break-after: always;
    }
}

/* ==================== INDUSTRIAL USE WRAPPER & REPORT BUTTON ==================== */

.industrial-use-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.industrial-use-dropdown.compact-dropdown {
    flex: 1;
    min-width: 0;
    max-width: 70%;
    font-size: 0.85rem;
}

.report-btn {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1rem;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-width: 100px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.report-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.report-btn:hover::before {
    left: 100%;
}

.report-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.report-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.4);
}

/* ==================== INDUSTRIAL USE POPUP ==================== */

.industrial-use-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.industrial-use-popup.show {
    opacity: 1;
    visibility: visible;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.popup-content {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 25px;
    padding: 2.5rem 2rem 2rem 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(76, 175, 80, 0.2);
    border: 3px solid #4caf50;
    animation: popupSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

@keyframes popupSlideIn {
    from {
        transform: scale(0.7) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(244, 67, 54, 0.1);
    border: 2px solid rgba(244, 67, 54, 0.3);
    color: #f44336;
    font-size: 1.2rem;
    font-weight: bold;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.popup-close:hover {
    background: #f44336;
    color: white;
    border-color: #f44336;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.popup-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
}

.popup-title {
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, #4caf50, #45a049);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.popup-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
    font-weight: 500;
    line-height: 1.5;
}

.popup-ok-btn {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 0.9rem 2.5rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.popup-ok-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.popup-ok-btn:hover::before {
    left: 100%;
}

.popup-ok-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.5);
}

.popup-ok-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

/* Warning Style */
.industrial-use-popup.warning .popup-content {
    border-color: #ff9800;
}

.industrial-use-popup.warning .popup-title {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.industrial-use-popup.warning .popup-ok-btn {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.industrial-use-popup.warning .popup-ok-btn:hover {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .industrial-use-wrapper {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .industrial-use-dropdown.compact-dropdown {
        max-width: 100%;
        width: 100%;
    }
    
    .report-btn {
        width: 100%;
        min-width: auto;
    }
    
    .popup-content {
        padding: 2rem 1.5rem;
        max-width: 90%;
    }
    
    .popup-title {
        font-size: 1.5rem;
    }
    
    .popup-subtitle {
        font-size: 0.9rem;
    }
    
    .popup-icon {
        font-size: 3rem;
    }
}

/* ==================== DETAILED INDUSTRIAL REPORT POPUP ==================== */

.industrial-report-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.industrial-report-popup.show {
    opacity: 1;
    visibility: visible;
}

.report-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.report-content {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    animation: reportSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    scrollbar-width: thin;
    scrollbar-color: #667eea #e0e0e0;
}

.report-content::-webkit-scrollbar {
    width: 8px;
}

.report-content::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 10px;
}

.report-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

@keyframes reportSlideIn {
    from {
        transform: scale(0.8) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.report-close {
    position: sticky;
    top: 15px;
    right: 15px;
    float: right;
    background: rgba(244, 67, 54, 0.1);
    border: 2px solid rgba(244, 67, 54, 0.3);
    color: #f44336;
    font-size: 1.5rem;
    font-weight: bold;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.report-close:hover {
    background: #f44336;
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.5);
}

/* Report Header */
.report-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    margin-bottom: 0;
}

.element-badge {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.3);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.element-symbol {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.element-number {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.report-title-section {
    flex: 1;
}

.report-title {
    font-size: 2rem;
    font-weight: 900;
    margin: 0 0 0.5rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.element-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    opacity: 0.9;
}

/* Distribution Section */
.distribution-section {
    padding: 2rem;
    background: #f8f9fa;
}

.distribution-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.usage-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.usage-bar-container {
    width: 100%;
}

.usage-bar {
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    animation: barSlideIn 0.6s ease forwards;
    opacity: 0;
}

.usage-bar:nth-child(1) { animation-delay: 0.1s; }
.usage-bar:nth-child(2) { animation-delay: 0.2s; }
.usage-bar:nth-child(3) { animation-delay: 0.3s; }
.usage-bar:nth-child(4) { animation-delay: 0.4s; }

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

.usage-bar:hover {
    transform: translateX(10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.usage-label {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.usage-percentage {
    font-size: 1.3rem;
    font-weight: 900;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Detailed Sections */
.detailed-sections {
    padding: 2rem;
}

.report-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #667eea;
    transition: all 0.3s ease;
}

.report-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.section-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 900;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.section-icon {
    font-size: 2rem;
}

.section-title {
    flex: 1;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.section-percentage {
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-emoji {
    font-size: 4rem;
    text-align: center;
    margin: 1rem 0;
    animation: emojiFloat 3s ease-in-out infinite;
}

@keyframes emojiFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.section-description {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.section-applications h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.75rem;
}

.section-applications ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.section-applications li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #555;
    line-height: 1.6;
}

.section-applications li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
    font-size: 1.2rem;
}

.fun-fact {
    background: linear-gradient(135deg, #fff3cd 0%, #fff9e6 100%);
    border-left: 4px solid #ffc107;
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.fact-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.fun-fact strong {
    color: #f57c00;
}

/* Report Footer */
.report-footer {
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    border-radius: 0 0 20px 20px;
}

.report-done-btn {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 1rem 3rem;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.report-done-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.5);
}

.report-done-btn:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .report-content {
        width: 98%;
        max-height: 95vh;
    }
    
    .report-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .element-badge {
        width: 80px;
        height: 80px;
    }
    
    .element-symbol {
        font-size: 2.5rem;
    }
    
    .report-title {
        font-size: 1.5rem;
    }
    
    .element-name {
        font-size: 1.2rem;
    }
    
    .distribution-section,
    .detailed-sections {
        padding: 1rem;
    }
    
    .report-section {
        padding: 1.5rem;
    }
    
    .section-header {
        flex-wrap: wrap;
    }
    
    .section-title {
        font-size: 1.2rem;
        width: 100%;
    }
    
    .section-emoji {
        font-size: 3rem;
    }
    
    .usage-bar {
        height: 50px;
        padding: 0 1rem;
    }
    
    .usage-label {
        font-size: 0.85rem;
    }
    
    .usage-percentage {
        font-size: 1.1rem;
    }
}

/* ==================== STRENGTH REPORT POPUP SYSTEM ==================== */

/* Strength Report Button Styling */
.strength-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.strength-report-btn {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.strength-report-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.strength-report-btn:hover::before {
    left: 100%;
}

.strength-report-btn:hover {
    background: linear-gradient(135deg, #F57C00 0%, #E65100 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5);
}

.strength-report-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 152, 0, 0.4);
}

/* Strength Report Popup Container */
.strength-report-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.strength-report-popup.show {
    opacity: 1;
    visibility: visible;
}

/* Strength Report Content */
.strength-report-content {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #fff8f0 100%);
    border-radius: 20px;
    max-width: 950px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 70px rgba(255, 152, 0, 0.4);
    animation: strengthReportSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes strengthReportSlideIn {
    from {
        transform: scale(0.8) translateY(-50px) rotate(-5deg);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0) rotate(0deg);
        opacity: 1;
    }
}

/* Strength Report Header */
.strength-report-header {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    padding: 2rem;
    border-radius: 20px 20px 0 0;
}

.strength-badge-large {
    width: 110px;
    height: 110px;
    animation: strengthBadgePulse 2s ease-in-out infinite;
}

@keyframes strengthBadgePulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
        box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4);
    }
    50% { 
        transform: scale(1.08) rotate(5deg); 
        box-shadow: 0 12px 35px rgba(255, 152, 0, 0.6);
    }
}

/* Primary Strength Indicator */
.primary-strength-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.primary-strength-indicator > span:first-child {
    font-size: 0.95rem;
    opacity: 0.95;
    font-weight: 600;
}

.strength-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: strengthBadgeGlow 2s ease-in-out infinite;
}

@keyframes strengthBadgeGlow {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    50% { 
        box-shadow: 0 6px 25px rgba(255, 255, 255, 0.4);
    }
}

.strength-badge.primary {
    font-size: 1.1rem;
    padding: 0.6rem 1.3rem;
}

/* Strength Introduction Section */
.strength-intro {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border-left: 5px solid #FF9800;
    margin: 0;
}

.strength-intro p {
    margin: 0;
    font-size: 1rem;
    color: #E65100;
    font-weight: 600;
}

/* Strength Variations Grid */
.strength-variations-grid {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.strength-variation-card {
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: strengthCardFadeIn 0.6s ease forwards;
    opacity: 0;
}

.strength-variation-card:nth-child(1) { animation-delay: 0.1s; }
.strength-variation-card:nth-child(2) { animation-delay: 0.2s; }
.strength-variation-card:nth-child(3) { animation-delay: 0.3s; }
.strength-variation-card:nth-child(4) { animation-delay: 0.4s; }

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

.strength-variation-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Variation Header */
.variation-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.variation-icon {
    font-size: 2.5rem;
    animation: variationIconBounce 2s ease-in-out infinite;
}

@keyframes variationIconBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
}

.variation-title {
    flex: 1;
}

.variation-title h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}

/* Variation Description */
.variation-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Variation Examples */
.variation-examples {
    background: rgba(255, 255, 255, 0.7);
    padding: 1rem;
    border-radius: 10px;
    border: 2px dashed rgba(0, 0, 0, 0.1);
}

.variation-examples strong {
    color: #FF9800;
    font-size: 0.95rem;
}

.variation-examples ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
}

.variation-examples li {
    margin: 0.3rem 0;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

/* Strength Conclusion Section */
.strength-conclusion {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    padding: 2rem;
    margin: 0 2rem 2rem 2rem;
    border-radius: 15px;
    border-left: 5px solid #2196F3;
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.2);
}

.conclusion-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    animation: conclusionPulse 2s ease-in-out infinite;
}

@keyframes conclusionPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.strength-conclusion h3 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1976D2;
    text-align: center;
}

.strength-conclusion p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #424242;
    font-weight: 500;
    text-align: center;
}

/* Strength Simple Popup */
.strength-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.strength-popup.show {
    opacity: 1;
    visibility: visible;
}

.strength-popup .popup-content {
    background: linear-gradient(135deg, #ffffff 0%, #fff8f0 100%);
    border: 3px solid #FF9800;
    box-shadow: 0 20px 60px rgba(255, 152, 0, 0.4);
}

.strength-popup .popup-icon {
    font-size: 4rem;
    animation: strengthIconSpin 3s linear infinite;
}

@keyframes strengthIconSpin {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Responsive Design for Strength Report */
@media (max-width: 768px) {
    .strength-report-content {
        max-width: 100%;
        border-radius: 15px;
    }
    
    .strength-report-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .strength-badge-large {
        width: 90px;
        height: 90px;
    }
    
    .report-title {
        font-size: 1.5rem;
    }
    
    .strength-variations-grid {
        padding: 1rem;
    }
    
    .strength-variation-card {
        padding: 1rem;
    }
    
    .variation-title h3 {
        font-size: 1.1rem;
    }
    
    .variation-icon {
        font-size: 2rem;
    }
    
    .strength-conclusion {
        margin: 0 1rem 1rem 1rem;
        padding: 1.5rem;
    }
    
    .strength-report-btn {
        font-size: 0.7rem;
        padding: 0.35rem 0.65rem;
    }
}

/* ==================== IPHONE QUIZ OPTIMIZATION - ELEMENT CONTAINER FOCUS ==================== */

/* Hide iPhone-specific elements by default */
.iphone-hamburger-menu,
.iphone-header-compact {
    display: none;
}

/* Tablet and Below - Hide GL Components and Audio */
@media only screen and (max-width: 1024px) {
    /* Hide GL Banner and Navigation on all non-desktop screens */
    .gl-top-banner,
    .gl-navigation,
    .gl-banner-left,
    .gl-logo-container,
    .gl-tagline,
    .gl-learn-more,
    .gl-nav-container,
    .gl-nav-menu,
    .gl-nav-item,
    .gl-menu-toggle {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    
    /* Hide Audio Button on all non-desktop screens */
    .element-audio-btn,
    .audio-icon,
    button[onclick*="pronounce"],
    #elementAudioBtn,
    .quiz-stats-compact .element-audio-btn {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    
    /* Make sure quiz header doesn't show audio */
    .quiz-stats-compact {
        gap: 0.5rem;
    }
    
    .quiz-stats-compact > *:has(.audio-icon) {
        display: none !important;
    }
}

/* iPhone Only - All Sizes (SE to Pro Max: 375px - 430px) */
@media only screen and (max-width: 430px) {
    /* ===== HIDE EVERYTHING EXCEPT QUIZ ELEMENT ===== */
    
    /* Hide GL Banner and Navigation - Complete on iPhone */
    .gl-top-banner,
    .gl-navigation,
    .gl-banner-left,
    .gl-logo-container,
    .gl-logo-icon,
    .gl-logo-text,
    .gl-tagline,
    .gl-learn-more,
    .gl-nav-container,
    .gl-nav-menu,
    .gl-nav-item,
    .gl-nav-link,
    .gl-menu-toggle {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Hide Original Quiz Header */
    .quiz-header {
        display: none !important;
    }
    
    /* Hide ALL Audio Elements on iPhone */
    .element-audio-btn,
    .audio-icon,
    button[onclick*="pronounce"],
    button[onclick*="audio"],
    #elementAudioBtn,
    [data-audio],
    .pronounce-btn {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    
    /* Hide Left Side Elements */
    .left-side-flex-container,
    .left-side-column,
    .container-8h1,
    .btn-wwa {
        display: none !important;
    }
    
    /* Hide Periodic Table Tracker */
    .periodic-table-tracker {
        display: none !important;
    }
    
    /* Hide Help Popup */
    .help-popup-container-new {
        display: none !important;
    }
    
    /* Hide Score Display */
    .score-display-container {
        display: none !important;
    }
    
    /* Hide Dashboard */
    .quiz-dashboard {
        display: none !important;
    }
    
    /* Hide Footer on Quiz Page */
    .gl-footer {
        display: none !important;
    }
    
    /* ===== HIDE ALL EFFECTS & POPUPS ON iPHONE ===== */
    
    /* Hide Abu Ali Chatbot */
    #abuAliChatbot,
    .abu-ali-container,
    .abu-ali-chat-window,
    .abu-ali-button,
    .abu-ali-floating-btn,
    .chatbot-container,
    .chatbot-window,
    [id*="abuAli"],
    [class*="abuAli"],
    [class*="abu-ali"] {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
        opacity: 0 !important;
    }
    
    /* Hide ALL Motivational Popups */
    .advanced-motivation-popup,
    .motivation-popup,
    .motivation-content,
    .motivation-emoji-burst,
    .celebration-popup,
    .achievement-popup,
    [class*="motivation"],
    [class*="celebration"],
    [class*="achievement"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    /* Hide Confetti/Fireworks Effects */
    .confetti,
    .confetti-container,
    .fireworks,
    .fireworks-container,
    .particle-effect,
    .particle-container,
    .sparkle,
    .sparkle-container,
    canvas[class*="confetti"],
    canvas[class*="firework"],
    canvas[class*="particle"],
    [class*="confetti"],
    [class*="firework"],
    [class*="sparkle"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Hide Special Effects Containers */
    .special-celebration,
    .perfect-element-celebration,
    .streak-celebration,
    .speed-demon-effect,
    .glow-effect,
    .pulse-effect,
    .bounce-effect,
    [class*="special-effect"],
    [class*="celebration-effect"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Hide All Notification Popups */
    .notification-popup,
    .toast-notification,
    .alert-popup,
    .success-popup,
    .info-popup,
    [class*="notification"],
    [class*="toast"],
    [class*="alert-popup"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Disable ALL Animations on iPhone */
    * {
        animation: none !important;
        transition: none !important;
    }
    
    /* Exception: Keep essential transitions for buttons */
    .iphone-nav-btn,
    .action-btn-modern,
    .quiz-input {
        transition: transform 0.1s ease, opacity 0.1s ease !important;
    }
    
    /* Remove ALL Text Shadows on iPhone */
    *,
    *::before,
    *::after {
        text-shadow: none !important;
    }
    
    /* ===== ACTION BUTTONS - SHOW LABELS ON iPHONE ===== */
    
    /* Remove ALL Tooltip Effects */
    .action-btn-modern[data-tooltip]:before,
    .action-btn-modern[data-tooltip]:after {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
    
    /* Remove Icon-Only Mode - Show Full Button with Label */
    .action-btn-modern.icon-only {
        width: auto !important;
        padding: 0.7rem 1rem !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }
    
    .action-btn-modern .btn-text {
        display: inline-block !important;
        font-size: 0.85rem !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
    }
    
    .action-btn-modern .btn-icon {
        font-size: 1.1rem !important;
    }
    
    /* Remove ALL Hover Effects on iPhone */
    .action-btn-modern:hover,
    .action-btn-modern:focus,
    .action-btn-modern:active {
        transform: none !important;
        box-shadow: none !important;
        animation: none !important;
    }
    
    .action-btn-modern:hover::before,
    .action-btn-modern:focus::before,
    .action-btn-modern:active::before {
        display: none !important;
        opacity: 0 !important;
        animation: none !important;
    }
    
    /* Simplify Button Colors */
    .action-btn-modern.btn-secondary {
        background: #74b9ff !important;
        border-color: #74b9ff !important;
    }
    
    .action-btn-modern.btn-warning {
        background: #fdcb6e !important;
        border-color: #fdcb6e !important;
    }
    
    .action-btn-modern.btn-primary {
        background: #00b894 !important;
        border-color: #00b894 !important;
    }
    
    .action-btn-modern.btn-info {
        background: #fd79a8 !important;
        border-color: #fd79a8 !important;
    }
    
    /* Quiz Actions - Single Row Layout on iPhone */
    .quiz-actions {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-evenly !important;
        align-items: center !important;
        gap: 0.5rem !important;
        margin-top: 1rem !important;
        padding: 0.75rem 1rem !important;
        background: transparent !important;
        border-top: 1px solid #e0e0e0 !important;
    }
    
    /* Show Answers Button - Full Text */
    .quiz-actions .action-btn-full-text {
        flex: 0 1 auto !important;
        min-width: 110px !important;
        max-width: 140px !important;
        padding: 0.7rem 1rem !important;
        border-radius: 8px !important;
        font-size: 0.8rem !important;
    }
    
    .quiz-actions .action-btn-full-text .btn-text {
        display: inline-block !important;
    }
    
    /* Icon-Only Buttons - Smaller Circles */
    .quiz-actions .action-btn-icon-only {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        min-height: 42px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        flex: none !important;
    }
    
    .quiz-actions .action-btn-icon-only .btn-text {
        display: none !important;
    }
    
    .quiz-actions .action-btn-icon-only .btn-icon {
        font-size: 1.3rem !important;
    }
    
    /* ===== SHOW ONLY ELEMENT CONTAINER ===== */
    
    html, body {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        width: 100%;
    }
    
    body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .quiz-container {
        min-height: 100vh;
        display: block;
        padding: 0;
        margin: 0;
        width: 100%;
    }
    
    /* iPhone Compact Header - Simple */
    .iphone-header-compact {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        background: #667eea;
        color: white;
        position: sticky;
        top: 0;
        z-index: 1000;
        box-shadow: none !important;
        animation: none !important;
    }
    
    .iphone-header-left {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
    
    .iphone-hamburger-btn {
        background: rgba(255,255,255,0.2);
        border: none;
        color: white;
        font-size: 1.5rem;
        width: 44px;
        height: 44px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        touch-action: manipulation;
    }
    
    .iphone-quiz-title {
        font-size: 1.1rem;
        font-weight: 700;
        margin: 0;
    }
    
    .iphone-element-info {
        font-size: 0.85rem;
        opacity: 0.9;
    }
    
    /* Main Content - Element Container Only */
    .main-content-container {
        flex: none;
        display: block;
        padding: 0;
        margin: 0;
        width: 100%;
    }
    
    .slides-container {
        width: 100%;
        max-width: 100%;
        display: block;
    }
    
    .slides-wrapper {
        display: flex;
        width: 100%;
    }
    
    .slide {
        min-width: 100%;
        width: 100%;
        display: block;
        padding: 1rem 0.75rem 2rem 0.75rem;
    }
    
    /* Element Card - Simple (No Effects) */
    .element-card {
        width: 100%;
        max-width: 100%;
        padding: 1.25rem 1rem;
        margin: 0 auto;
        border-radius: 8px;
        background: white;
        box-shadow: none !important;
        display: block;
        animation: none !important;
        transition: none !important;
    }
    
    /* Element Symbol Display - Simple (No Effects) */
    .element-symbol-display {
        font-size: 2.2rem;
        text-align: center;
        margin-bottom: 1.25rem;
        padding: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        background: #667eea;
        border-radius: 8px;
        color: white;
        box-shadow: none !important;
        animation: none !important;
        transition: none !important;
    }
    
    /* Quiz Fields */
    .quiz-fields-grid {
        display: block;
        width: 100%;
    }
    
    .quiz-field {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .quiz-field label {
        display: block;
        font-size: 0.9rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        color: #333;
    }
    
    .quiz-input {
        width: 100%;
        padding: 0.75rem;
        font-size: 16px;
        border: 2px solid #ddd;
        border-radius: 8px;
        background: white;
        box-sizing: border-box;
        box-shadow: none !important;
        animation: none !important;
    }
    
    .quiz-input:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: none !important;
    }
    
    /* Input States - Simple (No Animations) */
    .quiz-input.correct {
        border-color: #4caf50 !important;
        background: rgba(76, 175, 80, 0.05) !important;
        color: #2e7d32 !important;
        font-weight: 600 !important;
        animation: none !important;
        box-shadow: none !important;
    }
    
    .quiz-input.incorrect {
        border-color: #f44336 !important;
        background: rgba(244, 67, 54, 0.05) !important;
        color: #c62828 !important;
        animation: none !important;
        box-shadow: none !important;
    }
    
    /* Electron Shells on iPhone - Simple */
    .electron-shells-row {
        background: rgba(102, 126, 234, 0.05);
        border: 2px solid #ddd;
        border-radius: 8px;
        padding: 1rem;
        margin: 1rem 0;
        display: block;
        box-shadow: none !important;
        animation: none !important;
    }
    
    .electron-shells-row > label {
        font-size: 1rem;
        font-weight: 700;
        color: #333;
        margin-bottom: 0.75rem;
        display: block;
    }
    
    .shells-container {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .shell-input {
        width: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
        padding: 0.5rem 0.25rem !important;
        text-align: center;
        font-weight: 600;
        font-size: 16px !important;
    }
    
    /* Dropdowns */
    select.quiz-input {
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 0.75rem center;
        background-size: 12px;
        padding-right: 2.5rem;
    }
    
    /* Input Groups */
    .input-group {
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }
    
    .input-group .quiz-input {
        flex: 1;
        min-width: 0;
    }
    
    /* Quiz Actions */
    .quiz-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 1.5rem;
        padding: 1rem 0 1.5rem 0;
        border-top: 2px solid #e0e0e0;
    }
    
    .action-btn-modern {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        padding: 0.85rem;
        font-size: 0.9rem;
        font-weight: 600;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        min-height: 48px;
        touch-action: manipulation;
        border: none;
        box-shadow: none !important;
        animation: none !important;
    }
    
    .action-btn-modern:active {
        opacity: 0.8;
    }
    
    /* Add bottom padding for footer */
    .quiz-container {
        padding-bottom: 80px;
    }
    
    /* iPhone Navigation Footer - Simple */
    .iphone-nav-footer {
        display: flex;
        gap: 0.75rem;
        padding: 1rem;
        background: white;
        border-top: 2px solid #e0e0e0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        box-shadow: none !important;
        animation: none !important;
    }
    
    .iphone-nav-btn {
        flex: 1;
        padding: 0.9rem;
        font-size: 1rem;
        font-weight: 700;
        border: none;
        border-radius: 8px;
        background: #667eea;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        min-height: 50px;
        touch-action: manipulation;
        cursor: pointer;
        box-shadow: none !important;
        transition: opacity 0.1s ease !important;
        animation: none !important;
    }
    
    .iphone-nav-btn:active {
        opacity: 0.8;
    }
    
    .iphone-nav-btn.primary {
        background: #764ba2;
    }
    
    /* Hamburger Menu Sidebar */
    .iphone-hamburger-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
        z-index: 9999;
        transition: left 0.3s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 2px 0 15px rgba(0,0,0,0.3);
    }
    
    .iphone-hamburger-menu.active {
        left: 0;
    }
    
    .hamburger-header {
        padding: 1.5rem 1rem;
        background: rgba(0,0,0,0.2);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .hamburger-close {
        background: rgba(255,255,255,0.2);
        border: none;
        color: white;
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    
    .hamburger-content {
        padding: 1rem;
    }
    
    .hamburger-section {
        margin-bottom: 1.5rem;
        background: rgba(255,255,255,0.1);
        border-radius: 12px;
        padding: 1rem;
    }
    
    .hamburger-section h3 {
        color: white;
        font-size: 1rem;
        margin: 0 0 0.75rem 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .hamburger-item {
        background: rgba(255,255,255,0.15);
        padding: 0.75rem;
        border-radius: 8px;
        margin-bottom: 0.5rem;
        color: white;
        font-size: 0.85rem;
    }
    
    .hamburger-item:last-child {
        margin-bottom: 0;
    }
    
    /* Overlay */
    .iphone-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
        display: none;
    }
    
    .iphone-overlay.active {
        display: block;
    }
    
    /* Progress Bar in Header */
    .iphone-progress {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: rgba(255,255,255,0.2);
    }
    
    .iphone-progress-fill {
        height: 100%;
        background: rgba(255,255,255,0.9);
        transition: width 0.3s ease;
    }
    
    /* Safe Area Support for iPhone with Notch */
    @supports (padding: env(safe-area-inset-top)) {
        .iphone-header-compact {
            padding-top: calc(0.75rem + env(safe-area-inset-top));
            padding-left: max(1rem, env(safe-area-inset-left));
            padding-right: max(1rem, env(safe-area-inset-right));
        }
        
        .quiz-container {
            padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important;
        }
        
        .iphone-nav-footer {
            padding-bottom: calc(1rem + env(safe-area-inset-bottom));
            padding-left: max(1rem, env(safe-area-inset-left));
            padding-right: max(1rem, env(safe-area-inset-right));
        }
        
        .iphone-hamburger-menu {
            padding-top: env(safe-area-inset-top);
        }
    }
    
    /* Better Input Handling */
    .quiz-input,
    input[type="text"],
    input[type="number"],
    select,
    textarea {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    /* Prevent zoom on input focus */
    input[type="text"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
    }
    
    /* Better Button Touch */
    button,
    .iphone-nav-btn,
    .iphone-hamburger-btn,
    .action-btn-modern {
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
    }
    
    /* Smooth Scrolling */
    .slides-container,
    .iphone-hamburger-menu,
    .element-card {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Fix viewport height */
    html {
        height: -webkit-fill-available;
    }
    
    body {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    /* Better Text Rendering */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Tablet Screens (431px - 1024px) - Hide GL but keep standard quiz layout */
@media only screen and (min-width: 431px) and (max-width: 1024px) {
    /* Hide iPhone-specific elements */
    .iphone-hamburger-menu,
    .iphone-header-compact,
    .iphone-nav-footer,
    .iphone-overlay {
        display: none !important;
    }
    
    /* Ensure GL Banner and Navigation stay hidden */
    .gl-top-banner,
    .gl-navigation {
        display: none !important;
    }
    
    /* Hide Audio Button */
    .element-audio-btn,
    #elementAudioBtn {
        display: none !important;
    }
    
    /* Keep footer on tablet but may adjust */
    .gl-footer {
        display: block;
    }
    
    /* Quiz Actions - Single Row Layout on Tablet */
    .quiz-actions {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-evenly !important;
        align-items: center !important;
        gap: 0.75rem !important;
        flex-wrap: nowrap !important;
        padding: 0.75rem 1.5rem !important;
    }
    
    /* Show Answers Button - Full Text on Tablet */
    .quiz-actions .action-btn-full-text {
        flex: 0 1 auto !important;
        min-width: 150px !important;
        padding: 0.75rem 1.25rem !important;
    }
    
    .quiz-actions .action-btn-full-text .btn-text {
        display: inline-block !important;
    }
    
    /* Icon-Only Buttons on Tablet */
    .quiz-actions .action-btn-icon-only {
        width: 50px !important;
        height: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
        min-height: 50px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        flex: none !important;
    }
    
    .quiz-actions .action-btn-icon-only .btn-text {
        display: none !important;
    }
    
    .quiz-actions .action-btn-icon-only .btn-icon {
        font-size: 1.5rem !important;
    }
    
    /* Old icon-only class compatibility */
    .action-btn-modern.icon-only {
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        padding: 0.65rem 1rem !important;
        border-radius: 8px !important;
        gap: 0.5rem !important;
    }
    
    .action-btn-modern.icon-only .btn-text {
        display: inline-block !important;
        font-size: 0.85rem !important;
        font-weight: 600 !important;
    }
}

/* Desktop Only - Full Layout (> 1024px) */
@media only screen and (min-width: 1025px) {
    /* Hide iPhone-specific elements */
    .iphone-hamburger-menu,
    .iphone-header-compact,
    .iphone-nav-footer,
    .iphone-overlay {
        display: none !important;
    }
    
    /* Show everything normal on desktop */
    .gl-top-banner,
    .gl-navigation {
        display: flex !important;
    }
    
    .element-audio-btn {
        display: inline-flex !important;
    }
    
    /* Quiz Actions - Single Row Layout on Desktop */
    .quiz-actions {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-evenly !important;
        align-items: center !important;
        gap: 1rem !important;
        flex-wrap: nowrap !important;
        padding: 1rem 2rem !important;
    }
    
    /* Show Answers Button - Full Text on Desktop */
    .quiz-actions .action-btn-full-text {
        flex: 0 1 auto !important;
        min-width: 160px !important;
        max-width: 200px !important;
        padding: 0.75rem 1.5rem !important;
    }
    
    .quiz-actions .action-btn-full-text .btn-text {
        display: inline-block !important;
    }
    
    .quiz-actions .action-btn-full-text .btn-icon {
        display: inline-block !important;
    }
    
    /* Icon-Only Buttons on Desktop */
    .quiz-actions .action-btn-icon-only {
        width: 54px !important;
        height: 54px !important;
        min-width: 54px !important;
        max-width: 54px !important;
        min-height: 54px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        flex: none !important;
    }
    
    .quiz-actions .action-btn-icon-only .btn-text {
        display: none !important;
    }
    
    .quiz-actions .action-btn-icon-only .btn-icon {
        font-size: 1.6rem !important;
    }
    
    /* Ensure no overlapping or absolute positioning issues */
    .action-btn-modern::before,
    .action-btn-modern::after {
        pointer-events: none !important;
    }
    
    /* Old icon-only class compatibility */
    .action-btn-modern.icon-only {
        width: auto !important;
        height: auto !important;
        min-height: 44px !important;
        max-width: 180px !important;
        padding: 0.6rem 1rem !important;
        border-radius: 8px !important;
        gap: 0.5rem !important;
    }
}