
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }
        body {
            background: #f5f7fa;
            padding: 40px 20px;
            display: flex;
            justify-content: center;
            min-height: 100vh;
        }
        .container {
            max-width: 1280px;
            width: 100%;
            background: white;
            border-radius: 24px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.05), 0 6px 12px rgba(0,0,0,0.1);
            padding: 32px 36px;
        }

        h1 {
            font-size: 2.2rem;
            font-weight: 700;
            letter-spacing: -1px;
            margin: 0 0 8px 0;
            display: flex;
            align-items: center;
            gap: 12px;
            color: #0a0c10;
            border-bottom: 4px solid #e11b22;
            padding-bottom: 20px;
        }
        h1 span {
            background: #e11b22;
            color: white;
            font-size: 1rem;
            padding: 4px 14px;
            border-radius: 40px;
            font-weight: 600;
            letter-spacing: 0.5px;
        }

        .controls {
            display: flex;
            align-items: center;
            gap: 16px;
            margin: 24px 0 28px 0;
            flex-wrap: wrap;
        }
        label {
            font-weight: 600;
            color: #2d3a4b;
            font-size: 0.95rem;
            text-transform: uppercase;
            letter-spacing: 0.8px;
        }
        select {
            background: white;
            border: 1.5px solid #d0d8e2;
            border-radius: 100px;
            padding: 12px 28px;
            font-size: 1rem;
            font-weight: 500;
            color: #0f1a2a;
            appearance: none;
            background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%232d3a4b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>');
            background-repeat: no-repeat;
            background-position: right 20px center;
            background-size: 18px;
            min-width: 150px;
            cursor: pointer;
            transition: 0.2s;
            box-shadow: 0 2px 6px rgba(0,0,0,0.02);
        }
        select#week-week-select {
            min-width: 280px;
        }

        select:hover {
            border-color: #9aa6b5;
            background-color: #fafcff;
        }
        select:focus {
            outline: none;
            border-color: #e11b22;
            box-shadow: 0 0 0 4px rgba(225,27,34,0.08);
        }

        #loading {
            display: flex;
            align-items: center;
            justify-content: center;
            background: #f1f4f9;
            border-radius: 60px;
            padding: 14px 24px;
            margin-bottom: 28px;
            font-weight: 500;
            color: #2e4a6a;
            gap: 12px;
            font-size: 1rem;
            border-left: 6px solid #e11b22;
        }
        .loader-spinner {
            width: 20px;
            height: 20px;
            border: 3px solid rgba(225,27,34,0.2);
            border-top: 3px solid #e11b22;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

        .chart-wrapper {
            overflow-x: auto;
            border-radius: 18px;
            border: 1px solid #eaeef3;
            background: white;
            box-shadow: 0 4px 14px rgba(0,0,0,0.02);
        }

        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.95rem;
            min-width: 800px;
        }

        th {
            background: #10181f;
            color: white;
            font-weight: 600;
            padding: 18px 12px;
            font-size: 0.85rem;
            letter-spacing: 0.6px;
            text-transform: uppercase;
            text-align: left;
            border-right: 1px solid #25313c;
        }
        th:last-child { border-right: none; }

        td {
            padding: 16px 12px;
            border-bottom: 1px solid #e6ebf1;
            background: white;
            vertical-align: middle;
        }
        tr:last-child td { border-bottom: none; }

        .rank {
            font-weight: 800;
            font-size: 1.2rem;
            color: #0f1a2a;
            width: 70px;
        }
        .song-info {
            font-weight: 700;
            color: #0c1b2b;
            top: -7px;
            position: relative;
        }
        .song-yt-icon {
            height: 1.5em;
        }
        .artist {
            color: #4f6579;
            font-weight: 400;
            font-size: 0.9rem;
        }
        .last-week, .peak, .weeks {
            color: #1e2e3f;
            font-weight: 500;
        }
        .last-week {
            font-weight: 600;
        }
        .trend-up { color: #1ba14b; font-weight: 700; }
        .trend-down { color: #e11b22; font-weight: 700; }
        .trend-same { color: #6c7e8e; font-weight: 700; }
        .trend-re { color: darkgoldenrod; font-weight: 700; }

        .footnote {
            margin-top: 30px;
            color: #5d7181;
            font-size: 0.8rem;
            border-top: 1px dashed #cdd7e0;
            padding-top: 20px;
            text-align: right;
            font-style: italic;
        }
        .footnote strong {
            color: #0f1a2a;
        }

        .no-data {
            padding: 48px;
            text-align: center;
            color: #65778b;
            font-weight: 500;
            background: #fafcfe;
        }




 /* ----- Button base styles (shared by all variants) ----- */
        .btn {
            display: inline-block;
            font-family: inherit;
            font-size: 1rem;
            font-weight: 500;
            padding: 12px 28px;
            border-radius: 100px;          /* matches select */
            cursor: pointer;
            transition: all 0.2s;
            text-align: center;
            text-decoration: none;
            border: 1.5px solid transparent;
            background: transparent;
            color: #0f1a2a;
            line-height: 1.2;               /* similar to select */
            box-shadow: 0 2px 6px rgba(0,0,0,0.02);
        }

        /* ----- Primary button (red, using the focus ring colour) ----- */
        .btn-primary {
            background: #e11b22;
            border-color: #e11b22;
            color: white;
        }
        .btn-primary:hover {
            background: #b01017;              /* darker red */
            border-color: #b01017;
        }
        .btn-primary:focus {
            outline: none;
            box-shadow: 0 0 0 4px rgba(225,27,34,0.25); /* softer ring on red */
        }
        .btn-primary:active {
            background: #8c0c12;
            border-color: #8c0c12;
            transform: translateY(1px);        /* subtle press effect */
        }

        /* ----- Secondary button (matches the select's appearance) ----- */
        .btn-secondary {
            background: white;
            border-color: #d0d8e2;
            color: #0f1a2a;
        }
        .btn-secondary:hover {
            background: #fafcff;
            border-color: #9aa6b5;
        }
        .btn-secondary:focus {
            outline: none;
            border-color: #e11b22;
            box-shadow: 0 0 0 4px rgba(225,27,34,0.08); /* same as select */
        }
        .btn-secondary:active {
            background: #eef2f6;
        }

        /* ----- Disabled state (optional) ----- */
        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            pointer-events: none;
        }
