/* -------------------------------------------------------------
 * Disney Fireworks Viewing Spots Guide - Premium Styling System
 * ------------------------------------------------------------- */

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

:root {
    /* Color Palette */
    --bg-primary: #06040a;
    --bg-secondary: #0d091a;
    --bg-tertiary: #140f29;
    
    --text-main: #f1eefb;
    --text-muted: #a39cb5;
    
    /* Category Colors */
    --accent-garden: #ff4b72;
    --accent-garden-glow: rgba(255, 75, 114, 0.4);
    --accent-lake: #00a8ff;
    --accent-lake-glow: rgba(0, 168, 255, 0.4);
    --accent-terrace: #ffb300;
    --accent-terrace-glow: rgba(255, 179, 0, 0.4);
    
    /* Status Colors */
    --success: #2ecc71;
    --warning: #f1c40f;
    --danger: #e74c3c;
    
    /* Glassmorphism System */
    --glass-bg: rgba(20, 15, 38, 0.65);
    --glass-bg-hover: rgba(30, 24, 56, 0.8);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-active: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    
    /* Dimensions */
    --sidebar-width: 380px;
    --header-height: 70px;
    --transition-speed: 0.3s;
}

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

body {
    background-color: var(--bg-primary);
    background-image: radial-gradient(circle at 50% 0%, var(--bg-tertiary) 0%, var(--bg-primary) 70%);
    color: var(--text-main);
    font-family: 'Outfit', 'Noto Sans SC', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: background var(--transition-speed);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Header Section */
header {
    height: var(--header-height);
    background: rgba(13, 9, 26, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 1.8rem;
    animation: rotateSparkle 8s linear infinite;
}

.header-logo h1 {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #a39cb5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.meta-badge {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Main Dashboard Structure */
.dashboard-container {
    display: flex;
    margin-top: var(--header-height);
    height: calc(100vh - var(--header-height));
    position: relative;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(13, 9, 26, 0.5);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 90;
    transition: transform var(--transition-speed) ease;
}

/* Search and Filters */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px 15px 12px 40px;
    color: var(--text-main);
    font-size: 0.9rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 3px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-align: center;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    background: var(--glass-bg);
    color: var(--text-main);
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
}

/* Spot List */
.spot-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.spot-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.spot-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    transition: background var(--transition-speed);
}

.spot-item.garden::before { background: var(--accent-garden); }
.spot-item.lake::before { background: var(--accent-lake); }
.spot-item.terrace::before { background: var(--accent-terrace); }

.spot-item:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-2px);
    border-color: var(--glass-border-active);
}

.spot-item.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: var(--glass-shadow);
}

/* Spot Item Badge (Numbers) */
.spot-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.spot-item.garden .spot-badge {
    background: linear-gradient(135deg, var(--accent-garden) 0%, #ff758c 100%);
    box-shadow: 0 0 10px var(--accent-garden-glow);
}
.spot-item.lake .spot-badge {
    background: linear-gradient(135deg, var(--accent-lake) 0%, #00c6ff 100%);
    box-shadow: 0 0 10px var(--accent-lake-glow);
}
.spot-item.terrace .spot-badge {
    background: linear-gradient(135deg, var(--accent-terrace) 0%, #ffcb00 100%);
    box-shadow: 0 0 10px var(--accent-terrace-glow);
}

.spot-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spot-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    transition: color var(--transition-speed);
}

.spot-item:hover .spot-title {
    color: #fff;
}

.spot-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.spot-score {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--warning);
    font-weight: 600;
}

.spot-heat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.heat-icon {
    font-size: 0.85rem;
    color: #ff5e3a;
}

/* Map Canvas Container */
.map-container {
    flex-grow: 1;
    background-color: #020104;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Float Controls for Map */
.map-controls {
    position: absolute;
    bottom: 25px;
    left: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.control-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all var(--transition-speed);
    box-shadow: var(--glass-shadow);
}

.control-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-active);
    transform: translateY(-2px);
}

.control-btn:active {
    transform: translateY(0);
}

.legend-card {
    position: absolute;
    top: 25px;
    right: 25px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 12px 18px;
    z-index: 100;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.legend-color.garden { background: var(--accent-garden); box-shadow: 0 0 6px var(--accent-garden-glow); }
.legend-color.lake { background: var(--accent-lake); box-shadow: 0 0 6px var(--accent-lake-glow); }
.legend-color.terrace { background: var(--accent-terrace); box-shadow: 0 0 6px var(--accent-terrace-glow); }

/* Interactive Map Canvas Wrapper */
.map-wrapper {
    position: relative;
    user-select: none;
    cursor: grab;
    transition: transform 0.05s ease-out;
    transform-origin: center center;
}

.map-wrapper:active {
    cursor: grabbing;
}

.map-image {
    display: block;
    max-width: none;
    height: auto;
    pointer-events: none;
    border-radius: 4px;
}

/* SVG Path Overlay */
.map-svg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.map-svg g {
    pointer-events: auto;
    cursor: pointer;
    opacity: 0.05;
    transition: opacity var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.map-svg g:hover, .map-svg g.active {
    opacity: 0.75;
}

/* SVG color injections */
.map-svg g.garden .cls-2 { fill: var(--accent-garden) !important; }
.map-svg g.garden .cls-3 { fill: var(--accent-garden) !important; }
.map-svg g.lake .cls-2 { fill: var(--accent-lake) !important; }
.map-svg g.lake .cls-3 { fill: var(--accent-lake) !important; }
.map-svg g.terrace .cls-2 { fill: var(--accent-terrace) !important; }
.map-svg g.terrace .cls-3 { fill: var(--accent-terrace) !important; }

/* Interactive Glowing Map Pins */
.map-pin {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 10;
    transition: all var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.map-pin.garden {
    background: var(--accent-garden);
    box-shadow: 0 0 10px var(--accent-garden-glow);
}
.map-pin.lake {
    background: var(--accent-lake);
    box-shadow: 0 0 10px var(--accent-lake-glow);
}
.map-pin.terrace {
    background: var(--accent-terrace);
    box-shadow: 0 0 10px var(--accent-terrace-glow);
}

.map-pin:hover {
    transform: translate(-50%, -50%) scale(1.3);
    z-index: 50;
}

.map-pin.active {
    transform: translate(-50%, -50%) scale(1.3);
    z-index: 40;
    border-color: #fff;
    box-shadow: 0 0 20px 4px currentColor;
    animation: activePulse 2s infinite;
}

.map-pin.garden.active { color: var(--accent-garden); }
.map-pin.lake.active { color: var(--accent-lake); }
.map-pin.terrace.active { color: var(--accent-terrace); }

@keyframes activePulse {
    0% { box-shadow: 0 0 0 0 currentColor; }
    70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* Detail Drawer Layout */
.detail-drawer {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: 440px;
    height: calc(100vh - var(--header-height));
    background: rgba(13, 9, 26, 0.85);
    backdrop-filter: blur(25px);
    border-left: 1px solid var(--glass-border);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.detail-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    padding: 25px;
    border-bottom: 1px solid var(--glass-border);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    transform: scale(1.1);
}

.drawer-tag-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.area-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 12px;
    letter-spacing: 0.5px;
}
.area-tag.garden { background: rgba(255, 75, 114, 0.15); color: var(--accent-garden); border: 1px solid rgba(255, 75, 114, 0.3); }
.area-tag.lake { background: rgba(0, 168, 255, 0.15); color: var(--accent-lake); border: 1px solid rgba(0, 168, 255, 0.3); }
.area-tag.terrace { background: rgba(255, 179, 0, 0.15); color: var(--accent-terrace); border: 1px solid rgba(255, 179, 0, 0.3); }

.drawer-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    padding-right: 40px;
}

.drawer-score-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.drawer-rating-stars {
    display: flex;
    color: var(--warning);
    font-size: 1rem;
}

.drawer-score-num {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

/* Drawer Content Scrollable Area */
.drawer-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Spot Image Card */
.spot-img-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    height: 180px;
    box-shadow: var(--glass-shadow);
}

.spot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.spot-img-card:hover .spot-img {
    transform: scale(1.05);
}

.spot-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 9, 26, 0.8) 0%, transparent 60%);
    pointer-events: none;
}

/* Warning Tip Container */
.warning-tip-card {
    background: rgba(241, 196, 15, 0.08);
    border: 1px solid rgba(241, 196, 15, 0.25);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.warning-icon {
    font-size: 1.2rem;
    color: var(--warning);
    flex-shrink: 0;
    margin-top: 2px;
}

.warning-text-container h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--warning);
    margin-bottom: 4px;
}

.warning-text-container p {
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.5;
}

/* Metric Progress Bars */
.metrics-section {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    padding-left: 8px;
}

.metric-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 500;
}

.metric-label {
    color: var(--text-muted);
}

.metric-value {
    color: var(--text-main);
    font-weight: 600;
}

.progress-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.progress-bar {
    height: 100%;
    border-radius: 4px;
    width: 0; /* Dynamic width set by JS */
    transition: width 0.8s cubic-bezier(0.1, 0.8, 0.25, 1);
}

.garden .progress-bar {
    background: linear-gradient(to right, #ff758c, var(--accent-garden));
    box-shadow: 0 0 8px var(--accent-garden-glow);
}
.lake .progress-bar {
    background: linear-gradient(to right, #00c6ff, var(--accent-lake));
    box-shadow: 0 0 8px var(--accent-lake-glow);
}
.terrace .progress-bar {
    background: linear-gradient(to right, #ffcb00, var(--accent-terrace));
    box-shadow: 0 0 8px var(--accent-terrace-glow);
}

/* Heat Metrics */
.heat-metric-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.heat-info-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.heat-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.heat-desc-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.heat-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.heat-status-dot.low { background: var(--success); box-shadow: 0 0 8px rgba(46, 204, 113, 0.5); }
.heat-status-dot.mid { background: var(--warning); box-shadow: 0 0 8px rgba(241, 196, 15, 0.5); }
.heat-status-dot.high { background: var(--danger); box-shadow: 0 0 8px rgba(231, 76, 60, 0.5); }

/* Rotate animation for logo icon */
@keyframes rotateSparkle {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Responsive Styles */
@media (max-width: 900px) {
    .dashboard-container {
        flex-direction: column-reverse;
        height: auto;
    }
    
    .sidebar {
        width: 100%;
        height: 60vh;
        border-right: none;
        border-top: 1px solid var(--glass-border);
    }
    
    .map-container {
        height: 50vh;
        width: 100%;
    }
    
    .detail-drawer {
        width: 100%;
        height: 80vh;
        top: auto;
        bottom: 0;
        transform: translateY(100%);
        border-left: none;
        border-top: 1px solid var(--glass-border);
        border-radius: 20px 20px 0 0;
    }
    
    .detail-drawer.open {
        transform: translateY(0);
    }
    
    .map-controls {
        bottom: 15px;
        left: 15px;
    }
    
    .legend-card {
        top: 15px;
        right: 15px;
        padding: 8px 12px;
    }
}
