@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #0f172a;
    --panel-bg: rgba(15, 23, 42, 0.8);
    --border-light: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(255, 159, 67, 0.5);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #ff9f43;
    --primary-hover: #ffb167;
    --accent-blue: #38bdf8;
    --accent-green: #4ade80;
    --accent-red: #f87171;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    
    /* Transparent Backgrounds & Utilities */
    --input-bg: rgba(30, 41, 59, 0.5);
    --input-focus-bg: rgba(30, 41, 59, 0.8);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-hover-bg: rgba(255, 255, 255, 0.06);
    --button-sec-bg: rgba(255, 255, 255, 0.05);
    --button-sec-hover-bg: rgba(255, 255, 255, 0.1);
    --border-dashed: rgba(255, 255, 255, 0.1);
    --map-popup-bg: rgba(15, 23, 42, 0.9);
    --suggestions-bg: #1e293b;
    --scrollbar-thumb: rgba(255, 255, 255, 0.15);
    --scrollbar-thumb-hover: rgba(255, 255, 255, 0.25);
}

body.light-theme {
    --bg-dark: #f8fafc;
    --panel-bg: rgba(255, 255, 255, 0.85);
    --border-light: rgba(15, 23, 42, 0.08);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    
    /* Light theme overrides */
    --input-bg: rgba(255, 255, 255, 0.9);
    --input-focus-bg: rgba(255, 255, 255, 1);
    --card-bg: rgba(15, 23, 42, 0.02);
    --card-hover-bg: rgba(15, 23, 42, 0.05);
    --button-sec-bg: rgba(15, 23, 42, 0.04);
    --button-sec-hover-bg: rgba(15, 23, 42, 0.08);
    --border-dashed: rgba(15, 23, 42, 0.08);
    --map-popup-bg: rgba(255, 255, 255, 0.95);
    --suggestions-bg: #ffffff;
    --scrollbar-thumb: rgba(0, 0, 0, 0.15);
    --scrollbar-thumb-hover: rgba(0, 0, 0, 0.25);
}

/* Header title gradient override in light mode */
body.light-theme .header-title h1 {
    background: linear-gradient(to right, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Theme Toggle Button Styling */
.theme-btn {
    background: var(--button-sec-bg);
    border: 1px solid var(--border-light);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-btn:hover {
    background: var(--button-sec-hover-bg);
    border-color: var(--primary);
    color: var(--primary);
}

.theme-btn svg {
    transition: transform 0.5s ease;
}

.theme-btn:hover svg {
    transform: rotate(15deg);
}

body.light-theme .theme-btn .sun-icon {
    display: none !important;
}
body.light-theme .theme-btn .moon-icon {
    display: block !important;
}
body:not(.light-theme) .theme-btn .sun-icon {
    display: block !important;
}
body:not(.light-theme) .theme-btn .moon-icon {
    display: none !important;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* Application Layout */
#app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* Sidebar Container */
#sidebar {
    width: 420px;
    height: 100%;
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    transition: transform var(--transition-normal);
}

#sidebar.collapsed {
    transform: translateX(-100%);
}

/* Header styling */
.header {
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #ff6b6b);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 159, 67, 0.3);
}

.header-logo svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.header-title h1 {
    font-size: 20px;
    font-weight: 600;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-title p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Scrollable Panel Content */
.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Scrollbar Customization */
.panel-content::-webkit-scrollbar {
    width: 6px;
}
.panel-content::-webkit-scrollbar-track {
    background: transparent;
}
.panel-content::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}
.panel-content::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Input Fields & Groups */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.input-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 14px 14px 14px 44px;
    color: var(--text-main);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 159, 67, 0.15);
    background: var(--input-focus-bg);
}

.input-wrapper input::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

/* Search suggestions dropdown */
.suggestions-box {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: var(--suggestions-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 2000;
    box-shadow: var(--shadow-lg);
    display: none;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.suggestion-item:hover {
    background: var(--card-hover-bg);
}

.suggestion-item .stop-name {
    font-weight: 500;
    color: var(--text-main);
}

.suggestion-item .stop-code {
    font-size: 11px;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), #ff7b00);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
    box-shadow: 0 4px 14px rgba(255, 159, 67, 0.3);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 159, 67, 0.4);
}

.btn:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: var(--button-sec-bg);
    color: var(--text-main);
    border: 1px solid var(--border-light);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--button-sec-hover-bg);
    box-shadow: none;
}

/* Walk limit setting */
.settings-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Results panel */
#results-section {
    display: none;
    flex-direction: column;
    gap: 16px;
    animation: fadeIn var(--transition-normal) forwards;
}

.results-header {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.route-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.route-card:hover {
    border-color: var(--border-focus);
    background: var(--card-hover-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.route-card.selected {
    border-color: var(--primary);
    background: rgba(255, 159, 67, 0.08);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.card-tag.optimal {
    background: rgba(74, 222, 128, 0.15);
    color: var(--accent-green);
}

.card-tag.alternative {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-blue);
}

.card-duration {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
}

.card-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.segment-icon {
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.badge.walk {
    background: #475569;
}

.card-details {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
    padding-top: 10px;
}

.card-details span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Itinerary Details */
.itinerary-details {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-dashed);
    animation: slideDown var(--transition-fast) forwards;
}

.route-card.selected .itinerary-details {
    display: flex;
}

.itinerary-step {
    display: flex;
    gap: 12px;
    position: relative;
}

.itinerary-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 9px;
    top: 22px;
    bottom: -10px;
    width: 2px;
    background: var(--border-dashed);
}

.itinerary-step.walk:not(:last-child)::after {
    border-left: 2px dashed var(--text-muted);
    opacity: 0.4;
    width: 0;
}

.step-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #475569;
    border: 3px solid var(--bg-dark);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.itinerary-step.ride .step-marker {
    background: var(--primary);
}

.itinerary-step.start .step-marker {
    background: var(--accent-green);
}

.itinerary-step.end .step-marker {
    background: var(--accent-red);
}

.step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.step-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.step-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* Map Container */
#map-container {
    flex: 1;
    height: 100%;
    position: relative;
    background: #111;
}

#map {
    width: 100%;
    height: 100%;
}

/* Map control overlay buttons */
.map-overlay-btn {
    position: absolute;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--panel-bg);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
}

.map-overlay-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Custom Marker Styling */
.custom-div-icon {
    background: none;
    border: none;
}

.stop-marker-icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--primary);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
    transition: all var(--transition-fast);
}

.stop-marker-icon:hover {
    transform: scale(1.3);
    background: var(--primary);
}

/* Leaflet Overrides */
.leaflet-bar {
    border: 1px solid var(--border-light) !important;
    box-shadow: var(--shadow-lg) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.leaflet-bar a {
    background-color: var(--panel-bg) !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border-light) !important;
    backdrop-filter: blur(10px);
}

.leaflet-bar a:hover {
    background-color: var(--primary) !important;
    color: #fff !important;
}

.leaflet-popup-content-wrapper {
    background: var(--map-popup-bg) !important;
    color: var(--text-main) !important;
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-light);
    border-radius: 12px !important;
    box-shadow: var(--shadow-lg) !important;
}

.leaflet-popup-tip {
    background: var(--map-popup-bg) !important;
    border: 1px solid var(--border-light);
}

.leaflet-popup-content {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

/* No results state */
.no-results {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.no-results svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-muted);
    opacity: 0.5;
}

/* Loading Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile styles moved to the end of the file */

/* Swap directions button row */
.swap-container {
    display: flex;
    justify-content: center;
    margin: -10px 0;
    position: relative;
    z-index: 10;
}
.swap-btn {
    background: var(--button-sec-bg) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-light) !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all var(--transition-fast) !important;
    cursor: pointer !important;
    height: 32px !important;
}
.swap-btn:hover {
    background: var(--button-sec-hover-bg) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    transform: scale(1.03) !important;
    box-shadow: 0 4px 15px rgba(255,159,67,0.2) !important;
}
.swap-btn svg {
    transition: transform var(--transition-normal);
}
.swap-btn:hover svg {
    transform: rotate(180deg);
}

/* Traffic Toggle overlay button styling */
#traffic-toggle {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 1000;
    padding: 0 16px;
    height: 40px;
    border-radius: 20px;
    background: var(--panel-bg);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
}
#traffic-toggle span {
    transition: all var(--transition-fast);
}
#traffic-toggle.active {
    border-color: rgba(255, 159, 67, 0.3);
    box-shadow: 0 4px 14px rgba(255, 159, 67, 0.15);
}
#traffic-toggle:hover {
    transform: translateY(-2px);
    background: var(--button-sec-hover-bg);
}

/* Route select wrapper tweaks */
#route-preference:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 159, 67, 0.15);
    background: var(--input-focus-bg);
}
#route-preference option {
    background: var(--bg-dark);
    color: var(--text-main);
}

/* Premium Toggle Switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.switch-label {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--button-sec-bg);
    border: 1px solid var(--border-light);
    transition: all var(--transition-fast);
    border-radius: 24px;
}
.switch-label:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: all var(--transition-fast);
    border-radius: 50%;
}
.toggle-switch input:checked + .switch-label {
    background-color: var(--primary);
    border-color: var(--primary);
}
.toggle-switch input:checked + .switch-label:before {
    transform: translateX(24px);
    background-color: #fff;
}

/* Sidebar Footer & Socials */
.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 11px;
}
body.light-theme .sidebar-footer {
    background: rgba(255, 255, 255, 0.4);
}
.footer-attribution {
    color: var(--text-muted);
    font-size: 12px;
}
.footer-attribution span {
    color: var(--text-main);
    font-weight: 600;
}
.footer-social {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-muted);
}
.footer-social a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 4px 8px;
    background: var(--button-sec-bg);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    transition: all var(--transition-fast);
}
.footer-social a:hover {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}
body.light-theme .footer-social a:hover {
    color: #fff;
}

/* Sidebar Toggle button positioning and premium animations */
#toggle-sidebar {
    left: 444px; /* 420px width of sidebar + 24px gap */
    z-index: 1001;
    transition: left var(--transition-normal), right var(--transition-normal), transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

#sidebar.collapsed + #toggle-sidebar {
    left: 24px;
}

@media (max-width: 768px) {
    #sidebar {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100%;
        height: 70vh;
        max-height: 70dvh;
        border-right: none;
        border-top: 1px solid var(--border-light);
        border-radius: 24px 24px 0 0;
        transform: translateY(0);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
        transition: transform var(--transition-normal);
    }
    
    #sidebar.collapsed {
        transform: translateY(calc(100% - 72px)); /* Header height is ~72px */
    }
    
    /* Grab handle drag indicator */
    #sidebar::before {
        content: "";
        display: block;
        width: 40px;
        height: 4px;
        background: var(--text-muted);
        opacity: 0.3;
        border-radius: 2px;
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1002;
    }
    
    #sidebar .header {
        padding: 20px 20px 16px 20px;
        cursor: pointer;
        position: relative;
    }
    
    #sidebar .header-logo {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
    
    #sidebar .header-title h1 {
        font-size: 17px;
    }
    
    #sidebar .header-title p {
        font-size: 10px;
    }
    
    .panel-content {
        padding: 16px;
        gap: 16px;
    }
    
    #traffic-toggle {
        top: 16px;
        right: 16px;
        font-size: 12px;
        padding: 0 12px;
        height: 36px;
    }
    
    /* Toggle button floating just above bottom sheet */
    #toggle-sidebar {
        left: auto !important;
        right: 16px !important;
        bottom: calc(70vh + 16px) !important;
        transition: bottom var(--transition-normal), transform var(--transition-fast);
    }
    
    #sidebar.collapsed + #toggle-sidebar {
        bottom: 88px !important; /* 72px + 16px */
    }
    
    #toggle-sidebar svg {
        transform: rotate(-90deg);
    }
    
    /* Reposition Leaflet Zoom Control on mobile to avoid overlapping */
    .leaflet-bottom.leaflet-right {
        bottom: calc(70vh + 76px) !important;
        right: 16px !important;
        transition: bottom var(--transition-normal) !important;
    }
    
    #sidebar.collapsed ~ #map-container .leaflet-bottom.leaflet-right {
        bottom: 148px !important; /* 72px + 16px + 44px + 16px */
    }
}

/* Premium Ad Container & Monetization Placeholder */
.ad-container {
    background: var(--card-bg);
    border: 1px dashed var(--border-dashed);
    border-radius: 12px;
    padding: 16px;
    min-height: 125px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin: 8px 0;
    transition: all var(--transition-fast);
}

.ad-container:hover {
    background: var(--card-hover-bg);
    border-color: var(--primary);
}

.ad-label {
    position: absolute;
    top: 6px;
    left: 10px;
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Fallback placeholder text shown when ads haven't loaded */
.ad-container::after {
    content: "Espacio de Monetización (Google Ads)";
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
    pointer-events: none;
}

/* Hide placeholder text when Google AdSense successfully loads an ad */
.ad-container:has(ins[data-ad-status="filled"])::after,
.ad-container:has(iframe)::after {
    display: none;
}

@media (max-width: 480px) {
    .ad-container {
        min-height: 100px;
        padding: 12px;
    }
}

/* Footer donation styles */
.footer-donation {
    margin-top: 14px;
    margin-bottom: 6px;
    width: 100%;
}

.donate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 159, 67, 0.1);
    border: 1px solid rgba(255, 159, 67, 0.25);
    border-radius: 10px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.donate-btn:hover {
    background: rgba(255, 159, 67, 0.18);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.coffee-icon {
    display: inline-block;
    transition: transform var(--transition-normal);
}

.donate-btn:hover .coffee-icon {
    transform: rotate(-12deg) scale(1.1);
}

/* Light theme compatibility */
body.light-theme .donate-btn {
    background: rgba(255, 159, 67, 0.08);
    border-color: rgba(255, 159, 67, 0.4);
    color: #c97524;
}

body.light-theme .donate-btn:hover {
    background: rgba(255, 159, 67, 0.15);
    border-color: #c97524;
}


