/* Sliding Quiz Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-color: #4caf50;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196f3;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 30px rgba(0,0,0,0.2);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

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

/* Header */
.quiz-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quiz-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    font-weight: 600;
    color: var(--info-color);
    min-width: 120px;
    text-align: right;
}

/* 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: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    font-size: 0.8rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: var(--transition);
}

.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);
}

/* New Header Structure */
.quiz-header {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0 0 15px 15px;
    box-shadow: var(--shadow-deep);
    margin-bottom: 1rem;
}

/* 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; }
}

.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: 1rem;
    padding: 0 0.75rem;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    max-width: 1400px;
    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: 700px; /* Limit max width for better balance */
}

/* Left Side Flex Container */
.left-side-flex-container {
    position: fixed;
    left: 1rem;
    top: 2rem;
    z-index: 9999;
    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);
    backdrop-filter: blur(10px);
    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;
}

/* Home Button */
.btn-wwa {
    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;
}

.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: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.icon-he6 {
    font-size: 1rem;
    opacity: 0.8;
}

.section-swi {
    flex: 1;
}

.title-dv9 {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.subtitle-x99 {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 2px 0 0 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.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: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.btn-wwa:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
}

.btn-wwa:hover .icon-t57 {
    transform: translateX(3px);
}

@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;
}

/* 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%; }
}

/* Element Navigation Dropdown */
.element-navigation-compact {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.element-select {
    min-width: 200px;
    font-size: 12px;
}

/* Bookmark System */
.bookmark-controls-compact {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.bookmark-btn-compact {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.bookmark-btn-compact:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.bookmark-select {
    min-width: 150px;
    font-size: 12px;
}

/* Checkpoint/Marking System */
.checkpoint-dm4 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.checkpoint-dm4:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(241, 196, 15, 0.5);
}

.checkbox-1wt {
    display: none;
}

.label-7jz {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.3s ease;
    user-select: none;
}

.label-7jz:hover {
    color: #f39c12;
}

.icon-y5c {
    font-size: 16px;
    transition: all 0.3s ease;
}

.text-vob {
    transition: all 0.3s ease;
}

.checkbox-1wt:checked + .label-7jz {
    color: #e74c3c;
}

.checkbox-1wt:checked + .label-7jz .icon-y5c {
    animation: pinPulse 1s ease-in-out infinite;
    filter: drop-shadow(0 0 4px rgba(231, 76, 60, 0.6));
}

.checkpoint-info {
    margin-left: 10px;
    font-size: 11px;
    color: #7f8c8d;
    font-weight: 500;
}





/* Checkpoint markers in element slides */
.checkpoint-container {
    display: flex;
    justify-content: center;
    margin: 8px 0;
}

.checkpoint-marker {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.checkpoint-marker:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(241, 196, 15, 0.5);
}

.checkpoint-marker.marked {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.6);
}

.checkpoint-marker.marked:hover {
    background: rgba(231, 76, 60, 0.3);
    border-color: rgba(231, 76, 60, 0.8);
}

.checkpoint-checkbox {
    display: none;
}

.checkpoint-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.3s ease;
    user-select: none;
}

.checkpoint-label:hover {
    color: #f39c12;
}

.checkpoint-marker.marked .checkpoint-label {
    color: #e74c3c;
}

.checkpoint-icon {
    font-size: 16px;
    transition: all 0.3s ease;
}

.checkpoint-marker.marked .checkpoint-icon {
    animation: pinPulse 1s ease-in-out infinite;
    filter: drop-shadow(0 0 4px rgba(231, 76, 60, 0.6));
}

.checkpoint-text {
    transition: all 0.3s ease;
}

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

/* The shimmer effect is already using ::before, so we'll style the container instead */

/* Special container styling for reset button area */
.timer-actions {
    position: relative;
}

.timer-actions::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 71, 87, 0.5), transparent);
    border-radius: 2px;
    animation: dividerPulse 3s ease-in-out infinite;
}

@keyframes dividerPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* 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: 1.5rem;
    position: relative;
}

/* Element Card */
.element-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: var(--shadow-heavy);
    padding: 2rem;
    max-width: 580px;
    width: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideIn 0.6s ease;
    margin: 0 auto;
    align-self: center;
}

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

.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: 2rem;
    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.5rem;
}

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

.element-classification {
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: white;
    font-weight: 500;
    display: inline-block;
    margin-top: 0.5rem;
}

/* 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-bottom: 1.5rem;
}

.checkpoint-marker {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 8px 16px;
    box-shadow: 0 4px 15px 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;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.quiz-field {
    position: relative;
}

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

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

.quiz-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.quiz-input:focus {
    outline: none;
    border-color: var(--info-color);
    box-shadow: 0 0 0 3px 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.5rem;
    align-items: center;
}

.input-group .quiz-input {
    flex: 1;
    min-width: 0;
}

.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: 300px;
    max-width: 450px;
    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;
}

.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 2fr;
    gap: 0.5rem 0.75rem;
    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.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-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding: 1rem 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;
}

.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: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    min-height: 44px;
    max-width: 180px;
    flex: 1;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    overflow: visible;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Icon-Only Buttons */
.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;
}

.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));
}

.btn-text {
    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;
}

/* Responsive Design for Action Buttons */
@media (max-width: 768px) {
    .quiz-actions {
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        flex-wrap: nowrap;
        justify-content: space-around;
    }
    
    .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-around;
    }
    
    .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;
    -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: 2;
        margin-bottom: 1rem;
        align-self: stretch;
    }
    
    .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;
    }
    
    .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.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;
    }
    
    .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;
    }
}

/* 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;
    }
}