/* ============================================================
   COLOR OVERRIDES ONLY (Safe Mode)
   ============================================================ */

/* --- 1. LIGHT MODE (Default) --- */
/* We use !important to override the brown theme, but ONLY for colors */

body {
    background-color: #ffffff !important;
    /* Force White Background */
    color: #333333 !important;
    /* Force Dark Text */
}

/* Turn the brown containers white */
.main,
.overflow-container,
.excerpt,
.entry,
.comments,
.sidebar-footer {
    background-color: #ffffff !important;
    color: #333333 !important;
}

/* Fix Links (Standard Blue) */
a {
    color: #0056b3;
}

a:hover {
    color: #000000;
}

/* Keep the top menu legible */
.menu-primary-items a,
.site-title a {
    color: #333333;
    /* Dark text for light mode menu */
    opacity: 1;
}


/* --- 2. DARK MODE (Active) --- */

body.dark-mode {
    background-color: #1a1a1a !important;
    /* Soft Dark Gray */
    color: #e0e0e0 !important;
    /* Light Text */
}

/* Dark Mode Containers */
body.dark-mode .main,
body.dark-mode .overflow-container,
body.dark-mode .entry,
body.dark-mode .excerpt,
body.dark-mode .excerpt-container,
body.dark-mode .comments,
body.dark-mode .sidebar-footer {
    background-color: #1a1a1a !important;
    border-color: #333;
    color: #e0e0e0 !important;
}

/* Dark Mode Menu - Force White */
body.dark-mode .menu-primary-items a,
body.dark-mode .menu-unset>ul a,
body.dark-mode .top-navigation a,
body.dark-mode .site-title a,
body.dark-mode .toggle-navigation,
body.dark-mode .menu-secondary-items a,
body.dark-mode .social-media-icons a {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Dark Mode Content Links - Blue */
body.dark-mode .entry-content a,
body.dark-mode .excerpt-content a,
body.dark-mode .sidebar-footer a,
body.dark-mode .comment-content a {
    color: #69c0ff !important;
}

/* Dark Mode Headings */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode .entry-title a,
body.dark-mode .excerpt-title a {
    color: #ffffff !important;
}

/* Dark Mode Inputs */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode .search-form-container button {
    background: #333 !important;
    color: #fff !important;
    border: 1px solid #555 !important;
}

/* --- 3. TOGGLE BUTTON --- */
#dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

#dark-mode-toggle:hover {
    transform: scale(1.1);
    background: #555;
}


/* Quote Style on Home Page */
.home-quote {
    margin: 30px auto;
    padding: 20px 10px 10px 10px;
    /* Top, Right, Bottom, Left */
    background: #d2e7eb;
    border-radius: 12px;
    border-left: 6px solid #4a4a4a;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
    text-align: center;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.home-quote-text {
    margin: 0 0 10px 0;
    /* remove extra space */
    font-size: 1.7rem;
    /* Bigger main font */
    line-height: 1.75;
    font-style: italic;
    font-weight: 500;
    color: #0a0888;
}

.home-quote-author {
    margin: 5px 0 0 0;
    /* tight spacing */
    font-size: 1.4rem;
    /* Slightly larger author */
    font-weight: 500;
    text-align: center;
    color: #173461;
}



/* ============================================================
   EMOJI & FLAG SUPPORT (Fix for Windows)
   ============================================================ */

/* .flag-emoji {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
    font-weight: normal !important;
    font-style: normal !important;
} */

/* 1. Import the font that contains the actual flag graphics */
@import url('https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&display=swap');

/* 2. Apply it to your specific class */
.flag-emoji {
    font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-display: swap;
    line-height: 1em;
    /* Prevents the flag from making the line height huge */
    vertical-align: middle;
}


/* ============================================================
   MUSIC OVERLAY (Welcome Screen)
   ============================================================ */
#music-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.5s ease;
    text-align: center;
    color: white;
}

.overlay-content h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: white !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.overlay-content p {
    font-size: 1.2rem;
    opacity: 0.8;
    color: #ccc !important;
}

.pulse-circle {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.1);
    border: 2px solid white;
    border-radius: 50%;
    margin: 20px auto;
    line-height: 56px; 
    font-size: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 20px rgba(255, 255, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* ============================================================
   SPOTIFY WIDGET (Final Polish - Gap Fix)
   ============================================================ */

#music-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 10px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    height: 42px;
    gap: 0; 
}

body.dark-mode #music-container {
    background: rgba(40, 40, 40, 0.95);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

/* --- GROUP 1: PLAYBACK CONTROLS --- */
.playback-group {
    display: flex;
    align-items: center;
}

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: background 0.2s;
    margin: 0 2px;
}
body.dark-mode .control-btn { color: #fff; }
.control-btn:hover { background: rgba(0,0,0,0.05); }
body.dark-mode .control-btn:hover { background: rgba(255,255,255,0.1); }

/* Hidden buttons (Prev/Next) */
.secondary-controls {
    width: 0;
    overflow: hidden;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.3s ease;
    display: flex;
    justify-content: center;
}

#music-container:hover .secondary-controls {
    width: 34px; 
    opacity: 1;
}

/* Separator Line */
.playback-group::after {
    content: '';
    display: block;
    width: 1px;
    height: 18px;
    background: #ddd;
    margin: 0 12px; 
}
body.dark-mode .playback-group::after { background: #555; }


/* --- GROUP 2: VOLUME --- */
.volume-group {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* THE INVISIBLE BRIDGE (Fixes the Gap Issue) */
/* This creates a transparent block filling the gap between speaker and slider */
.volume-group::after {
    content: '';
    position: absolute;
    bottom: 100%; /* Start at top of speaker */
    left: 0;
    width: 100%;
    height: 20px; /* Height of the gap */
    background: transparent;
}

/* The Pop-up Slider Wrapper */
.volume-slider-wrapper {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 0; /* Hidden */
    background: rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
    overflow: hidden;
    
    /* Smooth Transition with Delay */
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 1.1s; /* Keeps it open for 100ms after mouse leaves */
    
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 12px;
    margin-bottom: 12px; /* The visual gap */
    pointer-events: none;
}
body.dark-mode .volume-slider-wrapper { background: #333; }

/* Show Slider on Volume Group Hover */
.volume-group:hover .volume-slider-wrapper {
    height: 110px;
    pointer-events: auto;
    transition-delay: 0s; /* Open instantly */
}

/* The Vertical Input */
input[type=range] {
    writing-mode: vertical-lr;
    direction: rtl;
    appearance: slider-vertical;
    width: 6px;
    height: 85px;
    cursor: pointer;
    accent-color: #69c0ff;
    margin: 0;
}

/* MOBILE OPTIMIZATION */
/* @media (max-width: 768px) {
    #music-container:hover .secondary-controls {
        width: 0;
        opacity: 0;
    }
    .volume-slider-wrapper {
        display: none !important;
    }
} */

