
/* Dark Mode Toggle Styles */
.toggle-wrapper {
    width: 112px; 
    height: 40px; 
    padding: 3px;  
    cursor: pointer;
    position: fixed !important;
    bottom: 20px;
    right: 20px;
    z-index: 1000 !important;
    border-radius: 40px; 
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(14px);
    box-shadow: 0 0 16px rgba(255,255,255,0.05), 0 0 40px rgba(0,217,255,0.18), 0 0 80px rgba(255,255,255,0.05) inset;
    transition: all 0.3s ease;
}

body:not(.dark-mode) .toggle-wrapper{
    background:rgba(0,0,0,0.08);
    box-shadow:0 0 12px rgba(0,0,0,0.06) inset,
               0 0 30px rgba(0,217,255,0.12),
               0 0 60px rgba(0,0,0,0.04) inset;
}

.toggle-wrapper::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: inherit;
    background: linear-gradient(45deg, rgba(255,200,0,0.2), rgba(0,217,255,0.2), rgba(255,200,0,0.2));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.toggle-wrapper::after {
    content: '';
    position: absolute;
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    pointer-events: none;
    transition: all 0.4s ease;
}

.toggle-wrapper:hover {
    box-shadow: 0 0 20px rgba(255,255,255,0.1), 0 0 45px rgba(0,217,255,0.3), 0 0 70px rgba(255,255,255,0.1) inset;
}

.toggle-wrapper:hover::before { opacity: 1; }

.toggle-wrapper:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.track {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border-radius: 16px;
    background: linear-gradient(90deg, rgba(255,200,0,0.1) 0%, rgba(255,200,0,0.05) 30%, rgba(0,217,255,0.05) 70%, rgba(0,217,255,0.1) 100%);
    transition: all 0.6s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
}

body.dark-mode .track {
    background: linear-gradient(90deg, rgba(255,200,0,0.08) 0%, rgba(255,200,0,0.03) 30%, rgba(0,217,255,0.03) 70%, rgba(0,217,255,0.08) 100%);
}

.indicator {
    position: absolute;
    top: 3px;
    left: 5px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(18px);
    box-shadow: 0 0 12px rgba(255,200,0,0.4), inset 0 0 10px rgba(255,200,0,0.3);
    transition: all 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
    z-index: 2;
    overflow: hidden;
}

body.dark-mode .indicator {
    transform: translateX(69px);
    background: rgba(255,255,255,0.15);
    box-shadow: 0 0 10px rgba(0,217,255,0.4), inset 0 0 10px rgba(0,217,255,0.25);
}

.icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 19px;
    height: 19px;
    fill: #222;
    stroke: #222;
    stroke-width: 2;
    transition: all 0.4s ease;
    transform-origin: center;
}

body.dark-mode .icon { fill: #fff; stroke: #fff; }

.icon:not(.active) {
    opacity: 0;
    transform: translate(-50%,-50%) scale(0.8);
}

.icon.active {
    opacity: 1;
    transform: translate(-50%,-50%) scale(1);
}

#sun.active {
    filter: drop-shadow(0 0 5px #ffb700) drop-shadow(0 0 10px #ffb700);
    animation: sunPulse 2s ease-in-out infinite alternate;
}

@keyframes sunPulse {
    0% { transform: translate(-50%,-50%) scale(1) rotate(0deg); }
    100% { transform: translate(-50%,-50%) scale(1.05) rotate(5deg); }
}

body.dark-mode #moon.active {
    filter: drop-shadow(0 0 5px #00d9ff) drop-shadow(0 0 10px #00d9ff);
    animation: moonGlow 3s ease-in-out infinite alternate;
}

@keyframes moonGlow {
    0% { transform: translate(-50%,-50%) scale(1) rotate(0deg); }
    100% { transform: translate(-50%,-50%) scale(1.08) rotate(-3deg); }
}

.sun-rays {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 26px;
    height: 26px;
    opacity: 0;
    transition: all 0.6s ease;
}

#sun.active ~ .sun-rays {
    opacity: 0.6;
    animation: rayRotate 8s linear infinite;
}

@keyframes rayRotate {
    from { transform: translate(-50%,-50%) rotate(0deg); }
    to { transform: translate(-50%,-50%) rotate(360deg); }
}

.sun-rays line {
    stroke: #ffb700;
    stroke-width: 1;
    stroke-linecap: round;
    opacity: 0.7;
}

.moon-stars {
    position: absolute;
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0;
    opacity: 0;
    transition: all 0.6s ease;
}

body.dark-mode #moon.active ~ .moon-stars {
    opacity: 1;
    animation: twinkle 2s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

.star {
    position: absolute;
    width: 2px; height: 2px;
    background: #00d9ff;
    border-radius: 50%;
    box-shadow: 0 0 4px #00d9ff;
}

.star:nth-child(1) { top: 8px; left: 8px; animation-delay: 0s; }
.star:nth-child(2) { top: 12px; right: 6px; animation-delay: 0.5s; }
.star:nth-child(3) { bottom: 10px; left: 12px; animation-delay: 1s; }
.star:nth-child(4) { bottom: 8px; right: 10px; animation-delay: 1.5s; }

.particles {
    position: absolute;
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
}

.particle {
    position: absolute;
    width: 2px; height: 2px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    opacity: 0;
}

.ripple {
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,200,0,0.3) 0%, transparent 70%);
    transform: translate(-50%,-50%);
    pointer-events: none;
    opacity: 0;
    transition: all 0.6s ease-out;
}

body.dark-mode .ripple {
    background: radial-gradient(circle, rgba(0,217,255,0.3) 0%, transparent 70%);
}

.toggle-wrapper.clicked .ripple {
    width: 100px; height: 100px; opacity: 1;
}

@keyframes floatParticle {
    0% { opacity: 0; transform: translateY(10px) scale(0); }
    50% { opacity: 1; transform: translateY(-5px) scale(1); }
    100% { opacity: 0; transform: translateY(-20px) scale(0.5); }
}

@keyframes burstOut {
    0% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
    100% { transform: translate(calc(-50% + var(--endX)), calc(-50% + var(--endY))) scale(0); opacity: 0; }
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #23272f !important;
    color: #fff !important;
}