        /* Mobile-first resets and full-screen layout */
        html, body {
            height: 100%;
            margin: 0;
            padding: 0;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            display: flex;
            flex-direction: column;
        }

        /* Ad Banner Placeholder space */
        #ad-space {
            width: 100%;
            min-height: 50px;
            background-color: #f8f9fa;
            text-align: center;
            line-height: 50px;
            color: #adb5bd;
            font-size: 14px;
            margin-bottom: 15px;
        }

        /* The Control Panel */
        .controls-container {
            background: white;
            padding: 15px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            z-index: 10;
        }

        .control-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 15px;
        }

        .control-group {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 1; 
        }

        .control-group label {
            font-weight: bold;
            font-size: 14px;
            white-space: nowrap; 
        }

        .control-group select {
            flex: 1;
            min-width: 0;
            padding: 12px;
            font-size: 16px;
            border: 1px solid #ccc;
            border-radius: 8px;
        }

        .control-group input {
            width: 60px; 
            flex-shrink: 0; 
            padding: 12px;
            font-size: 16px;
            text-align: center; 
            border: 1px solid #ccc;
            border-radius: 8px;
        }

        .control-group span {
            white-space: nowrap;
        }

        /* The Map Canvas */
        #map {
            flex-grow: 1; 
            width: 100%;
        }

        #recenter-btn {
            position: absolute;
            bottom: 30px;
            right: 20px;
            z-index: 100;
            background: white;
            border: none;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.3);
            font-size: 24px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* The Dashboard Grid Layout */
        .dashboard {
            display: grid;
            gap: 12px;
            margin-top: 15px;
            width: 100%;
        }

        /* Mode 1: Start Screen (1 big column) */
        .dashboard.single-col {
            grid-template-columns: 1fr; 
        }

        /* Mode 2: Route Generated (2x2 grid) */
        .dashboard.two-col {
            grid-template-columns: 1fr 1fr; 
        }

        /* Modern Button Styles */
        .modern-btn {
            padding: 16px;
            border: none;
            border-radius: 16px; 
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: transform 0.1s ease, box-shadow 0.2s ease;
        }

        .modern-btn:active {
            transform: scale(0.96); 
        }

        .primary-btn {
            background-color: #1A1A1A; 
            color: #FFFFFF;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
        }

        .secondary-btn {
            background-color: #F2F4F7;
            color: #1A1A1A;
        }

        .spotify-btn {
            background-color: #F2F4F7; 
            color: #1A1A1A;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
        }
        
        .spotify-icon {
            color: #1DB954; 
            font-size: 18px;
        }

        /* The Ultra-Compact Horizontal Stats Card */
        .stats-card {
            background-color: #ffffff;
            border: 1px solid #E5E7EB;
            color: #1A1A1A;
            cursor: default; 
            flex-direction: row; /* Flips the layout to side-by-side */
            justify-content: space-evenly;
            align-items: center;
            padding: 10px 4px; /* Dramatically reduces vertical height */
        }

        .stats-card:active {
            transform: none; 
        }

        /* The individual side-by-side stat columns */
        .micro-stat {
            display: flex;
            flex-direction: column;
            align-items: center;
            line-height: 1.1;
        }

        .micro-val {
            font-size: 16px;
            font-weight: 800;
        }

        .micro-unit {
            font-size: 11px;
            font-weight: 700;
            color: #888888;
            text-transform: uppercase;
        }

        /* Modal Background */
        .modal {
            display: none; 
            position: fixed; 
            z-index: 1000; 
            left: 0;
            top: 0;
            width: 100%; 
            height: 100%; 
            background-color: rgba(0,0,0,0.6); 
        }

        /* Modal Box */
        .modal-content {
            background-color: #fff;
            margin: 20% auto; 
            padding: 20px;
            border-radius: 8px;
            width: 80%;
            max-width: 400px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            position: relative;
        }

        .close-btn {
            color: #aaa;
            float: right;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
        }

        .close-btn:hover {
            color: black;
        }
        
        /* The Opaque Glass Modal */
        .glass-modal-content {
            background: rgba(25, 20, 20, 0.95); /* Dark Spotify-esque background */
            backdrop-filter: blur(10px); /* Blurs whatever map is behind it */
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: white;
        }
        
        /* The Word Cloud Container */
        .word-cloud-container {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            justify-content: center;
            align-items: center; /* Keeps bubbles vertically centered */
            margin: 25px 0;
        }
        
        /* The Bubble Buttons */
        .cloud-btn {
            /* Nuke default browser button styling */
            appearance: none;
            -webkit-appearance: none;
            outline: none;
            border: none;
            
            /* The Spotify Bubble Look */
            background: linear-gradient(145deg, #1DB954, #1aa34a);
            color: white;
            border-radius: 50px; /* This is the magic line that creates the pill shape */
            padding: 12px 24px;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            
            /* The Float Effect */
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
            transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
        }
        
        /* The Hover / Tap Effect */
        .cloud-btn:hover, .cloud-btn:active {
            transform: translateY(-3px) scale(1.05); /* Lifts up and grows slightly */
            box-shadow: 0 6px 15px rgba(29, 185, 84, 0.4);
            background: linear-gradient(145deg, #1ed760, #1DB954);
        }
        
        /* The "Frequent" Bubble (For their top genres) */
        .cloud-btn.frequent {
            font-size: 18px;
            padding: 16px 30px;
            background: linear-gradient(145deg, #ffffff, #f0f0f0);
            color: #1DB954; /* Invert the colors so their favorites pop */
            box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
        }
        
        /* The Back Button (Subtle, hollow pill) */
        .cloud-btn.back-btn {
            background: transparent;
            border: 2px solid rgba(255, 255, 255, 0.3);
            color: rgba(255, 255, 255, 0.8);
            box-shadow: none;
            width: 100%; /* Forces it to span the bottom */
            margin-top: 15px;
        }
        
        .cloud-btn.back-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.6);
            color: white;
        }
        
        
        
        
