/* DAY MODE - ANIMATED & MOBILE OPTIMIZED */
/* Add this to the very top of your CSS */
html, body {
    margin: 0;
    padding: 0;
    background-color: #000000; /* Ensures no white flashes if content loads slowly */
    width: 100%;
    overflow-x: hidden; /* Prevents accidental horizontal scrolling */
}
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #ddd;
    font-family: sans-serif;
    /* Smooth transition for theme swapping */
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.logo-container img {
    height: 100px;
    display: block;
    transition: height 0.3s ease, opacity 0.2s ease; /* Logo fade effect */
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Icon Animations */
#mode-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.mode-icon {
    animation: iconPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mode-icon.sun {
    color: #ffb100; /* Nice golden sun color */
}

@keyframes iconPop {
    0% { transform: scale(0.5) rotate(-45deg); opacity: 0; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* Switch UI with "Bounce" */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 22px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #e0e0e0;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    /* Cubic-bezier gives it a "snappy" bounce */
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input:checked + .slider { background-color: #2196F3; }
input:checked + .slider:before { transform: translateX(24px); }

/* Mobile optimization */
@media (max-width: 768px) {
    .top-bar { padding: 8px 15px; }
    .logo-container img { height: 50px; }
}