body {
    font-family: 'Outfit', sans-serif;
    background-color: #0a0e1a;
    color: white;
    overflow-x: hidden;
    overflow-y: hidden;
    cursor: none;
    -webkit-overflow-scrolling: touch;
    line-height: 1.6;
}

body.loaded {
    overflow-y: auto;
}

/* Prevent horizontal scroll on mobile */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 12px;
}
::-webkit-scrollbar-track {
    background: linear-gradient(to bottom, #0a0e1a, #1a1f35); 
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #6366f1, #8b5cf6, #ec4899); 
    border-radius: 10px;
    border: 2px solid #0a0e1a;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #818cf8, #a78bfa, #f472b6);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.8);
}

.bg-gradient-animated {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe, #667eea);
    background-size: 400% 400%;
    animation: gradient 25s ease infinite;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.15;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.glass-card {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37),
                0 20px 60px 0 rgba(31, 38, 135, 0.2),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.1),
                inset 0 -1px 0 0 rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.05), 
        transparent);
    transition: left 0.5s;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 12px 48px 0 rgba(139, 92, 246, 0.3),
                0 25px 80px 0 rgba(139, 92, 246, 0.2),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.15),
                inset 0 -1px 0 0 rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.avatar-glow {
    animation: glow 4s infinite alternate, float 6s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.6), 
                0 0 60px rgba(139, 92, 246, 0.4),
                0 0 90px rgba(168, 85, 247, 0.2);
    position: relative;
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
}

.avatar-glow::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(45deg, #6366f1, #8b5cf6, #ec4899, #6366f1);
    background-size: 300% 300%;
    animation: gradient-rotate 4s ease infinite;
    z-index: -1;
    opacity: 0.7;
    filter: blur(10px);
}

/* 3D Tilt Effect for Avatar */
.avatar-glow:hover {
    transform: scale(1.05) rotateY(10deg) rotateX(5deg);
}

@keyframes glow {
    from { 
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.6), 
                    0 0 60px rgba(139, 92, 246, 0.4),
                    0 0 90px rgba(168, 85, 247, 0.2);
    }
    to { 
        box-shadow: 0 0 40px rgba(236, 72, 153, 0.8), 
                    0 0 80px rgba(236, 72, 153, 0.5),
                    0 0 120px rgba(236, 72, 153, 0.3);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-12px) scale(1.02); }
}

@keyframes gradient-rotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#toast {
    visibility: hidden;
    min-width: 280px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    backdrop-filter: blur(10px);
    color: #fff;
    text-align: center;
    border-radius: 12px;
    padding: 18px 24px;
    position: fixed;
    z-index: 50;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 15px;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(139, 92, 246, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

#toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

.snowflake {
    position: fixed;
    top: -10px;
    color: #fff;
    font-size: 1em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 8px rgba(255, 182, 193, 0.8);
    user-select: none;
    z-index: -1;
    pointer-events: none;
    animation-name: snowflakes-fall, snowflakes-shake;
    animation-duration: 12s, 4s;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
    animation-play-state: running, running;
    opacity: 0.9;
}

@keyframes snowflakes-fall {
    0% { top: -10%; opacity: 0.9; }
    100% { top: 100%; opacity: 0.3; }
}

@keyframes snowflakes-shake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(40px) rotate(90deg); }
    50% { transform: translateX(80px) rotate(180deg); }
    75% { transform: translateX(40px) rotate(270deg); }
}

#enter-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

/* Door panels */
.door-left,
.door-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a0a2e 50%, #0a0e1a 100%);
    transition: all 1.2s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1;
    box-shadow: inset 0 0 100px rgba(139, 92, 246, 0.1);
}

.door-left {
    left: 0;
    border-right: 1px solid rgba(139, 92, 246, 0.2);
}

.door-right {
    right: 0;
    border-left: 1px solid rgba(139, 92, 246, 0.2);
}

.door-left::before,
.door-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.15), transparent 70%);
    animation: pulse-bg 4s ease-in-out infinite;
}

@keyframes pulse-bg {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Door opening animation */
#enter-overlay.hidden-overlay .door-left {
    transform: translateX(-100%);
    opacity: 0;
}

#enter-overlay.hidden-overlay .door-right {
    transform: translateX(100%);
    opacity: 0;
}

#enter-overlay.hidden-overlay {
    pointer-events: none;
}

/* Content fade out */
#enter-overlay.hidden-overlay > .text-center {
    animation: content-fade-out 0.6s ease-out forwards;
}

@keyframes content-fade-out {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.1);
    }
}

/* Hide overlay completely after animation */
#enter-overlay.hidden-overlay {
    animation: fade-out-overlay 0.3s ease-out 1.2s forwards;
}

@keyframes fade-out-overlay {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.tap-to-start {
    animation: float-button 3s ease-in-out infinite;
}

@keyframes float-button {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.music-bars {
    display: flex;
    align-items: flex-end;
    height: 20px;
    gap: 2px;
}
.bar {
    width: 3px;
    background: #ef4444;
    animation: bounce 1s infinite ease-in-out;
}
.bar:nth-child(1) { animation-duration: 0.8s; height: 10px; }
.bar:nth-child(2) { animation-duration: 1.2s; height: 15px; }
.bar:nth-child(3) { animation-duration: 0.5s; height: 8px; }
.bar:nth-child(4) { animation-duration: 1.0s; height: 12px; }

@keyframes bounce {
    0%, 100% { height: 5px; }
    50% { height: 100%; }
}

.screen-hidden {
    display: none !important;
}

.screen-visible {
    display: block !important;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.progress-fill {
    width: 0%; 
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1); 
}

.type-cursor {
    display: inline-block;
    width: 2px;
    background-color: #818cf8;
    animation: blink-cursor 0.75s step-end infinite;
    margin-left: 2px;
    vertical-align: text-bottom;
    height: 1.2em;
}

@keyframes blink-cursor {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

#custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease, opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
    font-size: 26px;
    text-shadow: 0 0 15px #fbbf24, 0 0 25px #f59e0b;
    mix-blend-mode: screen;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.8));
}

.cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.8), rgba(245, 158, 11, 0.4));
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, opacity 0.3s;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.9), 0 0 20px rgba(245, 158, 11, 0.6);
}

@media (pointer: coarse) {
    body { cursor: auto; }
    #custom-cursor, .cursor-trail { display: none; }
}

/* Mobile Responsive Improvements */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
    }

    .glass-card {
        padding: 1rem !important;
        border-radius: 1.5rem !important;
        backdrop-filter: blur(10px) saturate(150%) !important; /* Reduce blur on mobile */
        -webkit-backdrop-filter: blur(10px) saturate(150%) !important;
    }

    /* Adjust font sizes for mobile */
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.25rem !important; }
    h3 { font-size: 1.1rem !important; }
    
    /* Avatar size on mobile */
    .avatar-glow {
        width: 100px !important;
        height: 100px !important;
        animation: float 6s ease-in-out infinite !important; /* Remove glow animation on mobile */
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.4) !important; /* Simpler shadow */
    }
    
    .avatar-glow::before {
        display: none; /* Remove gradient animation on mobile */
    }

    /* Skills grid responsive */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    /* Category items responsive */
    .category-item {
        padding: 0.75rem !important;
        font-size: 0.875rem !important;
    }

    /* Music player controls */
    .music-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Toast notification */
    #toast {
        min-width: 200px;
        font-size: 14px;
        padding: 12px;
        left: 1rem;
        right: 1rem;
        transform: none;
    }

    /* Buttons spacing */
    button {
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
    }

    /* Detail screen images */
    #detail-img, #game-img {
        max-height: 250px !important;
    }

    /* Progress bar */
    .progress-bar {
        height: 4px !important;
    }

    /* Reduce padding on screens */
    .screen-visible {
        padding: 1rem !important;
    }

    /* Contact info grid */
    .contact-grid {
        grid-template-columns: 1fr !important;
    }

    /* Tap to start text */
    .tap-to-start {
        font-size: 18px !important;
    }
    
    /* Disable heavy animations on mobile */
    .bg-gradient-animated {
        animation: none !important;
        opacity: 0.1 !important;
    }
    
    /* Simplify snowflakes on mobile */
    .snowflake {
        animation-duration: 15s, 5s !important; /* Slower animation */
    }
    
    /* Reduce visualizer bars on mobile */
    #visualizer .bar:nth-child(n+11) {
        display: none; /* Show only 10 bars instead of 20 */
    }
    
    /* Disable cursor effects on mobile */
    #custom-cursor {
        display: none !important;
    }
    
    /* Simplify card hover effects */
    .bg-slate-800\/50:hover,
    .bg-slate-800\/60:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    /* Disable complex text shadows */
    h1, h2, h3 {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Simplify button animations */
    button::before,
    button::after {
        display: none !important;
    }
    
    /* Reduce blur on glass cards */
    .glass-card {
        box-shadow: 0 4px 16px 0 rgba(31, 38, 135, 0.2) !important;
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .glass-card {
        padding: 2rem !important;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    #detail-img, #game-img {
        max-height: 350px !important;
    }
}

/* Desktop Enhancements */
@media (min-width: 1025px) {
    .glass-card {
        max-width: 800px;
        margin: 0 auto;
    }

    /* Hover effects only on desktop */
    .category-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    }

    button:hover {
        transform: translateY(-1px);
    }

    /* Better spacing on large screens */
    .grid {
        gap: 1.5rem;
    }
}

/* Landscape mobile fix */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding: 0.5rem;
    }

    .glass-card {
        max-height: 90vh;
        overflow-y: auto;
    }

    #enter-overlay h2 {
        font-size: 1.5rem;
    }

    .avatar-glow {
        width: 80px !important;
        height: 80px !important;
    }
}

/* Fix for very small screens */
@media (max-width: 375px) {
    .glass-card {
        padding: 0.75rem !important;
    }

    h1 { font-size: 1.25rem !important; }
    h2 { font-size: 1.1rem !important; }
    
    button {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.8rem !important;
    }

    .avatar-glow {
        width: 80px !important;
        height: 80px !important;
    }
}

/* Image Quality Enhancement */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: nearest-neighbor;
}

/* High quality for specific images */
#detail-img,
#game-img,
img[alt="Avatar"],
#music-thumb {
    image-rendering: high-quality;
    image-rendering: -webkit-optimize-contrast;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Better touch targets for mobile */
@media (pointer: coarse) {
    button, a, .category-item {
        min-height: 48px;
        min-width: 48px;
    }
}

/* Enhanced clickable areas */
button, 
a[href], 
span[onclick], 
div[onclick], 
li[onclick] {
    position: relative;
    cursor: pointer;
}

/* Increase touch target without changing visual size */
button::before,
a[href]::before,
span[onclick]::before,
div[onclick]::before,
li[onclick]::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    z-index: -1;
}

/* Hobby buttons - larger and easier to tap */
.hobbies-container button,
.hobbies-container span {
    padding: 12px 20px !important;
    font-size: 15px !important;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 4px;
}

/* Idol list items - larger touch area */
.idols-list li {
    padding: 16px 12px !important;
    min-height: 56px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.idols-list li:active {
    transform: scale(0.98);
    background: rgba(51, 65, 85, 0.9) !important;
}

/* Better hover states for touch */
@media (hover: hover) {
    button:hover,
    a[href]:hover,
    span[onclick]:hover,
    div[onclick]:hover,
    li[onclick]:hover {
        transform: translateY(-2px);
    }
}

/* Active state for better feedback */
button:active,
a[href]:active,
span[onclick]:active,
div[onclick]:active,
li[onclick]:active {
    transform: scale(0.95) !important;
    transition: transform 0.1s !important;
}

/* Prevent text selection on interactive elements */
button,
a[href],
span[onclick],
div[onclick],
li[onclick] {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Cute button animations */
button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before {
    width: 300px;
    height: 300px;
}

button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(45deg, transparent, rgba(139, 92, 246, 0.5), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

button:hover::after {
    opacity: 1;
    animation: rotate-border 2s linear infinite;
}

@keyframes rotate-border {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4),
                0 15px 45px rgba(139, 92, 246, 0.2);
}

button:active {
    transform: translateY(0) scale(0.98);
}

/* Card hover effects with 3D tilt */
.bg-slate-800\/50,
.bg-slate-800\/60 {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    position: relative;
}

.bg-slate-800\/50::before,
.bg-slate-800\/60::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    opacity: 0;
    transition: opacity 0.4s;
}

.bg-slate-800\/50:hover,
.bg-slate-800\/60:hover {
    background: rgba(51, 65, 85, 0.8) !important;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.3),
                0 25px 60px rgba(139, 92, 246, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.bg-slate-800\/50:hover::before,
.bg-slate-800\/60:hover::before {
    opacity: 1;
}

/* Sparkle effect for special elements */
@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}

.fa-crown, .fa-check-circle {
    animation: sparkle 2s ease-in-out infinite;
}

/* Cute pulse for online status */
.bg-green-500 {
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

/* Smooth transitions for all interactive elements */
a, span[onclick], div[onclick], li[onclick] {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Add cute bounce to icons on hover */
i {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: inline-block;
}

button:hover i, a:hover i, span:hover i {
    transform: scale(1.2) rotate(5deg);
}

/* Music bars more lively */
.music-bars .bar,
#visualizer .bar {
    background: linear-gradient(to top, #ef4444, #f97316, #fbbf24, #fef08a);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6),
                0 0 20px rgba(251, 191, 36, 0.3);
    border-radius: 2px;
    position: relative;
    animation: bounce 0.8s infinite ease-in-out;
}

#visualizer .bar {
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.5),
                0 0 15px rgba(236, 72, 153, 0.3);
}

#visualizer .bar:nth-child(1) { animation-duration: 0.6s; height: 8px; }
#visualizer .bar:nth-child(2) { animation-duration: 0.8s; height: 16px; }
#visualizer .bar:nth-child(3) { animation-duration: 0.5s; height: 12px; }
#visualizer .bar:nth-child(4) { animation-duration: 0.9s; height: 20px; }
#visualizer .bar:nth-child(5) { animation-duration: 0.7s; height: 24px; }
#visualizer .bar:nth-child(6) { animation-duration: 1.0s; height: 18px; }
#visualizer .bar:nth-child(7) { animation-duration: 0.6s; height: 28px; }
#visualizer .bar:nth-child(8) { animation-duration: 0.8s; height: 22px; }
#visualizer .bar:nth-child(9) { animation-duration: 0.7s; height: 30px; }
#visualizer .bar:nth-child(10) { animation-duration: 0.9s; height: 26px; }
#visualizer .bar:nth-child(11) { animation-duration: 0.5s; height: 24px; }
#visualizer .bar:nth-child(12) { animation-duration: 0.8s; height: 28px; }
#visualizer .bar:nth-child(13) { animation-duration: 0.6s; height: 20px; }
#visualizer .bar:nth-child(14) { animation-duration: 0.9s; height: 16px; }
#visualizer .bar:nth-child(15) { animation-duration: 0.7s; height: 22px; }
#visualizer .bar:nth-child(16) { animation-duration: 0.5s; height: 14px; }
#visualizer .bar:nth-child(17) { animation-duration: 0.8s; height: 18px; }
#visualizer .bar:nth-child(18) { animation-duration: 0.6s; height: 12px; }
#visualizer .bar:nth-child(19) { animation-duration: 0.9s; height: 10px; }
#visualizer .bar:nth-child(20) { animation-duration: 0.7s; height: 8px; }

.music-bars .bar::after,
#visualizer .bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), transparent);
    border-radius: 2px 2px 0 0;
}

@keyframes bounce {
    0%, 100% { 
        transform: scaleY(0.3);
        opacity: 0.6;
    }
    50% { 
        transform: scaleY(1);
        opacity: 1;
    }
}

/* Toast with cute animation */
#toast {
    animation: slideInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1), float-toast 3s ease-in-out infinite;
}

@keyframes slideInUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes float-toast {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

/* Professional text shadows */
h1, h2, h3 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3),
                 0 4px 20px rgba(139, 92, 246, 0.2);
}

/* Smooth focus states */
button:focus,
a:focus {
    outline: 2px solid rgba(139, 92, 246, 0.5);
    outline-offset: 3px;
    animation: pulse-outline 1.5s ease-in-out infinite;
}

@keyframes pulse-outline {
    0%, 100% { outline-color: rgba(139, 92, 246, 0.5); }
    50% { outline-color: rgba(236, 72, 153, 0.5); }
}

/* Professional loading state */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.loading {
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.1) 50%, 
        rgba(255,255,255,0) 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Parallax effect for background */
.bg-gradient-animated {
    animation: gradient 25s ease infinite, parallax-move 30s ease-in-out infinite;
}

@keyframes parallax-move {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-2%, 2%) scale(1.02); }
    50% { transform: translate(2%, -2%) scale(1); }
    75% { transform: translate(-2%, -2%) scale(1.02); }
}

/* Skill bar enhanced animation */
.progress-fill {
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    animation: skill-shine 2s ease-in-out infinite;
}

@keyframes skill-shine {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* Enhanced screen transitions */
.screen-visible {
    animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.screen-hidden {
    animation: fadeOutScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInScale {
    from { 
        opacity: 0; 
        transform: scale(0.95) translateY(20px);
        filter: blur(10px);
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

@keyframes fadeOutScale {
    from { 
        opacity: 1; 
        transform: scale(1);
        filter: blur(0);
    }
    to { 
        opacity: 0; 
        transform: scale(0.95);
        filter: blur(5px);
    }
}

/* Language Switcher & Visitor Counter Styles */
#lang-vi, #lang-en {
    position: relative;
    z-index: 1;
    cursor: pointer;
}

#lang-vi:active, #lang-en:active {
    transform: scale(0.95) !important;
}

/* Visitor counter number animation */
#visitor-count {
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.5),
                 0 0 40px rgba(16, 185, 129, 0.3);
    animation: number-glow 3s ease-in-out infinite;
}

@keyframes number-glow {
    0%, 100% { 
        text-shadow: 0 0 20px rgba(16, 185, 129, 0.5),
                     0 0 40px rgba(16, 185, 129, 0.3);
    }
    50% { 
        text-shadow: 0 0 30px rgba(16, 185, 129, 0.8),
                     0 0 60px rgba(16, 185, 129, 0.5),
                     0 0 80px rgba(16, 185, 129, 0.3);
    }
}

/* Lyrics Display Styles */
#lyrics-container {
    position: relative;
    overflow: hidden;
}

#lyrics-text {
    text-shadow: 0 2px 20px rgba(139, 92, 246, 0.6),
                 0 4px 40px rgba(236, 72, 153, 0.4);
    animation: lyrics-glow 2s ease-in-out infinite;
    transform-origin: center;
    line-height: 1.4;
}

@keyframes lyrics-glow {
    0%, 100% { 
        text-shadow: 0 2px 20px rgba(139, 92, 246, 0.6),
                     0 4px 40px rgba(236, 72, 153, 0.4);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 4px 30px rgba(139, 92, 246, 0.9),
                     0 8px 60px rgba(236, 72, 153, 0.6),
                     0 12px 80px rgba(6, 182, 212, 0.4);
        transform: scale(1.05);
    }
}

#lyrics-text.lyrics-change {
    animation: lyrics-bounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes lyrics-bounce {
    0% {
        transform: scale(0.8) translateY(20px);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) translateY(-5px);
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Flag emoji enhancement */
#lang-vi, #lang-en {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

#lang-vi:hover, #lang-en:hover {
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.4));
}

/* Smooth transitions for language buttons */
#lang-vi, #lang-en {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Visitor counter hover effect */
.group:hover #visitor-count {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}
