* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #8b9cf0;
    --secondary: #764ba2;
    --success: #48bb78;
    --success-light: #9ae6b4;
    --warning: #ed8936;
    --warning-light: #fbd38d;
    --danger: #f56565;
    --danger-light: #feb2b2;
    --dark: #1a202c;
    --dark-alt: #2d3748;
    --light: #f7fafc;
    --lighter: #ffffff;
    --border: #e2e8f0;
    --border-light: #edf2f7;
    --text: #2d3748;
    --text-light: #718096;
    --text-muted: #a0aec0;
    --card-bg: #ffffff;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
    --transition-bounce: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Border Radius */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --line-tight: 1.25;
    --line-normal: 1.6;
    --line-relaxed: 1.75;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary: #7c8aed;
    --primary-dark: #667eea;
    --primary-light: #a3b1f7;
    --secondary: #9370db;
    --success: #68d391;
    --success-light: #9ae6b4;
    --warning: #f6ad55;
    --warning-light: #fbd38d;
    --danger: #fc8181;
    --danger-light: #feb2b2;
    --dark: #f7fafc;
    --dark-alt: #e2e8f0;
    --light: #1a202c;
    --lighter: #0d1117;
    --border: #2d3748;
    --border-light: #3d4a5c;
    --text: #e2e8f0;
    --text-light: #a0aec0;
    --text-muted: #718096;
    --card-bg: #2d3748;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(124, 138, 237, 0.4);
}

[data-theme="dark"] body {
    background: #1a202c;
    color: #e2e8f0;
}

[data-theme="dark"] .navbar {
    background: linear-gradient(135deg, rgba(26, 32, 44, 0.98) 0%, rgba(26, 32, 44, 0.95) 100%);
    border-bottom: 1px solid rgba(124, 138, 237, 0.2);
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #5568d3 0%, #764ba2 100%);
}

[data-theme="dark"] .topic-card,
[data-theme="dark"] .lab-card,
[data-theme="dark"] .demo-card,
[data-theme="dark"] .section-preview,
[data-theme="dark"] .progress-stat-card,
[data-theme="dark"] .progress-chart,
[data-theme="dark"] .recent-activity,
[data-theme="dark"] .calculator-input,
[data-theme="dark"] .calculator-results,
[data-theme="dark"] .info-card,
[data-theme="dark"] .quiz-container,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .auth-modal-content,
[data-theme="dark"] .topic-modal-content,
[data-theme="dark"] .video-modal-content {
    background: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] .quiz-sidebar,
[data-theme="dark"] .activity-item,
[data-theme="dark"] .answer-option,
[data-theme="dark"] .result-item,
[data-theme="dark"] .info-item,
[data-theme="dark"] .tip-item,
[data-theme="dark"] .section-quiz {
    background: #1a202c;
}

[data-theme="dark"] .nav-submenu,
[data-theme="dark"] .nav-menu {
    background: #2d3748;
}

[data-theme="dark"] input,
[data-theme="dark"] .category-btn {
    background: #1a202c;
    color: #e2e8f0;
    border-color: #4a5568;
}

[data-theme="dark"] .consent-banner {
    background: #2d3748;
    border-top-color: var(--primary);
}

[data-theme="dark"] .ad-container {
    background: #2d3748;
    border-color: #4a5568;
}

[data-theme="dark"] .ad-leaderboard,
[data-theme="dark"] .ad-skyscraper,
[data-theme="dark"] .ad-square {
    background: #1a202c;
}

[data-theme="dark"] .lab-difficulty.beginner {
    background: #22543d;
    color: #c6f6d5;
}

[data-theme="dark"] .lab-difficulty.intermediate {
    background: #7c2d12;
    color: #fed7aa;
}

[data-theme="dark"] .lab-difficulty.advanced {
    background: #742a2a;
    color: #feb2b2;
}

/* Additional Dark Mode Fixes for White Backgrounds */
[data-theme="dark"] .quiz-control-btn {
    background: #1a202c;
    color: #e2e8f0;
    border-color: #4a5568;
}

[data-theme="dark"] .quiz-control-btn:hover:not(:disabled) {
    background: #2d3748;
    border-color: var(--primary);
}

[data-theme="dark"] .quiz-settings {
    background: #2d3748 !important;
    color: #e2e8f0;
}

[data-theme="dark"] .explanation {
    background: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] .reference-card,
[data-theme="dark"] .command-card,
[data-theme="dark"] .tip-card,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .study-card,
[data-theme="dark"] .plan-card,
[data-theme="dark"] .resource-card {
    background: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] .modal-content,
[data-theme="dark"] .popup-content,
[data-theme="dark"] .dialog-content {
    background: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] table,
[data-theme="dark"] .reference-table {
    background: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] .reference-table td,
[data-theme="dark"] table td {
    border-color: #4a5568;
    color: #e2e8f0;
}

[data-theme="dark"] .reference-table tr:hover,
[data-theme="dark"] table tr:hover {
    background: #1a202c;
}

[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-control {
    background: #1a202c;
    color: #e2e8f0;
    border-color: #4a5568;
}

[data-theme="dark"] .card,
[data-theme="dark"] .panel,
[data-theme="dark"] .box,
[data-theme="dark"] .container-card {
    background: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] .highlight-box {
    background: #3d3a1a;
    border-left-color: #f6ad55;
    color: #fbd38d;
}

[data-theme="dark"] .sheet-option,
[data-theme="dark"] .print-option {
    background: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
}

[data-theme="dark"] .sheet-option:hover,
[data-theme="dark"] .print-option:hover {
    border-color: var(--primary);
    background: #3d4a5c;
}

[data-theme="dark"] .sheet-option.selected {
    background: linear-gradient(135deg, rgba(124, 138, 237, 0.2), rgba(147, 112, 219, 0.2));
}

[data-theme="dark"] .stats-panel,
[data-theme="dark"] .stat-box,
[data-theme="dark"] .info-box {
    background: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] .mode-btn,
[data-theme="dark"] .category-chip,
[data-theme="dark"] .filter-chip,
[data-theme="dark"] .tag {
    background: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
}

[data-theme="dark"] .mode-btn:hover,
[data-theme="dark"] .category-chip:hover {
    border-color: var(--primary);
    background: #3d4a5c;
}

[data-theme="dark"] .flashcard,
[data-theme="dark"] .flashcard-inner,
[data-theme="dark"] .flashcard-front,
[data-theme="dark"] .flashcard-back {
    background: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] .progress-bar-container,
[data-theme="dark"] .progress-track {
    background: #1a202c;
}

[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .select-dropdown,
[data-theme="dark"] .autocomplete-list {
    background: #2d3748;
    border-color: #4a5568;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .select-option:hover {
    background: #3d4a5c;
}

[data-theme="dark"] .tooltip,
[data-theme="dark"] .popover {
    background: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
}

[data-theme="dark"] .breadcrumb,
[data-theme="dark"] .pagination {
    background: #2d3748;
}

[data-theme="dark"] .alert,
[data-theme="dark"] .notice,
[data-theme="dark"] .message-box {
    background: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] .tab-content,
[data-theme="dark"] .tab-panel {
    background: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] .list-item,
[data-theme="dark"] .menu-item {
    background: #2d3748;
}

[data-theme="dark"] .list-item:hover,
[data-theme="dark"] .menu-item:hover {
    background: #3d4a5c;
}

[data-theme="dark"] .sidebar,
[data-theme="dark"] .aside {
    background: #2d3748;
}

[data-theme="dark"] .header-section,
[data-theme="dark"] .footer-section {
    background: #1a202c;
}

[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn-outline {
    background: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
}

[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .btn-outline:hover {
    background: #3d4a5c;
    border-color: var(--primary);
}

[data-theme="dark"] .lab-objectives,
[data-theme="dark"] .lab-steps,
[data-theme="dark"] .checklist {
    background: #1a202c;
    color: #e2e8f0;
}

[data-theme="dark"] .code-block,
[data-theme="dark"] pre {
    background: #1a202c;
    color: #e2e8f0;
}

[data-theme="dark"] .exam-section,
[data-theme="dark"] .study-section,
[data-theme="dark"] .content-section {
    background: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] .icon-box,
[data-theme="dark"] .feature-icon {
    background: #3d4a5c;
}

[data-theme="dark"] .divider,
[data-theme="dark"] hr {
    border-color: #4a5568;
}

[data-theme="dark"] .footer {
    background: #1a202c;
    color: #a0aec0;
}

[data-theme="dark"] .footer a {
    color: #a0aec0;
}

[data-theme="dark"] .footer a:hover {
    color: var(--primary);
}

[data-theme="dark"] ::placeholder {
    color: #718096;
}

[data-theme="dark"] .section-alt {
    background: #151a23;
}

/* ==========================================
   ANIMATIONS & KEYFRAMES
   ========================================== */

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

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

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Page Load Animation */
.page-transition {
    animation: fadeIn 0.4s ease-out;
}

/* Staggered Animations for Lists */
.animate-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.25s; }
.animate-stagger > *:nth-child(6) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(7) { animation-delay: 0.35s; }
.animate-stagger > *:nth-child(8) { animation-delay: 0.4s; }

/* Animation Utility Classes */
.animate-fadeIn { animation: fadeIn 0.4s ease-out forwards; }
.animate-fadeInUp { animation: fadeInUp 0.5s ease-out forwards; }
.animate-fadeInDown { animation: fadeInDown 0.5s ease-out forwards; }
.animate-fadeInLeft { animation: fadeInLeft 0.5s ease-out forwards; }
.animate-fadeInRight { animation: fadeInRight 0.5s ease-out forwards; }
.animate-scaleIn { animation: scaleIn 0.3s ease-out forwards; }
.animate-bounce { animation: bounce 0.6s ease infinite; }

/* ==========================================
   SKELETON LOADING STATES
   ========================================== */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--border) 25%,
        var(--border-light) 50%,
        var(--border) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius);
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    border-radius: var(--radius-sm);
}

.skeleton-text:last-child {
    width: 70%;
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 1em;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
}

.skeleton-card {
    height: 200px;
    border-radius: var(--radius-md);
}

.skeleton-button {
    height: 40px;
    width: 120px;
    border-radius: var(--radius);
}

/* Loading Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* ==========================================
   FOCUS & ACCESSIBILITY STATES
   ========================================== */

/* Better Focus Rings */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    z-index: 10000;
    transition: top var(--transition);
}

.skip-link:focus {
    top: 10px;
}

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

/* ==========================================
   MICRO-INTERACTIONS
   ========================================== */

/* Button Press Effect */
.btn-press {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-press:active {
    transform: scale(0.97);
}

/* Ripple Effect Container */
.ripple-container {
    position: relative;
    overflow: hidden;
}

.ripple-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

.ripple-container:active::after {
    animation: ripple 0.6s ease-out;
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform var(--transition), box-shadow var(--transition);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Hover Glow Effect */
.hover-glow {
    transition: box-shadow var(--transition);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow);
}

/* Card Hover Effect */
.card-interactive {
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card-interactive:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

/* Icon Hover Rotate */
.icon-hover-rotate {
    transition: transform var(--transition);
}

.icon-hover-rotate:hover {
    transform: rotate(15deg);
}

/* Link Underline Animation */
.link-animated {
    position: relative;
    text-decoration: none;
}

.link-animated::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition);
}

.link-animated:hover::after {
    width: 100%;
}

/* ==========================================
   POLISH & ENHANCEMENTS
   ========================================== */

/* Smooth Page Load - Applied via JS class */
body.page-loaded {
    animation: pageLoad 0.4s ease-out;
}

@keyframes pageLoad {
    from {
        opacity: 0.8;
    }
    to {
        opacity: 1;
    }
}

/* Enhanced Button Styles */
button, .btn, [type="button"], [type="submit"] {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

button:not(:disabled):hover,
.btn:not(:disabled):hover,
[type="button"]:not(:disabled):hover,
[type="submit"]:not(:disabled):hover {
    transform: translateY(-2px);
}

button:not(:disabled):active,
.btn:not(:disabled):active,
[type="button"]:not(:disabled):active,
[type="submit"]:not(:disabled):active {
    transform: translateY(0) scale(0.98);
}

/* Button Shine Effect */
button::before,
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

button:hover::before,
.btn:hover::before {
    left: 100%;
}

/* Card Entrance Animation - hover only, no opacity changes on load */

/* Enhanced Card Hover */
.topic-card:hover,
.lab-card:hover,
.demo-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-overlay .spinner {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

.loading-text {
    color: var(--text-light);
    font-weight: 500;
}

[data-theme="dark"] .loading-overlay {
    background: rgba(26, 32, 44, 0.95);
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Better Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Progress Indicator at Top */
.page-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 10001;
    transition: width 0.1s ease;
}

/* Toast Improvements */
.toast {
    animation: toastSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* Form Input Enhancements */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    transition: all 0.3s ease;
    border: 2px solid var(--border);
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

/* Checkbox/Radio Enhancements */
input[type="checkbox"],
input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
    transition: transform 0.2s ease;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
    transform: scale(1.1);
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    animation: checkPop 0.3s ease;
}

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

/* Badge Pulse for Notifications */
.badge-pulse {
    position: relative;
}

.badge-pulse::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    animation: badgePulse 2s ease infinite;
}

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

/* Image Lazy Load Fade */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded,
img[loading="lazy"]:not([src=""]) {
    opacity: 1;
}

/* Section titles - no opacity animation to prevent disappearing */

/* Floating Labels for Inputs */
.float-label {
    position: relative;
}

.float-label label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.3s ease;
    background: white;
    padding: 0 0.25rem;
}

.float-label input:focus + label,
.float-label input:not(:placeholder-shown) + label {
    top: 0;
    font-size: 0.75rem;
    color: var(--primary);
}

[data-theme="dark"] .float-label label {
    background: #2d3748;
}

/* ==========================================
   IMPROVED TYPOGRAPHY
   ========================================== */

/* Better Text Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* Improved Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: var(--line-tight);
    color: var(--text);
    letter-spacing: -0.02em;
}

/* Better Paragraph Spacing */
p + p {
    margin-top: 1em;
}

/* Code Styling */
code:not([class*="language-"]) {
    font-family: var(--font-mono);
    font-size: 0.9em;
    padding: 0.2em 0.4em;
    background: var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--danger);
}

[data-theme="dark"] code:not([class*="language-"]) {
    background: var(--border);
    color: var(--danger-light);
}

/* ==========================================
   MOBILE IMPROVEMENTS
   ========================================== */

/* Better Touch Targets */
@media (pointer: coarse) {
    button,
    a,
    input[type="checkbox"],
    input[type="radio"],
    select {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-link {
        padding: 12px 16px;
    }
}

/* Safe Area Padding for Notched Devices */
@supports (padding: env(safe-area-inset-bottom)) {
    .footer {
        padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    }

    .mobile-overlay {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Prevent Text Size Adjustment on Mobile */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Smooth Scrolling Container */
.scroll-smooth {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Hide Scrollbar but Keep Functionality */
.scrollbar-hidden {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hidden::-webkit-scrollbar {
    display: none;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    line-height: var(--line-normal);
    background: var(--light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color var(--transition), transform var(--transition-fast);
    position: relative;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
}

.nav-link:hover {
    color: var(--primary);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
}

/* Dropdown Navigation */
.nav-menu > li {
    position: relative;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown > a {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.nav-dropdown:hover .nav-dropdown-arrow {
    transform: rotate(180deg);
}

.nav-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    list-style: none;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-dropdown:hover .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-submenu li {
    padding: 0;
}

.nav-submenu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-submenu a:hover {
    background: linear-gradient(135deg, #667eea10, #764ba220);
    color: var(--primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 6rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.95;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 3rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
}

.cta-button {
    background: white;
    color: var(--primary);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:active {
    transform: translateY(0) scale(0.98);
}

/* Sections */
.section {
    padding: 5rem 2rem;
}

.section-alt {
    background: white;
}

[data-theme="dark"] .section-alt {
    background: #1a202c;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Topics Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.topic-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid transparent;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    cursor: pointer;
    animation: fadeInUp 0.5s ease-out backwards;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.topic-card:active {
    transform: translateY(-2px) scale(0.99);
}

.topic-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.topic-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.topic-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.topic-progress {
    margin-top: 1.5rem;
}

.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-light);
}

.study-guide-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.study-guide-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    filter: brightness(1.1);
}

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

/* Labs Grid */
.labs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.lab-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: transform var(--transition), box-shadow var(--transition);
    animation: fadeInUp 0.5s ease-out backwards;
}

.lab-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.lab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.lab-difficulty {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.lab-difficulty.beginner {
    background: #c6f6d5;
    color: #22543d;
}

.lab-difficulty.intermediate {
    background: #fed7aa;
    color: #7c2d12;
}

.lab-difficulty.advanced {
    background: #feb2b2;
    color: #742a2a;
}

.lab-duration {
    font-size: 0.875rem;
    color: var(--text-light);
}

.lab-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.lab-card > p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.lab-objectives {
    list-style: none;
    margin-bottom: 1.5rem;
}

.lab-objectives li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
    font-size: 0.95rem;
}

.lab-objectives li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

.lab-button {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 0.875rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.lab-button:hover {
    opacity: 0.9;
}

/* Quiz Container */
.quiz-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.quiz-sidebar {
    background: var(--light);
    padding: 2rem;
}

.quiz-sidebar h3 {
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 2px solid transparent;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    font-size: 0.95rem;
}

.category-btn:hover {
    border-color: var(--primary);
}

.category-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.badge {
    background: var(--border);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.category-btn.active .badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.quiz-main {
    padding: 2rem;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.quiz-timer {
    font-weight: 600;
    color: var(--primary);
}

.question-container {
    margin-bottom: 2rem;
}

.question-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--dark);
}

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

.answer-option {
    background: var(--light);
    border: 2px solid var(--border);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.answer-option:hover {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.answer-option.selected {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
}

.answer-option.correct {
    border-color: var(--success);
    background: rgba(72, 187, 120, 0.1);
}

.answer-option.incorrect {
    border-color: var(--danger);
    background: rgba(245, 101, 101, 0.1);
}

.answer-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.answer-option.correct .answer-letter {
    background: var(--success);
}

.answer-option.incorrect .answer-letter {
    background: var(--danger);
}

.quiz-controls {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.quiz-control-btn {
    padding: 0.75rem 2rem;
    border: 2px solid var(--border);
    background: white;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-control-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.quiz-control-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
}

.quiz-control-btn.primary:hover {
    opacity: 0.9;
}

.quiz-control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.explanation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--light);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
}

.explanation.hidden {
    display: none;
}

.explanation h4 {
    margin-bottom: 0.75rem;
    color: var(--primary);
}

/* Demos Grid */
.demos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.demo-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.demo-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.demo-thumbnail {
    height: 180px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.demo-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.demo-content {
    padding: 1.5rem;
}

.demo-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.demo-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.demo-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Progress Dashboard */
.progress-dashboard {
    display: grid;
    gap: 2rem;
}

.progress-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.progress-stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.stat-icon {
    font-size: 2.5rem;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.stat-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transition: width 0.5s ease;
}

.progress-chart {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.progress-chart h3 {
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.recent-activity {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.recent-activity h3 {
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
}

.activity-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    color: var(--text-light);
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 3rem 2rem 1.5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Topic Modal */
.topic-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
    padding: 2rem;
    overflow-y: auto;
}

.topic-modal.active {
    opacity: 1;
}

.topic-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.topic-modal.active .topic-modal-content {
    transform: scale(1);
}

.topic-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid var(--border);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 12px 12px 0 0;
}

.topic-modal-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topic-modal-icon {
    font-size: 2.5rem;
}

.topic-modal-title h2 {
    margin: 0;
    font-size: 1.75rem;
}

.topic-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.topic-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.topic-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.topic-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.topic-section:last-child {
    border-bottom: none;
}

.topic-section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.topic-section-number {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.topic-section-content {
    color: var(--text);
    line-height: 1.8;
    font-size: 1rem;
}

.topic-section-content strong {
    color: var(--primary);
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.topic-section-content br + strong {
    margin-top: 1.5rem;
}

.topic-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 2px solid var(--border);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    background: var(--light);
    border-radius: 0 0 12px 12px;
}

.topic-action-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.topic-action-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.topic-action-btn.secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.topic-action-btn.secondary:hover {
    background: var(--primary);
    color: white;
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
    padding: 2rem;
}

.video-modal.active {
    opacity: 1;
}

.video-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s;
    overflow: hidden;
}

.video-modal.active .video-modal-content {
    transform: scale(1);
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.video-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.video-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.video-modal-body {
    overflow-y: auto;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-info {
    padding: 2rem;
    display: grid;
    gap: 2rem;
}

.video-description h3,
.video-topics h3 {
    color: var(--dark);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.video-description p {
    color: var(--text);
    line-height: 1.6;
}

.video-topics ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.video-topics li {
    padding: 0.75rem 1rem;
    background: var(--light);
    border-left: 3px solid var(--primary);
    border-radius: 4px;
    color: var(--text);
}

/* Home Page - Learning Sections */
.learning-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
}

.section-preview {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.section-preview:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.section-preview-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.section-preview h3 {
    font-size: 1.75rem;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.section-preview > p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.section-preview-stats {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.preview-features {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex: 1;
}

.preview-feature {
    color: var(--text);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.section-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
    font-size: 1rem;
}

.section-btn:hover {
    opacity: 0.9;
}

/* Quick Start Guide */
.quick-start {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.start-step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

.start-step h3 {
    font-size: 1.35rem;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.start-step p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Dark Mode Toggle */
.theme-toggle {
    background: none;
    border: 2px solid var(--border);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    color: var(--text);
    margin-left: 1rem;
}

.theme-toggle:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.theme-toggle-icon {
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-toggle-icon {
    transform: rotate(20deg);
}

@media (max-width: 768px) {
    .theme-toggle {
        margin-left: auto;
        padding: 0.4rem 0.875rem;
        font-size: 1.1rem;
    }
}

/* Responsive Design - Enhanced Mobile */
/* Extra Small Devices (Phones, less than 480px) */
@media (max-width: 480px) {
    .nav-container {
        padding: 1rem;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .cta-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .section {
        padding: 3rem 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .topic-card,
    .lab-card,
    .demo-card,
    .section-preview {
        padding: 1.5rem;
    }

    .quiz-container {
        grid-template-columns: 1fr;
    }

    .quiz-main {
        padding: 1.5rem;
    }

    .question-text {
        font-size: 1.1rem;
    }

    .answer-option {
        padding: 0.875rem 1rem;
    }

    .quiz-control-btn {
        padding: 0.625rem 1.5rem;
        font-size: 0.9rem;
    }

    .footer {
        padding: 2rem 1rem 1rem;
    }

    .footer-content {
        gap: 1.5rem;
    }
}

/* Small Devices (Phones, 480px to 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .learning-sections {
        grid-template-columns: 1fr;
    }
}

/* Medium Devices (Tablets, 768px to 1023px) */
@media (max-width: 768px) {
    /* Hide desktop menu, show mobile toggle */
    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        background: white;
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
        flex-direction: column;
        padding: 5rem 1.5rem 2rem;
        gap: 0;
        transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    /* Staggered menu item animations */
    .nav-menu.active > li {
        opacity: 0;
        transform: translateX(-20px);
        animation: menuItemSlide 0.4s ease-out forwards;
    }

    .nav-menu.active > li:nth-child(1) { animation-delay: 0.1s; }
    .nav-menu.active > li:nth-child(2) { animation-delay: 0.15s; }
    .nav-menu.active > li:nth-child(3) { animation-delay: 0.2s; }
    .nav-menu.active > li:nth-child(4) { animation-delay: 0.25s; }
    .nav-menu.active > li:nth-child(5) { animation-delay: 0.3s; }
    .nav-menu.active > li:nth-child(6) { animation-delay: 0.35s; }
    .nav-menu.active > li:nth-child(7) { animation-delay: 0.4s; }

    @keyframes menuItemSlide {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .nav-link {
        display: block;
        padding: 1rem 0;
        font-size: 1rem;
    }

    .nav-link::after {
        display: none;
    }

    .nav-dropdown .nav-submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin-top: 0;
        padding-left: 1rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-dropdown.active .nav-submenu {
        max-height: 400px;
    }

    .auth-button-group {
        width: 100%;
        flex-direction: column;
        border-left: none;
        border-top: 1px solid var(--border);
        padding: 1rem 0 0;
        margin: 1rem 0 0;
    }

    .auth-btn-nav {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
    }

    .user-menu {
        width: 100%;
        justify-content: space-between;
        padding: 0.75rem 1rem;
    }

    /* Overlay for mobile menu */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.35s ease;
    }

    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .hero {
        padding: 4rem 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .section {
        padding: 4rem 1.5rem;
    }

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

    .quiz-container {
        grid-template-columns: 1fr;
    }

    .quiz-sidebar {
        order: 2;
        padding: 1.5rem;
    }

    .quiz-main {
        padding: 1.5rem;
    }

    .quiz-controls {
        flex-direction: column;
    }

    .quiz-control-btn {
        width: 100%;
    }

    .topics-grid,
    .labs-grid,
    .demos-grid {
        grid-template-columns: 1fr;
    }

    .topic-modal {
        padding: 1rem;
    }

    .topic-modal-content {
        max-height: 95vh;
    }

    .topic-modal-header {
        padding: 1.5rem;
    }

    .topic-modal-title h2 {
        font-size: 1.35rem;
    }

    .topic-modal-body {
        padding: 1.5rem;
    }

    .topic-modal-footer {
        flex-direction: column;
    }

    .topic-action-btn {
        width: 100%;
    }

    .video-modal {
        padding: 0;
    }

    .video-modal-content {
        border-radius: 0;
        max-height: 100vh;
    }

    .video-modal-header {
        padding: 1rem 1.5rem;
    }

    .video-modal-header h2 {
        font-size: 1.25rem;
    }

    .video-info {
        padding: 1.5rem;
    }

    .video-topics ul {
        grid-template-columns: 1fr;
    }

    .learning-sections {
        grid-template-columns: 1fr;
    }

    .section-preview {
        padding: 2rem;
    }

    .quick-start {
        grid-template-columns: 1fr;
    }

    .progress-overview {
        grid-template-columns: 1fr;
    }

    .category-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .category-btn {
        flex: 1;
        min-width: 120px;
    }
}

/* Large Tablets and Small Desktops (1024px to 1199px) */
@media (min-width: 769px) and (max-width: 1023px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }

    .nav-menu {
        gap: 0.75rem;
    }

    .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.875rem;
    }

    .learning-sections {
        grid-template-columns: repeat(2, 1fr);
    }

    .topics-grid,
    .labs-grid,
    .demos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Improved Touch Targets for Mobile */
@media (max-width: 768px) {
    button,
    .nav-link,
    .cta-button,
    .lab-button,
    .section-btn,
    .answer-option,
    .quiz-control-btn {
        min-height: 44px;
        min-width: 44px;
    }

    /* Better spacing for mobile content */
    .container {
        padding: 0 1rem;
    }
}

/* Exam Information Page Styles */
.info-section {
    margin-bottom: 3rem;
}

.info-heading {
    font-size: 1.75rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary);
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-item {
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.info-item strong {
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}

/* Pricing Section */
.pricing-info {
    text-align: center;
}

.price-main {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
}

.currency {
    font-size: 2rem;
}

.amount {
    font-size: 5rem;
}

.usd {
    font-size: 1.5rem;
    color: var(--text-light);
}

.price-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
    text-align: left;
    color: var(--text);
}

.price-note a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.price-note a:hover {
    text-decoration: underline;
}

/* Exam Topics */
.exam-topics {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.topic-section h4 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.topic-section ul {
    list-style: none;
    padding-left: 0;
}

.topic-section li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.topic-section li:last-child {
    border-bottom: none;
}

.topic-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

/* Scheduling Steps */
.scheduling-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    color: var(--dark);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.step-content p {
    color: var(--text);
    margin-bottom: 0.75rem;
}

.step-content ul {
    list-style: none;
    padding-left: 0;
}

.step-content li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.step-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.step-content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.step-content a:hover {
    text-decoration: underline;
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.resource-item h4 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.resource-item ul {
    list-style: none;
    padding-left: 0;
}

.resource-item li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.resource-item li::before {
    content: '📌';
    position: absolute;
    left: 0;
}

.resource-item a {
    color: var(--primary);
    text-decoration: none;
}

.resource-item a:hover {
    text-decoration: underline;
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tip-item {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid var(--border);
    transition: all 0.3s;
}

.tip-item:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tip-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tip-item h4 {
    color: var(--dark);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.tip-item p {
    color: var(--text);
    font-size: 0.95rem;
}

/* Responsive Design for Exam Info */
@media (max-width: 768px) {
    .price-main {
        font-size: 3rem;
    }

    .amount {
        font-size: 4rem;
    }

    .step {
        flex-direction: column;
        gap: 1rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .resources-grid {
        grid-template-columns: 1fr;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }
}

/* Subnet Calculator Styles */
.calculator-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-top: 2rem;
}

.calculator-input,
.calculator-results {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.calculator-input h3,
.calculator-results h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.calculate-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

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

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.result-item {
    background: var(--light);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-item.full-width {
    grid-column: 1 / -1;
}

.result-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.result-value {
    font-size: 1.1rem;
    color: var(--dark);
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.result-value.binary {
    font-size: 0.9rem;
    word-break: break-all;
    line-height: 1.6;
}

/* Responsive Design for Calculator */
@media (max-width: 968px) {
    .calculator-container {
        grid-template-columns: 1fr;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .result-item.full-width {
        grid-column: 1;
    }
}

@media (max-width: 480px) {
    .calculator-input,
    .calculator-results {
        padding: 1.5rem;
    }

    .input-group input {
        font-size: 0.9rem;
    }

    .result-value {
        font-size: 1rem;
    }
}

/* Authentication Pages Styles */
.auth-section {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-card h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.form-group input {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-hint {
    font-size: 0.875rem;
    color: var(--text-light);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label a {
    color: var(--primary);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-btn {
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

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

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-light);
    margin: 0.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.auth-divider span {
    padding: 0 1rem;
    font-size: 0.9rem;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--dark);
}

.google-btn:hover {
    border-color: var(--primary);
    background: var(--light);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
    text-align: center;
}

.auth-message.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.auth-message.success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* User Menu in Navigation */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: var(--dark);
    font-weight: 600;
}

.logout-btn {
    padding: 0.5rem 1rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.logout-btn:hover {
    opacity: 0.8;
}

.signup-link {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.signup-link:hover {
    opacity: 0.9;
}

/* Responsive Auth Pages */
@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }

    .auth-card h2 {
        font-size: 1.5rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Authentication Modal Styles */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-modal-content {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 450px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--light);
    color: var(--dark);
}

.auth-modal-content h2 {
    font-size: 1.75rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    text-align: center;
}

.modal-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.auth-modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.modal-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-form-group label {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.modal-form-group input {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: 'Inter', sans-serif;
}

.modal-form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-auth-btn {
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 0.5rem;
}

.modal-auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
}

.modal-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text);
    font-size: 0.9rem;
}

.modal-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.modal-footer a:hover {
    text-decoration: underline;
}

.modal-message {
    padding: 0.875rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
    text-align: center;
    font-size: 0.9rem;
}

.modal-message.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.modal-message.success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* Responsive Modal */
@media (max-width: 480px) {
    .auth-modal-content {
        padding: 2rem 1.5rem;
    }

    .auth-modal-content h2 {
        font-size: 1.5rem;
    }
}

/* Compact Navigation Fix */
.nav-menu {
    gap: 1rem !important;
    flex-wrap: wrap;
    align-items: center;
}

.nav-link {
    font-size: 0.9rem !important;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: var(--light);
    border-radius: 8px;
}

.user-name {
    font-size: 0.9rem;
    color: var(--dark);
    font-weight: 600;
}

.logout-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

.signup-link {
    font-size: 0.9rem !important;
    padding: 0.4rem 0.75rem !important;
}

/* Responsive Navigation */
@media (max-width: 1200px) {
    .nav-menu {
        gap: 0.75rem !important;
    }
    
    .nav-link {
        font-size: 0.85rem !important;
        padding: 0.25rem 0.4rem;
    }
}

@media (max-width: 1024px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-menu {
        justify-content: center;
        gap: 0.5rem !important;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.5rem;
        width: 100%;
        text-align: center;
    }
    
    .nav-link {
        font-size: 0.8rem !important;
    }
}

/* Advertisement Containers */
.ad-container {
    background: #f0f0f0;
    border: 2px solid #ccc;
    border-radius: 8px;
    padding: 1rem;
    margin: 2rem auto;
    text-align: center;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

.ad-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    font-weight: 700;
    background: #e0e0e0;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    display: inline-block;
}

/* Top Ad - Leaderboard */
.ad-top {
    max-width: 1200px;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border: 3px solid #bbb;
}

.ad-leaderboard {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 4px;
}

/* Bottom Ad - Leaderboard */
.ad-bottom {
    max-width: 1200px;
    margin-top: 3rem;
    margin-bottom: 2rem;
    border: 3px solid #bbb;
}

/* Sidebar Ads */
.ad-sidebar-container {
    position: relative;
    width: 100%;
}

.ad-sidebar-left {
    position: fixed;
    left: 20px;
    top: 250px;
    width: 160px;
    z-index: 100;
    border: 3px solid #bbb;
}

.ad-sidebar-right {
    position: fixed;
    right: 20px;
    top: 250px;
    width: 160px;
    z-index: 100;
    border: 3px solid #bbb;
}

.ad-skyscraper {
    min-height: 600px;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Square Ads (300x250) */
.ad-square {
    min-height: 250px;
    width: 300px;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem auto;
}

/* Responsive Ad Behavior */
@media (max-width: 1400px) {
    .ad-sidebar-left,
    .ad-sidebar-right {
        display: none;
    }
    
    /* Show inline ads on smaller screens */
    .ad-inline-mobile {
        display: block !important;
    }
}

@media (max-width: 768px) {
    .ad-leaderboard {
        min-height: 50px;
    }
    
    .ad-top,
    .ad-bottom {
        margin: 1rem;
    }
    
    .ad-container {
        padding: 0.5rem;
    }
}

/* Ad Placeholder Styling */
.ad-space:empty::before {
    content: 'Ad Space';
    color: var(--text-light);
    font-size: 0.875rem;
}

/* In-content Ad */
.ad-inline {
    margin: 3rem auto;
    max-width: 728px;
}

.ad-inline-mobile {
    display: none;
}

/* GDPR Consent Banner */
.consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 3px solid var(--primary);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    z-index: 10000;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.consent-content p {
    margin: 0;
    color: var(--text);
    flex: 1;
}

.consent-buttons {
    display: flex;
    gap: 1rem;
}

.consent-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.consent-btn.accept {
    background: var(--primary);
    color: white;
}

.consent-btn.accept:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.consent-btn.decline {
    background: var(--light);
    color: var(--text);
    border: 2px solid var(--border);
}

.consent-btn.decline:hover {
    background: var(--border);
}

@media (max-width: 768px) {
    .consent-content {
        flex-direction: column;
        text-align: center;
    }

    .consent-buttons {
        width: 100%;
        flex-direction: column;
    }

    .consent-btn {
        width: 100%;
    }
}

/* Enhanced Elegant Navigation */
.navbar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(102, 126, 234, 0.08);
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.nav-container {
    max-width: 1400px;
    gap: 3rem;
}

.logo {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
    transition: transform 0.3s ease;
}

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

.logo svg {
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.2));
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    flex-wrap: nowrap;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 70%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

/* Auth Button Group */
.auth-button-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(102, 126, 234, 0.15);
}

.auth-nav-item {
    list-style: none;
}

.auth-btn-nav {
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.auth-btn-nav.login {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.auth-btn-nav.login:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.auth-btn-nav.signup {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.auth-btn-nav.signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* User Menu Enhanced */
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    border-radius: 25px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.user-menu:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.12));
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.user-name {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
}

.logout-btn {
    padding: 0.4rem 1rem;
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Responsive Navigation Updates */
@media (max-width: 1200px) {
    .nav-container {
        gap: 1.5rem;
    }

    .nav-menu {
        gap: 0.25rem;
    }

    .nav-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    .auth-btn-nav {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 1024px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .auth-button-group {
        border-left: none;
        border-top: 2px solid rgba(102, 126, 234, 0.15);
        padding-left: 0;
        padding-top: 0.75rem;
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

@media (max-width: 768px) {
    .nav-link {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }

    .auth-btn-nav {
        font-size: 0.75rem;
        padding: 0.4rem 0.9rem;
    }

    .user-menu {
        padding: 0.4rem 1rem;
    }

    .user-name {
        font-size: 0.85rem;
    }

    .logout-btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.85rem;
    }
}

/* Achievement Badges and Certificates */
.achievements-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.achievements-section h3 {
    margin-bottom: 1.5rem;
    color: var(--dark);
    font-size: 1.5rem;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem;
}

.badge-item {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--light);
    border-radius: 12px;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
}

.badge-item.earned {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.badge-item.locked {
    opacity: 0.5;
    filter: grayscale(100%);
}

.badge-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.badge-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    display: block;
}

.badge-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.badge-description {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.4;
}

.badge-date {
    font-size: 0.75rem;
    color: var(--success);
    margin-top: 0.5rem;
    font-weight: 600;
}

.badge-progress {
    margin-top: 0.75rem;
    width: 100%;
}

.badge-progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.badge-progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transition: width 0.5s ease;
}

.badge-progress-text {
    font-size: 0.7rem;
    color: var(--text-light);
}

/* Certificate */
.certificate-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.certificate {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    border: 8px double var(--primary);
    border-radius: 12px;
    text-align: center;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.certificate::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 2px solid var(--secondary);
    border-radius: 4px;
    pointer-events: none;
}

.certificate-badge {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.certificate-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.certificate-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.certificate-recipient {
    font-size: 2rem;
    font-weight: 600;
    color: var(--dark);
    margin: 2rem 0;
    font-family: 'Georgia', serif;
}

.certificate-text {
    font-size: 1.1rem;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.certificate-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
}

.certificate-stat {
    text-align: center;
}

.certificate-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.certificate-stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.certificate-date {
    font-size: 1rem;
    color: var(--text-light);
    margin-top: 2rem;
}

.certificate-signature {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
    display: flex;
    justify-content: center;
    gap: 4rem;
}

.signature-line {
    text-align: center;
}

.signature-name {
    font-family: 'Georgia', serif;
    font-size: 1.5rem;
    font-style: italic;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.signature-title {
    font-size: 0.9rem;
    color: var(--text-light);
    border-top: 2px solid var(--dark);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.certificate-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.cert-action-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.cert-action-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.cert-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.cert-action-btn.secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.cert-action-btn.secondary:hover {
    background: var(--primary);
    color: white;
}

/* Milestone Progress */
.milestones-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.milestone-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: var(--light);
    border-radius: 12px;
    border-left: 4px solid var(--border);
    transition: all 0.3s ease;
}

.milestone-item.completed {
    border-left-color: var(--success);
    background: rgba(72, 187, 120, 0.05);
}

.milestone-item.active {
    border-left-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.milestone-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.milestone-content {
    flex: 1;
}

.milestone-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.milestone-description {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.milestone-progress {
    margin-bottom: 0.5rem;
}

.milestone-progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.milestone-progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transition: width 0.5s ease;
}

.milestone-progress-text {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 600;
}

.milestone-reward {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--warning), #f6ad55);
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .certificate {
        padding: 2rem 1.5rem;
        border-width: 4px;
    }

    .certificate-title {
        font-size: 1.75rem;
    }

    .certificate-recipient {
        font-size: 1.5rem;
    }

    .certificate-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .certificate-signature {
        flex-direction: column;
        gap: 2rem;
    }

    .cert-action-btn {
        width: 100%;
    }

    .badges-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
    }

    .milestone-item {
        flex-direction: column;
        text-align: center;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .achievements-section,
[data-theme="dark"] .certificate-container,
[data-theme="dark"] .milestones-section {
    background: #2d3748;
}

[data-theme="dark"] .certificate {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border-color: var(--primary);
}

[data-theme="dark"] .badge-item,
[data-theme="dark"] .milestone-item {
    background: #1a202c;
}

[data-theme="dark"] .badge-item.earned,
[data-theme="dark"] .milestone-item.active {
    background: rgba(124, 138, 237, 0.1);
}

[data-theme="dark"] .milestone-item.completed {
    background: rgba(104, 211, 145, 0.1);
}

/* Social Sharing */
.share-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.share-section h3 {
    margin-bottom: 1.5rem;
    color: var(--dark);
    font-size: 1.5rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.linkedin {
    background: #0A66C2;
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.reddit {
    background: #FF4500;
}

.share-btn.copy {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.share-btn.email {
    background: #EA4335;
}

.share-icon {
    font-size: 1.25rem;
}

.share-achievement {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.achievement-info {
    flex: 1;
}

.achievement-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.achievement-description {
    color: var(--text-light);
    font-size: 0.95rem;
}

.share-achievement-btn {
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.share-achievement-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.share-modal.active {
    display: flex;
}

.share-modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.share-modal-header h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin: 0;
}

.share-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.share-close-btn:hover {
    background: var(--light);
    color: var(--dark);
}

.share-preview {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border);
}

.share-preview-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.share-preview-text {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.share-url-container {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.share-url-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--light);
}

.copy-url-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-url-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.copy-url-btn.copied {
    background: var(--success);
}

@media (max-width: 768px) {
    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        width: 100%;
        justify-content: center;
    }

    .share-achievement {
        flex-direction: column;
        text-align: center;
    }

    .share-achievement-btn {
        width: 100%;
    }

    .share-url-container {
        flex-direction: column;
    }

    .copy-url-btn {
        width: 100%;
    }
}

[data-theme="dark"] .share-section,
[data-theme="dark"] .share-modal-content {
    background: #2d3748;
}

[data-theme="dark"] .share-preview {
    background: #1a202c;
}

[data-theme="dark"] .share-url-input {
    background: #1a202c;
    color: #e2e8f0;
    border-color: #4a5568;
}

/* Search Functionality */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-box {
    width: 100%;
    padding: 1rem 3.5rem 1rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.search-icon-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.search-icon-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.search-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border: 2px solid var(--border);
    background: white;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
}

.search-results {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.search-results-count {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
}

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

.search-sort-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.search-sort-select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
}

.search-result-item {
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: var(--light);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.search-result-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow);
}

.search-result-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.search-result-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.search-result-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.search-result-highlight {
    background: rgba(102, 126, 234, 0.2);
    font-weight: 600;
    padding: 0 0.25rem;
    border-radius: 2px;
}

.search-result-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.search-result-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.search-no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.search-no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.search-no-results-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.search-no-results-hint {
    font-size: 0.95rem;
}

.search-loading {
    text-align: center;
    padding: 3rem;
}

.search-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.search-suggestions {
    background: white;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-suggestions.active {
    display: block;
}

.search-suggestion-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-suggestion-item:hover {
    background: var(--light);
}

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

.search-suggestion-icon {
    display: inline-block;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .search-container {
        margin-bottom: 1.5rem;
    }

    .search-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

    .search-results {
        padding: 1.5rem;
    }

    .search-results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .search-result-item {
        padding: 1.25rem;
    }

    .search-result-meta {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}

[data-theme="dark"] .search-box,
[data-theme="dark"] .filter-btn,
[data-theme="dark"] .search-sort-select {
    background: #1a202c;
    color: #e2e8f0;
    border-color: #4a5568;
}

[data-theme="dark"] .search-results,
[data-theme="dark"] .search-suggestions {
    background: #2d3748;
}

[data-theme="dark"] .search-result-item,
[data-theme="dark"] .search-suggestion-item {
    background: #1a202c;
}

[data-theme="dark"] .filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

[data-theme="dark"] .search-result-highlight {
    background: rgba(124, 138, 237, 0.3);
}

/* Downloads Page */
.resources-category {
    margin-bottom: 4rem;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.download-item {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid transparent;
}

.download-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

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

.download-item h3 {
    font-size: 1.25rem;
    color: var(--dark);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.download-item p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.download-all-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    margin-top: 3rem;
}

.download-all-section h3 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.download-all-section p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .download-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .download-item {
        padding: 1.5rem;
    }

    .download-all-section {
        padding: 2rem 1.5rem;
    }
}

[data-theme="dark"] .download-item {
    background: #2d3748;
}

[data-theme="dark"] .download-all-section {
    background: linear-gradient(135deg, rgba(124, 138, 237, 0.1), rgba(147, 112, 219, 0.1));
}

/* Contact Form */
.contact-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field label {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
    background: white;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-field textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-submit-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.contact-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.contact-info {
    background: var(--light);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem;
}

.contact-info h3 {
    color: var(--dark);
    margin-bottom: 1rem;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.contact-info-item:last-child {
    border-bottom: none;
}

.contact-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
    text-align: center;
}

.form-message.success {
    background: rgba(72, 187, 120, 0.1);
    color: var(--success);
    border: 2px solid var(--success);
}

.form-message.error {
    background: rgba(245, 101, 101, 0.1);
    color: var(--danger);
    border: 2px solid var(--danger);
}

@media (max-width: 768px) {
    .contact-container {
        padding: 2rem 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

[data-theme="dark"] .contact-container {
    background: #2d3748;
}

[data-theme="dark"] .form-field input,
[data-theme="dark"] .form-field select,
[data-theme="dark"] .form-field textarea {
    background: #1a202c;
    color: #e2e8f0;
    border-color: #4a5568;
}

[data-theme="dark"] .contact-info {
    background: #1a202c;
}

/* Section Quiz Styles */
.section-quiz {
    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: 2rem;
    margin: 2rem 0;
}

.section-quiz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.section-quiz-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quiz-progress {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
}

.quiz-question {
    margin-bottom: 2rem;
}

.quiz-question-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-option {
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quiz-option:hover {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
    transform: translateX(4px);
}

.quiz-option-label {
    font-weight: 600;
    color: var(--primary);
    min-width: 30px;
}

.quiz-option-text {
    flex: 1;
    color: var(--text);
}

.quiz-option.selected {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
}

.quiz-option.correct {
    border-color: var(--success);
    background: rgba(72, 187, 120, 0.1);
}

.quiz-option.incorrect {
    border-color: var(--danger);
    background: rgba(245, 101, 101, 0.1);
}

.quiz-option.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.quiz-feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.quiz-feedback.correct {
    background: rgba(72, 187, 120, 0.1);
    border: 2px solid var(--success);
    color: var(--success);
}

.quiz-feedback.incorrect {
    background: rgba(245, 101, 101, 0.1);
    border: 2px solid var(--danger);
    color: var(--danger);
}

.quiz-explanation {
    margin-top: 0.5rem;
    color: var(--text);
    font-weight: 400;
    font-size: 0.95rem;
}

.quiz-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.quiz-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.quiz-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.quiz-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

.quiz-btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.quiz-btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.quiz-results {
    text-align: center;
    padding: 2rem;
}

.quiz-score {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.quiz-score-text {
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: 2rem;
}

.quiz-performance {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.quiz-stat {
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
}

.quiz-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.quiz-stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* ==========================================
   POMODORO TIMER STYLES
   ========================================== */

.pomodoro-section {
    padding-top: 120px;
    min-height: 100vh;
}

.pomodoro-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* Timer Card */
.pomodoro-timer-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

[data-theme="dark"] .pomodoro-timer-card {
    background: #2d3748;
}

/* Session Indicator */
.session-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.session-type {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.session-type.session-work {
    color: var(--primary);
}

.session-type.session-short-break {
    color: #48bb78;
}

.session-type.session-long-break {
    color: #38b2ac;
}

.session-count {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Timer Display */
.timer-display {
    position: relative;
    width: 280px;
    height: 280px;
    margin-bottom: 2rem;
}

.progress-ring {
    transform: rotate(-90deg);
    position: absolute;
    top: 0;
    left: 0;
}

.progress-ring-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 8;
}

.progress-ring-circle {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease, stroke 0.3s ease;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-digits {
    font-size: 4rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -2px;
}

.timer-label {
    font-size: 1rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Timer Controls */
.pomodoro-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pomodoro-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pomodoro-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    min-width: 140px;
    justify-content: center;
}

.pomodoro-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.pomodoro-btn-primary.running {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
}

.pomodoro-btn-secondary {
    background: var(--light);
    color: var(--text);
    border: 2px solid var(--border);
}

[data-theme="dark"] .pomodoro-btn-secondary {
    background: #1a202c;
    border-color: #4a5568;
}

.pomodoro-btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

/* Widget Toggle Button */
.widget-toggle-btn {
    background: transparent;
    border: 2px dashed var(--border);
    color: var(--text-light);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.widget-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Pomodoro Sidebar */
.pomodoro-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Settings Panel */
.pomodoro-settings {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

[data-theme="dark"] .pomodoro-settings {
    background: #2d3748;
}

.pomodoro-settings h3 {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    color: var(--text);
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.setting-group label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.setting-group input[type="number"] {
    padding: 0.625rem 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--light);
    color: var(--text);
    transition: border-color 0.2s;
}

.setting-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
}

.setting-toggle {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.setting-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.save-settings-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

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

/* Statistics Panel */
.pomodoro-stats {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

[data-theme="dark"] .pomodoro-stats {
    background: #2d3748;
}

.pomodoro-stats h3,
.pomodoro-stats h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text);
}

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

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

[data-theme="dark"] .stat-item {
    background: #1a202c;
}

.stat-item .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.stat-item .stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Session History */
.session-history {
    max-height: 200px;
    overflow-y: auto;
}

.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--light);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

[data-theme="dark"] .session-item {
    background: #1a202c;
}

.session-time {
    color: var(--text);
    font-weight: 500;
}

.session-duration {
    color: var(--text-light);
}

.no-sessions {
    color: var(--text-light);
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

/* Pomodoro Tips */
.pomodoro-tips {
    margin-top: 3rem;
}

.pomodoro-tips h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: 1rem;
}

[data-theme="dark"] .tip-card {
    background: #2d3748;
}

.tip-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.tip-content h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.tip-content p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Floating Widget */
.pomodoro-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.25rem;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInWidget 0.3s ease;
    border: 2px solid var(--border);
}

[data-theme="dark"] .pomodoro-widget {
    background: #2d3748;
    border-color: #4a5568;
}

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

.widget-session-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

.widget-session-indicator.work {
    background: var(--primary);
}

.widget-session-indicator.break {
    background: #48bb78;
}

.widget-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    min-width: 65px;
}

.widget-controls {
    display: flex;
    gap: 0.5rem;
}

.widget-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget-btn-play {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.widget-btn-play:hover {
    transform: scale(1.05);
}

.widget-btn-expand {
    background: var(--light);
    color: var(--text);
    border: 1px solid var(--border);
}

[data-theme="dark"] .widget-btn-expand {
    background: #1a202c;
    border-color: #4a5568;
}

.widget-btn-expand:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.widget-btn-close {
    background: transparent;
    color: var(--text-light);
    font-size: 1.25rem;
}

.widget-btn-close:hover {
    color: var(--danger);
}

/* Responsive Design */
@media (max-width: 900px) {
    .pomodoro-container {
        grid-template-columns: 1fr;
    }

    .pomodoro-sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 600px) {
    .pomodoro-timer-card {
        padding: 2rem 1.5rem;
    }

    .timer-display {
        width: 220px;
        height: 220px;
    }

    .progress-ring {
        width: 220px;
        height: 220px;
    }

    .progress-ring-bg,
    .progress-ring-circle {
        cx: 110;
        cy: 110;
        r: 100;
    }

    .timer-digits {
        font-size: 3rem;
    }

    .pomodoro-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pomodoro-btn .btn-text {
        display: none;
    }

    .pomodoro-btn-primary .btn-text {
        display: inline;
    }

    .pomodoro-sidebar {
        grid-template-columns: 1fr;
    }

    .pomodoro-widget {
        bottom: 10px;
        right: 10px;
        left: 10px;
        justify-content: space-between;
    }
}

/* Timer pulse animation when session ends */
@keyframes timerPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.timer-complete {
    animation: timerPulse 0.5s ease 3;
}

/* Daily Goal Progress */
.daily-goal-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.daily-goal-section h3 {
    margin-bottom: 1rem;
}

.goal-progress-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.goal-progress-bar {
    height: 12px;
    background: var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.goal-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 6px;
    transition: width 0.5s ease;
    width: 0%;
}

.goal-bar-fill.goal-complete {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.goal-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.goal-progress-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.goal-progress-count.goal-complete {
    color: #48bb78;
}

.goal-progress-text {
    font-size: 0.875rem;
    color: var(--text-light);
}

.goal-progress-text.goal-complete {
    color: #48bb78;
    font-weight: 600;
}

/* Weekly Chart */
.weekly-chart-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.weekly-chart-section h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.weekly-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 120px;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.chart-bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.chart-bar {
    width: 100%;
    max-width: 36px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: height 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 5%;
}

.chart-bar.today {
    box-shadow: 0 0 0 2px var(--primary);
}

.chart-bar.goal-met {
    background: linear-gradient(180deg, #48bb78, #38a169);
}

.chart-bar.today.goal-met {
    box-shadow: 0 0 0 2px #48bb78;
}

.chart-bar-value {
    position: absolute;
    top: -20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
}

.chart-bar-label {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    text-transform: uppercase;
}

/* Keyboard Shortcuts Hint */
.keyboard-hints {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
}

.keyboard-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.keyboard-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
}

[data-theme="dark"] .keyboard-key {
    background: #1a202c;
    border-color: #4a5568;
}

/* Pomodoro Stats on Progress Page */
.pomodoro-progress-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

[data-theme="dark"] .pomodoro-progress-section {
    background: #2d3748;
}

.pomodoro-progress-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pomodoro-progress-section h3::before {
    content: '🍅';
}

.pomodoro-progress-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pomodoro-progress-card {
    background: var(--light);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease;
}

[data-theme="dark"] .pomodoro-progress-card {
    background: #1a202c;
}

.pomodoro-progress-card:hover {
    transform: translateY(-2px);
}

.pomodoro-progress-icon {
    font-size: 2rem;
}

.pomodoro-progress-content {
    flex: 1;
}

.pomodoro-progress-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.pomodoro-progress-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Goal Progress on Progress Page */
.pomodoro-goal-progress {
    background: var(--light);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .pomodoro-goal-progress {
    background: #1a202c;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text);
}

.goal-count {
    color: var(--primary);
    font-size: 1.1rem;
}

.goal-count.complete {
    color: #48bb78;
}

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

.goal-bar-bg {
    height: 10px;
    background: var(--border);
    border-radius: 5px;
    overflow: hidden;
}

.pomodoro-goal-progress .goal-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 5px;
    transition: width 0.5s ease;
}

.pomodoro-goal-progress .goal-bar-fill.complete {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

/* Weekly Chart on Progress Page */
.pomodoro-weekly-section {
    margin-bottom: 1.5rem;
}

.pomodoro-weekly-section h4 {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 1rem;
}

.pomodoro-weekly-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 140px;
    background: var(--light);
    border-radius: 10px;
    padding: 1.5rem 1rem 1rem;
    gap: 0.75rem;
}

[data-theme="dark"] .pomodoro-weekly-chart {
    background: #1a202c;
}

.pomodoro-weekly-chart .chart-bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.pomodoro-weekly-chart .chart-bar {
    width: 100%;
    max-width: 48px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: height 0.3s ease;
    display: flex;
    justify-content: center;
    min-height: 4px;
}

.pomodoro-weekly-chart .chart-bar.today {
    box-shadow: 0 0 0 2px var(--primary);
}

.pomodoro-weekly-chart .chart-bar.goal-met {
    background: linear-gradient(180deg, #48bb78, #38a169);
}

.pomodoro-weekly-chart .chart-bar.today.goal-met {
    box-shadow: 0 0 0 2px #48bb78;
}

.pomodoro-weekly-chart .chart-bar-value {
    position: absolute;
    top: -22px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.pomodoro-weekly-chart .chart-bar-label {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    font-weight: 500;
}

/* CTA Button */
.pomodoro-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pomodoro-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Responsive */
@media (max-width: 900px) {
    .pomodoro-progress-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .pomodoro-progress-grid {
        grid-template-columns: 1fr;
    }

    .pomodoro-progress-card {
        padding: 1rem;
    }

    .pomodoro-progress-value {
        font-size: 1.5rem;
    }
}

/* ==========================================
   POMODORO ACHIEVEMENTS
   ========================================== */

.pomodoro-achievements {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

[data-theme="dark"] .pomodoro-achievements {
    background: #2d3748;
}

.achievements-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.achievements-header h3 {
    font-size: 1.25rem;
    color: var(--text);
    margin: 0;
}

.achievements-counter {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.achievements-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.achievement-category {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.25rem;
}

.achievement-category:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.achievement-category-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.achievement-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.achievement-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    border-radius: 10px;
    min-width: 90px;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
}

.achievement-badge.unlocked {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 2px solid var(--primary);
}

.achievement-badge.locked {
    background: var(--light);
    border: 2px solid var(--border);
    opacity: 0.6;
}

[data-theme="dark"] .achievement-badge.locked {
    background: #1a202c;
}

.achievement-badge.unlocked:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
}

.achievement-badge-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    filter: grayscale(0);
    transition: filter 0.3s ease;
}

.achievement-badge.locked .achievement-badge-icon {
    filter: grayscale(1);
}

.achievement-badge-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    line-height: 1.2;
}

.achievement-badge.locked .achievement-badge-name {
    color: var(--text-light);
}

/* Achievement Notification Popup */
.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    animation: achievementSlideIn 0.5s ease;
}

.achievement-notification.fade-out {
    animation: achievementFadeOut 0.5s ease forwards;
}

@keyframes achievementSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes achievementFadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.achievement-notification-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
    min-width: 300px;
}

.achievement-notification-icon {
    font-size: 3rem;
    animation: achievementBounce 0.6s ease;
}

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

.achievement-notification-text {
    flex: 1;
}

.achievement-notification-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.achievement-notification-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.achievement-notification-desc {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Responsive Achievements */
@media (max-width: 600px) {
    .achievement-badges {
        justify-content: center;
    }

    .achievement-badge {
        min-width: 80px;
        padding: 0.625rem;
    }

    .achievement-badge-icon {
        font-size: 1.75rem;
    }

    .achievement-badge-name {
        font-size: 0.7rem;
    }

    .achievement-notification-content {
        min-width: auto;
        margin: 0 10px;
    }
}

/* Compact Achievements for Progress Page */
.pomodoro-achievements-compact {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.pomodoro-achievements-compact .achievements-header {
    margin-bottom: 1rem;
}

.pomodoro-achievements-compact .achievements-header h4 {
    font-size: 1rem;
    margin: 0;
}

.achievements-showcase {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.showcase-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.showcase-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.showcase-badges {
    display: flex;
    gap: 0.5rem;
}

.showcase-badge {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.showcase-badge.unlocked {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border: 2px solid var(--primary);
}

.showcase-badge.locked {
    background: var(--light);
    border: 2px solid var(--border);
    opacity: 0.5;
}

[data-theme="dark"] .showcase-badge.locked {
    background: #1a202c;
}

.showcase-badge:hover {
    transform: scale(1.1);
}

.showcase-badge-icon {
    font-size: 1.5rem;
}

.showcase-badge.locked .showcase-badge-icon {
    filter: grayscale(1);
}

.view-all-achievements {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.view-all-achievements:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.no-achievements {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 600px) {
    .achievements-showcase {
        flex-direction: column;
        gap: 1rem;
    }

    .showcase-badge {
        width: 40px;
        height: 40px;
    }

    .showcase-badge-icon {
        font-size: 1.25rem;
    }
}

/* ==========================================
   FOCUS MODE STYLES
   ========================================== */

.mode-toggles {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.focus-mode-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.focus-mode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(240, 147, 251, 0.4);
}

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

.focus-mode-icon {
    font-size: 1.1rem;
}

/* Focus Mode Overlay */
.focus-mode-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.focus-mode-overlay.active {
    opacity: 1;
    visibility: visible;
}

.focus-mode-container {
    text-align: center;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.5s ease 0.2s;
}

.focus-mode-overlay.active .focus-mode-container {
    transform: scale(1);
    opacity: 1;
}

.focus-exit-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.focus-exit-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: rotate(90deg);
}

.focus-session-type {
    font-size: 1.25rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 2rem;
}

.focus-session-type.work {
    color: #f093fb;
}

.focus-session-type.break {
    color: #48bb78;
}

/* Focus Timer Display */
.focus-timer-display {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 2rem;
}

.focus-progress-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.focus-progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 8;
}

.focus-progress-ring-fill,
.focus-progress-ring-circle {
    fill: none;
    stroke: #667eea;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 942;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.focus-time,
.focus-timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.focus-time,
.focus-timer-digits {
    font-size: 4.5rem;
    font-weight: 300;
    color: white;
    font-family: 'Inter', monospace;
    letter-spacing: -2px;
}

/* Focus Controls */
.focus-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.focus-btn,
.focus-control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.focus-btn:hover,
.focus-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.05);
}

.focus-btn.primary,
.focus-play-btn {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 2rem;
    box-shadow: 0 8px 30px rgba(240, 147, 251, 0.4);
}

.focus-btn.primary:hover,
.focus-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(240, 147, 251, 0.5);
}

.focus-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.focus-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Focus Session Info */
.focus-session-info {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

/* Focus Quote */
.focus-quote {
    max-width: 400px;
    margin: 0 auto;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.focus-quote-text {
    font-size: 1.1rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
}

/* Focus Mode Keyboard Hint */
.focus-keyboard-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
}

.focus-keyboard-hint kbd {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin: 0 0.25rem;
}

/* Focus Mode Responsive */
@media (max-width: 480px) {
    .focus-timer-display {
        width: 250px;
        height: 250px;
    }

    .focus-time,
    .focus-timer-digits {
        font-size: 3.5rem;
    }

    .focus-btn.primary,
    .focus-play-btn {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }

    .focus-btn,
    .focus-control-btn {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .focus-quote {
        padding: 1rem;
        font-size: 1rem;
    }

    .focus-quote-text {
        font-size: 1rem;
    }

    .focus-exit-btn {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .mode-toggles {
        flex-direction: column;
        align-items: center;
    }
}

/* Animations for Focus Mode */
@keyframes focusPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(240, 147, 251, 0.4);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(240, 147, 251, 0);
    }
}

.focus-btn.primary.pulse {
    animation: focusPulse 2s ease infinite;
}

/* ==========================================
   SESSION NOTES STYLES
   ========================================== */

.session-notes-panel {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--light);
    border-radius: 12px;
    border: 1px solid var(--border);
}

[data-theme="dark"] .session-notes-panel {
    background: #1a202c;
    border-color: #2d3748;
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.notes-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.notes-hint {
    font-size: 0.75rem;
    color: var(--text-light);
}

.session-notes-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 80px;
    background: var(--card-bg);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.session-notes-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.session-notes-input::placeholder {
    color: var(--text-light);
}

[data-theme="dark"] .session-notes-input {
    background: #2d3748;
    border-color: #4a5568;
}

/* Session history with notes */
.session-item {
    padding: 0.75rem;
    background: var(--light);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.session-item:hover {
    background: var(--border);
}

[data-theme="dark"] .session-item {
    background: #1a202c;
}

[data-theme="dark"] .session-item:hover {
    background: #2d3748;
}

.session-item.has-notes {
    border-left: 3px solid var(--primary);
}

.session-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.session-notes {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border);
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ==========================================
   AMBIENT SOUNDS STYLES
   ========================================== */

.ambient-sounds-panel {
    margin-top: 1.25rem;
    padding: 1.25rem;
    background: var(--light);
    border-radius: 12px;
    border: 1px solid var(--border);
}

[data-theme="dark"] .ambient-sounds-panel {
    background: #1a202c;
    border-color: #2d3748;
}

.ambient-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ambient-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.ambient-mute-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.ambient-mute-btn:hover {
    background: var(--border);
}

.ambient-sounds-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ambient-sound-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 0.5rem;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ambient-sound-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.ambient-sound-btn.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

[data-theme="dark"] .ambient-sound-btn {
    background: #2d3748;
    border-color: #4a5568;
}

[data-theme="dark"] .ambient-sound-btn.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25), rgba(118, 75, 162, 0.25));
}

.ambient-icon {
    font-size: 1.5rem;
}

.ambient-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ambient-sound-btn.active .ambient-label {
    color: var(--primary);
}

.ambient-volume-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.volume-label {
    font-size: 0.8rem;
    color: var(--text-light);
    min-width: 50px;
}

.volume-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.volume-value {
    font-size: 0.8rem;
    color: var(--text);
    min-width: 35px;
    text-align: right;
}

@media (max-width: 480px) {
    .ambient-sounds-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .session-notes-panel,
    .ambient-sounds-panel {
        padding: 1rem;
    }
}

/* ==================== Site-wide Search ==================== */
.nav-search-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f5f5f5;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    margin-right: 1rem;
}

.nav-search-btn:hover {
    background: #e8e8e8;
    border-color: var(--primary);
}

.nav-search-btn kbd {
    background: white;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
    font-family: inherit;
}

.search-btn-text {
    display: none;
}

@media (min-width: 900px) {
    .search-btn-text {
        display: inline;
    }
}

[data-theme="dark"] .nav-search-btn {
    background: #2d3748;
    border-color: #4a5568;
    color: #a0aec0;
}

[data-theme="dark"] .nav-search-btn:hover {
    background: #4a5568;
}

[data-theme="dark"] .nav-search-btn kbd {
    background: #1a202c;
    border-color: #4a5568;
    color: #e2e8f0;
}

/* Search Modal */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    padding: 10vh 1rem;
    box-sizing: border-box;
}

.search-modal.active {
    display: flex;
    justify-content: center;
    animation: fadeIn 0.15s ease-out;
}

.search-modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.2s ease-out;
}

.search-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 0.75rem 1rem;
}

.search-icon {
    font-size: 1.25rem;
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    outline: none;
    color: var(--text-primary);
}

.search-input-wrapper input::placeholder {
    color: var(--text-light);
}

.search-shortcut {
    background: white;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.search-hint {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.search-hint ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.search-hint li {
    background: #f0f4ff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.search-tip {
    font-size: 0.85rem;
    margin-top: 1.5rem;
}

.search-tip kbd {
    background: #f5f5f5;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    font-size: 0.8rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s;
}

.search-result-item:hover,
.search-result-item.selected {
    background: #f0f4ff;
}

.result-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 8px;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-title {
    display: block;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-title mark {
    background: #fef08a;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.result-type {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.result-arrow {
    color: var(--text-light);
    font-size: 1.25rem;
}

.search-no-results {
    padding: 3rem;
    text-align: center;
    color: var(--text-secondary);
}

.no-results-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results-hint {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Dark Mode Search */
[data-theme="dark"] .search-modal-content {
    background: #1a202c;
}

[data-theme="dark"] .search-header {
    border-bottom-color: #4a5568;
}

[data-theme="dark"] .search-input-wrapper {
    background: #2d3748;
}

[data-theme="dark"] .search-input-wrapper input {
    color: #e2e8f0;
}

[data-theme="dark"] .search-shortcut {
    background: #4a5568;
    border-color: #4a5568;
    color: #a0aec0;
}

[data-theme="dark"] .search-hint li {
    background: #2d3748;
    color: #a0aec0;
}

[data-theme="dark"] .search-tip kbd {
    background: #2d3748;
    border-color: #4a5568;
}

[data-theme="dark"] .search-result-item {
    color: #e2e8f0;
}

[data-theme="dark"] .search-result-item:hover,
[data-theme="dark"] .search-result-item.selected {
    background: #2d3748;
}

[data-theme="dark"] .result-icon {
    background: #2d3748;
}

[data-theme="dark"] .result-title mark {
    background: #854d0e;
    color: #fef08a;
}

@media (max-width: 600px) {
    .search-modal {
        padding: 5vh 0.5rem;
    }

    .search-modal-content {
        max-height: 80vh;
        border-radius: 12px;
    }

    .nav-search-btn {
        padding: 0.5rem;
        margin-right: 0.5rem;
    }

    .nav-search-btn kbd {
        display: none;
    }
}

/* ==========================================
   ENHANCED ANIMATIONS & MICRO-INTERACTIONS
   ========================================== */

/* 3D Card Tilt Effect */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.tilt-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.tilt-card .tilt-content {
    transform: translateZ(20px);
}

/* Button Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    opacity: 0;
}

.btn-ripple:active::before {
    width: 300px;
    height: 300px;
    opacity: 1;
    transition: width 0s, height 0s, opacity 0s;
}

/* Success Animation */
@keyframes successPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(72, 187, 120, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(72, 187, 120, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(72, 187, 120, 0);
    }
}

@keyframes successShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(0) scale(1.02); }
    20%, 40%, 60%, 80% { transform: translateX(0) scale(1); }
}

.animate-success {
    animation: successPulse 0.8s ease-out, successShake 0.5s ease-out;
    border-color: var(--success) !important;
    background: rgba(72, 187, 120, 0.1) !important;
}

/* Error Animation */
@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes errorPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 101, 101, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(245, 101, 101, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 101, 101, 0);
    }
}

.animate-error {
    animation: errorShake 0.5s ease-out, errorPulse 0.8s ease-out;
    border-color: var(--danger) !important;
    background: rgba(245, 101, 101, 0.1) !important;
}

/* Progress Fill Animation */
@keyframes progressFill {
    from {
        width: 0;
    }
}

.progress-fill-animate {
    animation: progressFill 1s ease-out forwards;
}

/* Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-counter {
    animation: countUp 0.5s ease-out forwards;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Glow Pulse Animation */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary);
    }
    50% {
        box-shadow: 0 0 20px var(--primary), 0 0 30px var(--primary);
    }
}

.animate-glow {
    animation: glowPulse 2s ease-in-out infinite;
}

/* Typewriter Effect */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--primary); }
}

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--primary);
    animation: typewriter 2s steps(40) forwards, blink 0.75s step-end infinite;
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    background: var(--card-bg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    max-width: 400px;
    animation: toastSlideIn 0.3s ease-out;
}

.toast.toast-exit {
    animation: toastSlideOut 0.3s ease-out forwards;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast-info {
    border-left: 4px solid var(--primary);
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-message {
    flex: 1;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--text);
}

/* Confetti Animation */
@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: 0;
    animation: confettiFall 3s ease-out forwards;
    z-index: 10001;
    pointer-events: none;
}

/* Card Shine Effect */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: translateX(-100%) rotate(45deg);
    transition: transform 0.6s ease;
}

.card-shine:hover::after {
    transform: translateX(100%) rotate(45deg);
}

/* Icon Bounce on Hover */
.icon-bounce:hover {
    animation: bounce 0.5s ease;
}

/* Scale on Click */
.scale-click:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Badge Pop Animation */
@keyframes badgePop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.badge-animate {
    animation: badgePop 0.3s ease-out;
}

/* Checkbox Animation */
.checkbox-animated {
    position: relative;
    appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.checkbox-animated:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-animated:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    animation: checkmark 0.2s ease-out;
}

@keyframes checkmark {
    from {
        transform: rotate(45deg) scale(0);
    }
    to {
        transform: rotate(45deg) scale(1);
    }
}

/* Enhanced Topic Card Hover */
.topic-card,
.lab-card,
.demo-card {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}

.topic-card:hover,
.lab-card:hover,
.demo-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
    border-color: var(--primary-light);
}

.topic-card:hover .topic-icon,
.lab-card:hover .lab-icon,
.demo-card:hover .demo-icon {
    animation: bounce 0.5s ease;
}

/* Answer Option Animations */
.answer-option {
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.answer-option:hover:not(.disabled) {
    transform: translateX(8px);
    border-color: var(--primary-light);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.answer-option.selected {
    transform: translateX(8px);
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

/* Quiz Button Animations */
.quiz-control-btn {
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-control-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.quiz-control-btn:active:not(:disabled) {
    transform: translateY(0);
}

/* Progress Bar Shimmer */
.progress-bar {
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

/* Category Button Animations */
.category-btn {
    transition: all 0.2s ease;
}

.category-btn:hover {
    transform: translateX(4px);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.category-btn.active {
    transform: translateX(4px);
    border-left: 3px solid var(--primary);
}

/* Nav Link Hover Animation */
.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before {
    width: 80%;
}

/* Explanation Expand Animation */
.explanation {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top;
}

.explanation:not(.hidden) {
    animation: expandDown 0.4s ease-out;
}

@keyframes expandDown {
    from {
        opacity: 0;
        transform: scaleY(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scaleY(1) translateY(0);
    }
}

/* Timer Warning Animation */
@keyframes timerPulse {
    0%, 100% {
        transform: scale(1);
        color: var(--danger);
    }
    50% {
        transform: scale(1.1);
        color: var(--danger-light);
    }
}

.timer-warning {
    animation: timerPulse 0.5s ease infinite;
}

/* Dark Mode Toast */
[data-theme="dark"] .toast {
    background: #2d3748;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* Mobile Responsive Animations */
@media (max-width: 768px) {
    .topic-card:hover,
    .lab-card:hover,
    .demo-card:hover {
        transform: translateY(-4px) scale(1.01);
    }

    .answer-option:hover:not(.disabled) {
        transform: translateX(4px);
    }

    .toast-container {
        left: 10px;
        right: 10px;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* ==========================================
   STUDY STREAK SYSTEM
   ========================================== */

/* Streak Widget in Navbar */
.streak-widget {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 0.75rem;
}

.streak-widget:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.streak-flame {
    font-size: 1.1rem;
    transition: all 0.3s;
}

.streak-flame.active {
    animation: flameGlow 1.5s ease-in-out infinite;
}

.streak-flame.inactive {
    filter: grayscale(100%);
    opacity: 0.6;
}

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

.streak-count {
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

.streak-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Streak Notification */
.streak-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 350px;
}

.streak-notification.visible {
    transform: translateX(0);
}

.streak-notification-icon {
    font-size: 1.5rem;
}

.streak-notification-message {
    flex: 1;
    font-weight: 500;
    color: #2d3748;
}

.streak-notification-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #a0aec0;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.streak-notification-close:hover {
    color: #2d3748;
}

.streak-notification-streak {
    border-left: 4px solid #ff6b35;
}

.streak-notification-milestone {
    border-left: 4px solid #f7931e;
    background: linear-gradient(135deg, #fffbf0, #fff);
}

.streak-notification-success {
    border-left: 4px solid #38a169;
}

.streak-notification-info {
    border-left: 4px solid #667eea;
}

/* Streak Modal */
.streak-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.streak-modal.visible {
    opacity: 1;
    visibility: visible;
}

.streak-modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.streak-modal.visible .streak-modal-content {
    transform: scale(1);
}

.streak-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #a0aec0;
    cursor: pointer;
    line-height: 1;
}

.streak-modal-close:hover {
    color: #2d3748;
}

.streak-modal h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2d3748;
}

.streak-modal h3 {
    color: #2d3748;
    margin: 1.5rem 0 1rem;
    font-size: 1rem;
}

/* Streak Stats */
.streak-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.streak-stat-card {
    text-align: center;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 12px;
}

.streak-stat-card.main {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
}

.streak-stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.streak-stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.streak-stat-card.main .streak-stat-value {
    color: white;
}

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

.streak-stat-card.main .streak-stat-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Streak Status */
.streak-status {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.streak-status.complete {
    background: #d4edda;
    color: #155724;
}

.streak-status.pending {
    background: #fff3cd;
    color: #856404;
}

/* Milestone Badges */
.milestone-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.milestone-badge {
    width: 60px;
    height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.milestone-badge.earned {
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
    box-shadow: 0 4px 12px rgba(252, 182, 159, 0.4);
}

.milestone-badge.locked {
    opacity: 0.5;
}

.milestone-icon {
    font-size: 1.5rem;
}

.milestone-days {
    font-size: 0.75rem;
    font-weight: 600;
    color: #2d3748;
    margin-top: 0.25rem;
}

.milestone-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #f7931e);
}

/* Streak Tips */
.streak-tips {
    background: #f0f9ff;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.streak-tips ul {
    margin: 0;
    padding-left: 1.5rem;
}

.streak-tips li {
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.streak-tips li:last-child {
    margin-bottom: 0;
}

/* Dark Mode for Streak System */
[data-theme="dark"] .streak-notification {
    background: #2d3748;
}

[data-theme="dark"] .streak-notification-message {
    color: #e2e8f0;
}

[data-theme="dark"] .streak-notification-close {
    color: #718096;
}

[data-theme="dark"] .streak-notification-close:hover {
    color: #e2e8f0;
}

[data-theme="dark"] .streak-notification-milestone {
    background: linear-gradient(135deg, #3d3a1a, #2d3748);
}

[data-theme="dark"] .streak-modal-content {
    background: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] .streak-modal-close {
    color: #718096;
}

[data-theme="dark"] .streak-modal-close:hover {
    color: #e2e8f0;
}

[data-theme="dark"] .streak-modal h2,
[data-theme="dark"] .streak-modal h3 {
    color: #e2e8f0;
}

[data-theme="dark"] .streak-stat-card {
    background: #1a202c;
}

[data-theme="dark"] .streak-stat-label {
    color: #a0aec0;
}

[data-theme="dark"] .streak-status.complete {
    background: #1a3a2a;
    color: #9ae6b4;
}

[data-theme="dark"] .streak-status.pending {
    background: #3d3a1a;
    color: #fbd38d;
}

[data-theme="dark"] .milestone-badge {
    background: #1a202c;
}

[data-theme="dark"] .milestone-badge.earned {
    background: linear-gradient(135deg, #4a3728, #5c3d2e);
}

[data-theme="dark"] .milestone-days {
    color: #e2e8f0;
}

[data-theme="dark"] .streak-tips {
    background: #1a202c;
}

[data-theme="dark"] .streak-tips li {
    color: #e2e8f0;
}

/* Mobile Responsiveness for Streak */
@media (max-width: 768px) {
    .streak-widget {
        padding: 0.3rem 0.6rem;
        margin-right: 0.5rem;
    }

    .streak-count {
        font-size: 0.9rem;
    }

    .streak-label {
        display: none;
    }

    .streak-notification {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .streak-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .streak-stat-value {
        font-size: 1.5rem;
    }

    .milestone-badge {
        width: 50px;
        height: 60px;
    }
}

/* ==========================================
   ADDITIONAL POLISH STYLES
   ========================================== */

/* Ripple Effect for Buttons */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: rippleAnimation 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleAnimation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Tooltip Popup */
.tooltip-popup {
    position: fixed;
    background: #2d3748;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    z-index: 10002;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.2s ease;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tooltip-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #2d3748;
}

.tooltip-popup.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar Scrolled State */
.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Form Validation States */
input.valid,
select.valid,
textarea.valid {
    border-color: var(--success) !important;
}

input.invalid,
select.invalid,
textarea.invalid {
    border-color: var(--danger) !important;
    animation: inputShake 0.4s ease;
}

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

/* Copy Button States */
[data-copy].copied {
    background-color: var(--success) !important;
    color: white !important;
}

/* Scroll Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Focus States */
button:focus-visible,
.btn:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

/* Better Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .streak-widget,
    .theme-toggle,
    .mobile-menu-toggle,
    .page-progress {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .section {
        padding: 1rem !important;
        break-inside: avoid;
    }
}
