* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme - Blue & Grey with Orange Accents */
    --gradient-primary: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
    --gradient-secondary: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    --gradient-accent: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    --primary-color: #3b82f6;
    --primary-light: #60a5fa;
    --accent-color: #f97316;
    --background: linear-gradient(to bottom, #f1f5f9 0%, #e2e8f0 100%);
    --background-solid: #f8fafc;
    --card-background: rgba(255, 255, 255, 0.8);
    --card-background-solid: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: rgba(59, 130, 246, 0.2);
    --short-wait: #10b981;
    --moderate-wait: #f97316;
    --long-wait: #ef4444;
    --shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(59, 130, 246, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --wishlist-color: #f97316;
    --header-bg: #ffffff;
    --header-text: #1e293b;

    /* Heights */
    --header-height: 4rem;
    --filter-header-height: 3rem;
    --park-filter-height: 3.5rem;
}

[data-theme="dark"] {
    /* Dark Theme - Blue & Grey with Orange Accents */
    --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #1d4ed8 100%);
    --gradient-secondary: linear-gradient(135deg, #334155 0%, #475569 100%);
    --gradient-accent: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
    --primary-color: #60a5fa;
    --primary-light: #93c5fd;
    --accent-color: #fb923c;
    --background: linear-gradient(to bottom, #0f172a 0%, #1e293b 100%);
    --background-solid: #0f172a;
    --card-background: rgba(30, 41, 59, 0.6);
    --card-background-solid: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: rgba(96, 165, 250, 0.3);
    --short-wait: #34d399;
    --moderate-wait: #fb923c;
    --long-wait: #f87171;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --wishlist-color: #fb923c;
    --header-bg: #1e293b;
    --header-text: #f1f5f9;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
    padding-top: 0;
}

.container {
    max-width: 100%;
    min-height: 100vh;
    padding-top: 12rem;
    padding-bottom: 2rem;
}

header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 0.75rem;
    box-shadow: var(--shadow-lg);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease, color 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.header-logos {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.header-logos .park-btn {
    padding: 0.3rem;
    min-height: auto;
}

.header-logos .park-logo {
    height: 38px;
}

.header-logos .park-btn[data-type="wdw"] .park-logo {
    height: 43px;
}

.header-logos .park-btn[data-type="universal"] .park-logo {
    height: 34px;
}

.header-buttons {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.header-title {
    flex: 1;
    text-align: center;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    padding: 0;
}

.theme-toggle span {
    font-size: 1.5rem;
}

.theme-toggle.active {
    background: rgba(255, 255, 255, 0.4);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon {
    font-size: 1.25rem;
    line-height: 1;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.last-updated {
    font-size: 0.75rem;
    opacity: 0.9;
}

.park-selector {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: white;
    position: sticky;
    top: 4rem;
    z-index: 50;
    box-shadow: var(--shadow);
}

.filter-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    backdrop-filter: blur(10px);
    padding: 0.75rem 0.5rem 0.5rem 0.5rem;
    position: fixed;
    top: 4.5rem;
    left: 0;
    right: 0;
    z-index: 90;
    box-shadow: var(--shadow);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.filter-controls-wrapper {
    display: flex;
    gap: 0.25rem;
    flex-wrap: nowrap;
    justify-content: space-evenly;
    overflow-x: auto;
}

.notification-toggle-btn,
.wishlist-toggle-btn,
.walk-ons-toggle-btn,
.shows-toggle-btn,
.restaurants-toggle-btn,
.history-toggle-btn,
.map-toggle-btn {
    flex: 0 0 auto;
    min-width: 48px;
    min-height: 48px;
    padding: 0.5rem;
    font-size: 2rem;
    font-weight: 600;
    border: none;
    background: transparent;
    color: white;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.notification-toggle-btn .bell {
    font-size: 1.25rem;
    line-height: 1;
}

.notification-toggle-btn.active {
    background: var(--gradient-secondary);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.wishlist-toggle-btn .heart {
    font-size: 2rem;
    line-height: 1;
}

.wishlist-toggle-btn.active,
.walk-ons-toggle-btn.active,
.shows-toggle-btn.active,
.restaurants-toggle-btn.active,
.history-toggle-btn.active,
.map-toggle-btn.active {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 0.5rem;
}

.wishlist-toggle-btn.active .heart {
    content: '♥';
}

.notification-toggle-btn:active,
.filter-toggle-btn:active,
.wishlist-toggle-btn:active,
.walk-ons-toggle-btn:active,
.shows-toggle-btn:active,
.restaurants-toggle-btn:active,
.map-toggle-btn:active {
    transform: scale(0.98);
}

.filter-sections {
    transition: max-height 0.3s ease;
}

.park-filter {
    background: var(--card-background-solid);
    backdrop-filter: blur(10px);
    padding: 0.75rem 0.5rem 0.5rem 0.5rem;
    position: fixed;
    top: 8.75rem;
    left: 0;
    right: 0;
    z-index: 70;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--border-color);
}

.park-filter label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.park-filter-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.park-filter-buttons::-webkit-scrollbar {
    display: none;
}

.park-filter-btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    background: var(--card-background-solid);
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--text-primary);
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.park-filter-btn.active {
    background: var(--gradient-secondary);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.park-filter-btn:active {
    transform: scale(0.95);
}

.filter-sections .controls {
    background: white;
    padding: 1rem;
    position: sticky;
    top: 16.5rem;
    z-index: 40;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-section,
.sort-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.controls label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.controls select,
.controls input[type="text"] {
    padding: 0.75rem;
    font-size: 0.9375rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
    color: var(--text-primary);
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.controls select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.controls input[type="text"]:focus,
.controls select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.controls input[type="text"]::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.park-btn {
    flex: 1;
    padding: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.park-logo {
    height: 56px;
    width: auto;
    object-fit: contain;
    opacity: 0.5;
    transition: opacity 0.2s, filter 0.3s ease;
}

.park-btn[data-type="wdw"] .park-logo {
    height: 60px;
}

.park-btn[data-type="universal"] .park-logo {
    height: 52px;
}

.park-btn.active .park-logo {
    opacity: 1;
}

[data-theme="dark"] .park-logo {
    filter: invert(1);
}

.park-btn.active {
    background: transparent;
    color: white;
}

.park-btn:active {
    transform: scale(0.98);
}

.loading,
.error {
    text-align: center;
    padding: 3rem 1rem;
}

.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error {
    color: var(--long-wait);
}

.parks-container {
    padding: 0 1rem;
}

.wishlist-summary {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.wishlist-summary.clickable {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wishlist-summary.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -5px rgba(139, 92, 246, 0.3), 0 6px 10px -3px rgba(0, 0, 0, 0.1);
}

.wishlist-summary.clickable:active {
    transform: translateY(0);
}

.wishlist-summary .summary-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.wishlist-summary .summary-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.95;
    flex-wrap: wrap;
}

.wishlist-summary .summary-hint {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.5rem;
    text-align: center;
    font-style: italic;
}

.park-section {
    margin-bottom: 2rem;
}

.shows-section {
    margin-bottom: 1.5rem;
}

.shows-header {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.restaurants-section {
    margin-bottom: 1.5rem;
}

.restaurants-header {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.restaurants-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.restaurant-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--card-background);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.restaurant-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.restaurant-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-service-badge {
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    background: var(--accent-color);
    color: white;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.restaurant-cuisine {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

.restaurant-menu-link {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 0.375rem;
    width: fit-content;
    transition: all 0.2s ease;
    margin-top: 0.25rem;
}

.restaurant-menu-link:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: scale(1.05);
}

.restaurant-menu-link:active {
    transform: scale(0.95);
}

.restaurant-wait {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    font-weight: 700;
    min-width: 4rem;
    justify-content: flex-end;
}

.restaurant-wait .time {
    font-size: 1.25rem;
}

.restaurant-wait .unit {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.7;
}

.restaurant-wait.short {
    color: var(--short-wait);
}

.restaurant-wait.moderate {
    color: var(--moderate-wait);
}

.restaurant-wait.long {
    color: var(--long-wait);
}

.restaurant-wait .status {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    background: var(--text-secondary);
    color: white;
}

.shows-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.show-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--card-background);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.show-name {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.show-times {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.show-time {
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    background: var(--gradient-accent);
    color: white;
    border-radius: 0.5rem;
    white-space: nowrap;
}

.show-times.no-shows {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-style: italic;
}

.park-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0 0.25rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.park-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.park-hours {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.hours-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.time-until-close {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-color);
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.time-until-close.closed {
    color: var(--long-wait);
    background: none;
    -webkit-text-fill-color: var(--long-wait);
}

.rides-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ride-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--card-background);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.ride-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.wishlist-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #e2e8f0;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.wishlist-btn.active {
    color: #ec4899;
}

.wishlist-btn:hover {
    transform: scale(1.1);
}

.wishlist-btn:active {
    transform: scale(0.9);
}

.ride-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ride-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

.alert-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(139, 92, 246, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    display: inline-block;
    width: fit-content;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alert-badge:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: scale(1.05);
}

.alert-badge:active {
    transform: scale(0.95);
}

.distance-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    display: inline-block;
    width: fit-content;
}

.wait-time {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    font-weight: 700;
    min-width: 4rem;
    justify-content: flex-end;
}

.wait-time .time {
    font-size: 1.5rem;
}

.wait-time .unit {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.7;
}

.wait-time.short {
    color: var(--short-wait);
}

.wait-time.moderate {
    color: var(--moderate-wait);
}

.wait-time.long {
    color: var(--long-wait);
}

.wait-time .status {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wait-time .status.closed {
    background: var(--text-secondary);
    color: white;
}

.wait-time .status.down {
    background: var(--long-wait);
    color: white;
}

.wait-time .status.refurb {
    background: var(--moderate-wait);
    color: white;
}

/* Tablet and larger screens */
@media (min-width: 768px) {
    .container {
        max-width: 768px;
        margin: 0 auto;
    }

    h1 {
        font-size: 1.25rem;
    }

    .park-selector {
        top: 4rem;
    }

    .filter-header {
        top: 4rem;
    }

    .park-filter {
        top: 5.5rem;
    }

    .filter-sections .controls {
        top: 18rem;
        flex-direction: row;
        gap: 1rem;
    }

    .filter-section,
    .sort-section {
        flex: 1;
    }

    .parks-container {
        padding: 0 2rem;
    }

    .rides-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .park-title {
        font-size: 1.5rem;
    }
}

/* Desktop screens */
@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }

    .rides-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* History Panel */
.settings-panel,
.history-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 90%;
    max-width: 400px;
    height: 100vh;
    background: var(--background-solid);
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.3);
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 1rem;
}

.settings-panel:not(.hidden),
.history-panel:not(.hidden) {
    transform: translateX(0);
}

.settings-header,
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.settings-header h3,
.history-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: all 0.2s;
}

.close-btn:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.history-list {
    margin-bottom: 2rem;
}

.history-item {
    padding: 1rem;
    background: var(--card-background);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
}

.history-item-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.history-item-ride {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.history-item-details {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-section {
    padding: 1rem;
    background: var(--card-background);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.settings-section h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.setting-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 700;
}

.setting-item label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-item select {
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 0.375rem;
    background: var(--card-background-solid);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.test-notification-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.test-notification-btn:active {
    transform: scale(0.98);
}

/* Forecast Popup */
.forecast-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.forecast-popup {
    background: var(--background-solid);
    border-radius: 1rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

.forecast-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    gap: 1rem;
}

.forecast-popup-title {
    flex: 1;
}

.forecast-popup-title h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.forecast-popup-title .park-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.forecast-close-btn {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: all 0.2s;
}

.forecast-close-btn:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.forecast-current {
    padding: 1rem 1.5rem;
    background: var(--gradient-secondary);
    color: white;
    text-align: center;
}

.forecast-current-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.forecast-current-value {
    font-size: 2rem;
    font-weight: 700;
}

.forecast-current-value .unit {
    font-size: 1rem;
    opacity: 0.9;
    margin-left: 0.25rem;
}

.forecast-graph {
    padding: 1.5rem;
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    overflow-x: auto;
    min-height: 200px;
}

.forecast-bar {
    flex: 1;
    min-width: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.forecast-bar-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    order: 1;
}

.forecast-bar-fill {
    width: 100%;
    background: var(--gradient-accent);
    border-radius: 0.25rem 0.25rem 0 0;
    min-height: 4px;
    transition: all 0.3s ease;
    order: 2;
}

.forecast-bar-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    order: 3;
    margin-top: 0.25rem;
}

.forecast-bar:hover .forecast-bar-fill {
    opacity: 0.8;
}

.forecast-bar.past .forecast-bar-fill {
    background: var(--text-secondary);
    opacity: 0.3;
}

.forecast-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-color);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    display: inline-block;
    width: fit-content;
    cursor: pointer;
    transition: all 0.2s ease;
}

.forecast-badge:hover {
    background: rgba(16, 185, 129, 0.2);
    transform: scale(1.05);
}

.forecast-badge:active {
    transform: scale(0.95);
}

/* Map Panel */
.map-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--background-solid);
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.map-panel:not(.hidden) {
    transform: translateY(0);
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.map-header h3 {
    font-size: 1.25rem;
    margin: 0;
}

.map-container {
    flex: 1;
    width: 100%;
    height: 100%;
}

#map-container {
    position: relative;
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    background: #ffffff !important;
    color: #1e1b4b !important;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
}

.leaflet-popup-content {
    margin: 0.75rem;
    font-family: inherit;
    color: #1e1b4b !important;
}

.leaflet-popup-tip {
    background: #ffffff !important;
}

.map-popup-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e1b4b !important;
    margin-bottom: 0.5rem;
}

.map-popup-wait {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.map-popup-wait.short {
    color: #10b981 !important;
}

.map-popup-wait.moderate {
    color: #f59e0b !important;
}

.map-popup-wait.long {
    color: #ef4444 !important;
}

.map-popup-status {
    font-size: 0.875rem;
    color: #64748b !important;
    margin-top: 0.25rem;
}

.map-popup-distance {
    font-size: 0.875rem;
    color: #3b82f6 !important;
    font-weight: 600;
    margin-top: 0.25rem;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    display: inline-block;
    margin-bottom: 0.25rem;
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
    .ride-card {
        padding: 1.25rem;
    }

    .park-btn {
        padding: 1rem;
    }
}
