:root {
    /* Nothing OS Inspired - Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #000000;
    --text-secondary: #666666;
    --accent-primary: #d71921;
    /* Nothing Red */
    --accent-hover: #b8151c;
    --accent-light: rgba(215, 25, 33, 0.1);
    --card-bg: rgba(255, 255, 255, 0.9);
    --border-color: #e0e0e0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --gradient-text: linear-gradient(135deg, #000000 0%, #333333 100%);

    /* Nothing Orbs - Subtle */
    --orb-1-color: rgba(215, 25, 33, 0.08);
    --orb-2-color: rgba(0, 0, 0, 0.05);
    --bg-glass-rgb: 255, 255, 255;

    /* Dot Matrix Colors */
    --dot-active: #ffffff;
    --dot-inactive: #333333;
    --loader-bg: #000000;
}

[data-theme="dark"] {
    /* Nothing OS Inspired - Dark Theme (Primary) */
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #999999;
    --accent-primary: #d71921;
    /* Nothing Red */
    --accent-hover: #ff2d36;
    --accent-light: rgba(215, 25, 33, 0.15);
    --card-bg: rgba(20, 20, 20, 0.9);
    --border-color: #222222;
    --shadow-sm: 0 1px 2px 0 rgb(255 255 255 / 0.03);
    --shadow-md: 0 4px 6px -1px rgb(255 255 255 / 0.05);
    --shadow-lg: 0 10px 25px -5px rgb(0 0 0 / 0.8);
    --gradient-text: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);

    /* Nothing Orbs - Subtle Red Glow */
    --orb-1-color: rgba(215, 25, 33, 0.15);
    --orb-2-color: rgba(255, 255, 255, 0.03);
    --bg-glass-rgb: 0, 0, 0;

    /* Dot Matrix Colors */
    --dot-active: #ffffff;
    --dot-inactive: #333333;
    --loader-bg: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Removed global transition to avoid conflict with View Transitions API */
}

/* View Transition API Customization */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    /* Disable default cross-fade */
    mix-blend-mode: normal;
}

/* Dark mode specific override for view transition */
::view-transition-old(root) {
    z-index: 1;
}

::view-transition-new(root) {
    z-index: 2147483646;
    /* High z-index to be on top */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
    border: 3px solid var(--bg-primary);
    /* Padding effect */
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #475569;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Background Decoration */
.background-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    /* Behind everything */
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: floatOrb 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 60vh;
    height: 60vh;
    background: radial-gradient(circle, var(--orb-1-color) 0%, rgba(255, 255, 255, 0) 70%);
    top: -10%;
    left: -10%;
    animation-delay: -5s;
}

.orb-2 {
    width: 50vh;
    height: 50vh;
    background: radial-gradient(circle, var(--orb-2-color) 0%, rgba(255, 255, 255, 0) 70%);
    bottom: -10%;
    right: -10%;
    animation-duration: 25s;
}

@keyframes floatOrb {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(50px, 80px) scale(1.1);
    }

    66% {
        transform: translate(-30px, 40px) scale(0.9);
    }

    100% {
        transform: translate(20px, -50px) scale(1.05);
    }
}

/* Navbar with Real Glassmorphism */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    /* Changed to transparent for glass effect */
    padding: 1.5rem 0;
    transition: padding 0.3s ease, background-color 0.3s ease;
    /* animation fix */
}

.navbar::before {
    /* Glass Effect Background */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--bg-glass-rgb), 0.7);
    /* Variable opacity */
    backdrop-filter: blur(16px);
    /* Strong blur */
    -webkit-backdrop-filter: blur(16px);
    z-index: -1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    /* Hidden initially */
    transition: opacity 0.3s ease;
}

.navbar.scrolled {
    padding: 1rem 0;
}

.navbar.scrolled::before {
    opacity: 1;
    /* Show glass effect on scroll */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

/* Theme Toggle Button - The "Wah" Animation */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    outline: none;
}

.toggle-track {
    width: 52px;
    height: 28px;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    overflow: hidden;
}

.toggle-sun,
.toggle-moon {
    font-size: 12px;
    z-index: 1;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.3s ease;
}

.toggle-sun {
    color: #f59e0b;
}

.toggle-moon {
    color: #818cf8;
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .toggle-thumb {
    transform: translateX(24px);
    background-color: #fff;
}

[data-theme="dark"] .toggle-sun {
    transform: translateY(30px);
    opacity: 0;
}

[data-theme="light"] .toggle-moon {
    transform: translateY(-30px);
    opacity: 0;
}


/* Hero Section */
.hero {
    padding: 160px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text .badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--accent-light);
    color: var(--accent-primary);
    font-weight: 600;
    border-radius: 50px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
}

[data-theme="dark"] .hero-text .badge {
    border-color: rgba(59, 130, 246, 0.3);
}

.hero-text h1 {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.cta-group {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    /* Elastic transition for button */
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.5s ease;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-5px) scale(1.05);
    /* Slightly up and bigger */
}

.btn:active {
    transform: translateY(0) scale(0.95);
    /* Press effect */
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #fff;
    box-shadow: 0 4px 14px -4px var(--accent-primary);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4);
    color: #fff;
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

/* Abstract Visuals */
.hero-visual {
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circle-graphic {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--accent-light) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    position: absolute;
    animation: pulse 8s infinite ease-in-out;
}

.floating-card {
    position: absolute;
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border-color);
    font-weight: 600;
    animation: float 6s ease-in-out infinite;
    z-index: 2;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-width: 180px;
}

/* Gamification Card - Top Right */
.gamification-card {
    top: 10%;
    right: 0%;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
    width: 200px;
}

.level-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f59e0b;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.xp-container {
    width: 100%;
}

.xp-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.xp-bar {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.xp-fill {
    width: 90%;
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 10px;
}

/* Pomodoro Card - Bottom Left */
.pomodoro-card {
    bottom: 10%;
    left: -5%;
    animation-delay: 2s;
    padding: 1rem 1.5rem;
}

.pomodoro-icon {
    width: 40px;
    height: 40px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.pomodoro-info {
    display: flex;
    flex-direction: column;
}

.pomodoro-time {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.pomodoro-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Shared Card - Bottom Right */
.shared-card {
    bottom: 20%;
    right: -10%;
    animation-delay: 4s;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
    gap: 0.5rem;
}

.shared-users {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid var(--card-bg);
    margin-right: -10px;
}

.add-user {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: 5px;
}

/* Features */
.features {
    padding: 100px 0;
    padding: 100px 0;
    /* Transparent for background visibility, added blur for readability */
    background-color: rgba(var(--bg-glass-rgb), 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.feature-grid {
    display: flex;
    /* Flexbox simply or Grid, Grid is better for responsiveness */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    /* Smother, more elastic transition */
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.5s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
    /* Highlight border on hover */
}

/* Animate the icon inside when card is hovered */
.feature-card:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
    background-color: var(--accent-primary);
    color: #fff;
}

.icon-box {
    width: 60px;
    height: 60px;
    background-color: var(--accent-light);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
    /* Smooth icon transition */
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Installation Highlight */
.installation {
    padding: 100px 0;
}

.install-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
    max-width: 800px;
    margin: 0 auto;
}

.install-box h2 {
    margin-bottom: 2.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background-color: var(--accent-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    margin-top: 2px;
}

.step-text {
    flex: 1;
    color: var(--text-secondary);
}

.step-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Footer */
.footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.copyright {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.5;
    }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 1s ease;
}

.fade-in.visible {
    opacity: 1;
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Typing Animation Cursor */
.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--text-primary);
    animation: blink 1s infinite;
    margin-left: 5px;
    vertical-align: text-bottom;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* FAQ Section */
.faq {
    padding: 80px 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.faq-item:hover {
    border-color: var(--accent-primary);
}

.faq-question {
    padding: 1.5rem 2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--accent-primary);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: rgba(var(--accent-primary), 0.02);
    /* Very subtle tint */
}

/* Need to set max-height via JS ideally, or use a large value for CSS only which isn't smooth. We will use JS. */
.faq-answer p {
    padding: 0 2rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-text p {
        margin: 0 auto 2.5rem;
    }

    .cta-group {
        justify-content: center;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .hero-visual {
        height: 300px;
    }

    .floating-card {
        padding: 1rem 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    /* Mobile Enhancements */

    /* Horizontal Scroll Snap for Features (Carousel) */
    .feature-grid {
        display: flex;
        /* Switch from grid to flex */
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1.5rem;
        padding-bottom: 2rem;
        /* Space for scrollbar/shadow */
        margin: 0 -2rem;
        /* Negative margin to bleed to edges */
        padding-left: 2rem;
        /* Restore padding */
        padding-right: 2rem;

        /* Hide scrollbar for cleaner look */
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    .feature-grid::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .feature-card {
        min-width: 280px;
        /* Fixed width for cards */
        scroll-snap-align: center;
        /* Snap to center */
        margin-bottom: 0;
        /* Remove bottom margin if any */
    }

    /* Reduce Orb size on mobile to prevent clutter */
    .orb-1 {
        width: 40vh;
        height: 40vh;
        filter: blur(60px);
    }

    .orb-2 {
        width: 30vh;
        height: 30vh;
        filter: blur(60px);
    }
}

/* Spotlight Effect Styles */
.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 2px;
    /* Border width */
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y),
            rgba(255, 255, 255, 0.4),
            transparent 40%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 3;
}

.feature-card:hover::before {
    opacity: 1;
}

/* Background Particles */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Level Badge Tiers with Enhanced Animations */
.level-badge {
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.level-badge.tier-1 {
    color: #64748b;
}

/* 1-9: Starter */
.level-badge.tier-2 {
    color: #cd7f32;
}

/* 10-19: Bronze */
.level-badge.tier-3 {
    color: #c0c0c0;
}

/* 20-29: Silver */
.level-badge.tier-4 {
    color: #ffd700;
}

/* 30-39: Gold */
.level-badge.tier-5 {
    color: #00d4ff;
}

/* 40-49: Platinum */
.level-badge.tier-6 {
    color: #b9f2ff;
}

/* 50-59: Diamond */
.level-badge.tier-7 {
    color: #9b59b6;
}

/* 60-69: Master */
.level-badge.tier-8 {
    color: #e91e63;
}

/* 70-79: Grandmaster */
.level-badge.tier-9 {
    color: #ff5722;
}

/* 80-89: Legend */
.level-badge.tier-10 {
    background: linear-gradient(135deg, #ffd700, #ff6b6b, #c471ed, #12c2e9);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: mythicGradient 3s ease infinite;
}

/* Mythic tier gradient animation */
@keyframes mythicGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Glow effect for higher tiers */
.level-badge.tier-5 i,
.level-badge.tier-6 i {
    filter: drop-shadow(0 0 4px currentColor);
}

.level-badge.tier-7 i,
.level-badge.tier-8 i {
    filter: drop-shadow(0 0 6px currentColor);
}

.level-badge.tier-9 i,
.level-badge.tier-10 i {
    filter: drop-shadow(0 0 10px currentColor);
}

/* Level Up Animation */
@keyframes levelUp {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.15);
    }

    50% {
        transform: scale(0.95);
    }

    75% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Tier Up Special Animation */
@keyframes tierUp {
    0% {
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }

    20% {
        transform: scale(1.3) rotate(-5deg);
        filter: brightness(1.5);
    }

    40% {
        transform: scale(0.9) rotate(5deg);
        filter: brightness(1.2);
    }

    60% {
        transform: scale(1.15) rotate(-3deg);
        filter: brightness(1.3);
    }

    80% {
        transform: scale(1.05) rotate(2deg);
        filter: brightness(1.1);
    }

    100% {
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }
}

/* Sparkle effect overlay for tier up */
@keyframes sparkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* XP Bar enhanced */
.xp-fill {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gamification card glow on tier up */
.gamification-card.tier-up {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), var(--shadow-lg);
}

/* Level 100 celebration */
.gamification-card.max-level {
    box-shadow: 0 0 40px rgba(255, 107, 107, 0.4),
        0 0 60px rgba(196, 113, 237, 0.3),
        0 0 80px rgba(18, 194, 233, 0.2);
}

/* Confetti particle styles */
.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    pointer-events: none;
    opacity: 0;
}

.confetti.animate {
    animation: confettiFall 1s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(60px) rotate(720deg) scale(0);
    }
}

/* ==========================================
   MORA STAGGERED LOADER
   ========================================== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.mora-loader {
    display: flex;
    gap: 0.2em;
    /* Jarak antar huruf */
    font-family: 'Outfit', sans-serif;
    /* Menggunakan font utama */
    font-size: 3.5rem;
    /* Ukuran besar */
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.05em;
    /* Rapatkan sedikit */
}

/* Styling setiap karakter */
.mora-char {
    display: inline-block;

    /* State Awal: Geser ke kiri & transparan */
    transform: translateX(-100px);
    opacity: 0;

    /* Easing Bouncy */
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.5s ease-out;
}

/* State Aktif */
.mora-char.active {
    transform: translateX(0);
    opacity: 1;
}

/* Optional: Warna dot merah di akhir */
.mora-char:last-child {
    color: #d71921;
}