/* Add these styles to your existing style.css file */

/* For hiding/showing content */
.hidden {
    display: none;
}

/* Simple fade-in and fade-out animations */
.fade-in {
    animation: fadeIn 0.5s ease-in-out forwards;
}
.fade-out {
    animation: fadeOut 0.5s ease-in-out forwards;
}

/* Password error styling */
#password-error {
    color: red;
    visibility: hidden; /* Use visibility instead of display */
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-top: 1rem;
}
#password-error.visible {
    visibility: visible;
    opacity: 1;
}
input.error {
    border-color: red !important;
}

/* Keyframes for the animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ============================================= */
/* === DARK THEME                            === */
/* ============================================= */
body.dark-theme {
    background: #121212;
}
body.dark-theme #password-container,
body.dark-theme #main-content {
    background: #1e1e1e;
    border-color: #333;
}
body.dark-theme input[type="password"] {
    background: #2a2a2a;
    border-color: #555;
    color: #e0e0e0;
}
body.dark-theme button {
    background: #2e2e2e;
    border-color: #555 #222 #222 #555;
    color: #e0e0e0;
}
body.dark-theme button:hover { background: #3a3a3a; }
body.dark-theme .stat-card { background: #1a1a2e; border-color: #333355; }
body.dark-theme .tag { background: #2a2a3a; color: #c0c0d0; border-color: #333; }
body.dark-theme .book-item { border-color: #333; }
body.dark-theme .admin-panel { background: #1e1e1e; border-color: #4fc3f7; }
body.dark-theme .admin-add-row input { background: #2a2a2a; border-color: #555; color: #e0e0e0; }
body.dark-theme .admin-tag { background: #2a2a3a; color: #c0c0d0; border-color: #444; }
body.dark-theme .admin-save-btn { background: #4fc3f7; color: #121212; }

/* ============================================= */
/* === FRUTIGER AERO THEME & TOGGLE STYLES === */
/* ============================================= */

/* --- The Toggle Switch --- */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background: linear-gradient(to bottom, #34c759, #299c46); /* Glossy green */
}
input:checked + .slider:before {
    transform: translateX(26px);
}

/* --- Frutiger Aero Theme Starts Here --- */
body.frutiger-aero-theme {
    background: linear-gradient(135deg, #aeefff 0%, #e0f7fa 100%), url('https://images.unsplash.com/photo-1465101046530-73398c7f28ca?auto=format&fit=crop&w=1500&q=80');
    background-size: cover;
    background-blend-mode: screen;
    font-family: 'Segoe UI', 'Arial Rounded MT Bold', Arial, sans-serif;
    color: #0a3d62;
    transition: background-image 0.5s ease-in-out;
}

/* --- Glassmorphism Container Effect --- */
.frutiger-aero-theme #password-container,
.frutiger-aero-theme #main-content {
    background: rgba(255, 255, 255, 0.4); /* Semi-transparent white */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px); /* Safari support */
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    text-align: center; /* Center align for a cleaner look */
}

/* --- General Element Styling --- */
.frutiger-aero-theme h1,
.frutiger-aero-theme h2 {
    font-family: "Segoe UI", Frutiger, sans-serif;
    color: #00529B; /* Deep, optimistic blue */
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
    font-weight: 300;
}

.frutiger-aero-theme hr {
    border-top: 1px solid rgba(255, 255, 255, 0.7);
}

.frutiger-aero-theme a {
    color: #0078D7;
    font-weight: bold;
}

/* --- Make the Penguin Glow! --- */
.frutiger-aero-theme #ascii-art {
    font-size: 2.2em;
    color: #00bfff;
    text-shadow: 0 2px 12px #fff, 0 0px 30px #00eaff;
    background: rgba(255,255,255,0.5);
    border-radius: 12px;
    padding: 0.5em;
    margin-bottom: 1em;
}

/* Animated bubbles */
.frutiger-aero-theme .bubble {
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #aeefff 60%, #00eaff 100%);
    opacity: 0.7;
    pointer-events: none;
    z-index: 0;
    animation: bubbleUp 8s linear infinite;
}
@keyframes bubbleUp {
    0% { transform: translateY(100vh) scale(0.5); }
    100% { transform: translateY(-10vh) scale(1.2); }
}

.frutiger-aero-theme section {
    text-align: left; /* Keep sections left-aligned */
}

.frutiger-aero-theme #furthest-town-info,
.frutiger-aero-theme #percent-done,
.frutiger-aero-theme #percent-left {
    font-family: "Segoe UI", sans-serif;
    font-size: 1.1rem;
    color: #333;
}

.frutiger-aero-theme div,
.frutiger-aero-theme span,
.frutiger-aero-theme p,
.frutiger-aero-theme li {
    text-transform: none !important; /* Override the lowercase styling */
    color: #222;
}

/* --- Glossy Inputs & Buttons --- */
.frutiger-aero-theme input[type="password"],
.frutiger-aero-theme button {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}
.frutiger-aero-theme input[type="password"] {
    background: rgba(255, 255, 255, 0.7);
    text-align: center;
    color: #0a3d62;
}
.frutiger-aero-theme input[type="password"]:focus {
    outline: none;
    border-color: #0078D7;
    box-shadow: 0 0 10px rgba(0, 120, 215, 0.5);
}
.frutiger-aero-theme button {
    background: linear-gradient(90deg, #aeefff 0%, #e0f7fa 100%);
    box-shadow: 0 2px 8px #00eaff88;
    border: none;
    color: #0a3d62;
    font-weight: bold;
    border-radius: 12px;
    padding: 0.5em 1em;
    margin: 0.5em 0;
}
.frutiger-aero-theme button:hover {
    background: linear-gradient(to bottom, #f0f0f0, #dcdcdc);
}
.frutiger-aero-theme button:active {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
    background: #dcdcdc;
}

.frutiger-aero-theme #map {
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.frutiger-aero-theme .stat-card {
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

.frutiger-aero-theme .admin-panel {
    background: rgba(255,255,255,0.85);
    border-radius: 16px;
    border-color: #00796b;
    backdrop-filter: blur(12px);
}