/* --- filename: style.css --- */

/* --- La Sonora Volcánica Website Styles --- */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* --- 1. Global Styles & Variables --- */
/* These variables define the core design system for the site. */
:root {
    --bg-volcanic-night: #1a1a1a;
    --text-salt-crystal: #F0F0F0;
    --accent-lava-glow: #FF4D4D;
    --accent-lava-glow-dark: #e63939;
    /* Darker shade for hover states */
    --accent-canary-teal: #00C2A8;
    --accent-selection-gold: #FFD700;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --player-height: 80px;
    /* Controls the height of the mini-player */
    --header-height: 80px;
    /* Fixed header height for layout calculations */
    --animation-state: running;
    /* For reduced motion support */
    --scrollbar-width: 0px;
    /* For scroll lock calculation */
}

/* A modern CSS reset and default box-sizing behavior */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Enable smooth scrolling for anchor links (e.g., #music) */
html {
    scroll-behavior: smooth;
}

/* Initial calculation of scrollbar width */
html.scroll-lock-init {
    --scrollbar-width: calc(100vw - 100%);
}

/* Scroll lock for when overlays are open */
html.scroll-lock {
    overflow: hidden;
    /* Maintain scrollbar width to prevent layout shift */
    margin-right: var(--scrollbar-width, 0);
}

/* Default body styles - FIXED: Added overflow-x hidden to prevent side gaps */
body,
html {
    width: 100%;
    overflow-x: hidden;
    background-color: var(--bg-volcanic-night);
    font-family: var(--font-body);
    color: var(--text-salt-crystal);
    line-height: 1.6;
}

body {
    padding-bottom: 0;
    /* No padding by default */
    transition: padding-bottom 0.4s ease;
    /* Animate the padding change when player appears */
    position: relative;
}

/* This class is added by JS to the body when the mini-player is active,
   preventing the player from overlapping footer content. */
body.player-active {
    padding-bottom: var(--player-height);
}

/* Map Active State - Lock global scroll */
body.map-active {
    overflow: hidden;
    height: 100vh;
    touch-action: none;
    /* Prevent bounce effects */
}

/* Hide footer and make it unfocusable when map is active */
body.map-active .main-footer {
    display: none;
}

/* Comprehensive focus styles for accessibility */
*:focus-visible {
    outline: 3px solid var(--accent-canary-teal);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--accent-canary-teal);
    outline-offset: 2px;
}

.scrubber-input:focus-visible {
    outline: 2px solid var(--accent-lava-glow);
}

/* Ensure focus is visible even with custom styles */
.cta-button:focus-visible {
    outline: 3px solid var(--accent-canary-teal);
    box-shadow: 0 0 0 5px rgba(0, 194, 168, 0.2);
}

/* Reduced motion support for users with motion sensitivity */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero-section::before {
        animation: none;
    }
}

a {
    color: var(--text-salt-crystal);
    text-decoration: none;
}

ul {
    list-style: none;
}

/* Utility class to hide elements visually and from screen readers */
.hidden {
    display: none !important;
}

/* Icon Container for centralized SVGs */
.icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

/* Standard Icon Size */
.icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
    /* Ensure strokes scale properly if used */
    stroke-width: 0;
}

/* Stroke-based icons override */
.icon[stroke] {
    fill: none;
    stroke-width: 2;
}

/* Small Icons (e.g., in pills, meta info) */
.icon.small {
    width: 16px;
    height: 16px;
}

/* Large Icons (e.g., close buttons) */
.icon.large {
    width: 32px;
    height: 32px;
}

/* Class to hide surf map navigation based on configuration */
.surf-map-disabled {
    display: none !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.surf-map-disabled[aria-hidden="true"] {
    display: none !important;
}

/* Skip to main content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent-lava-glow);
    color: var(--text-salt-crystal);
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1003;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* Player error message styling */
.player-error-message {
    position: absolute;
    top: -30px;
    left: 0;
    right: 0;
    background: var(--accent-lava-glow);
    color: white;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.8rem;
    border-radius: 4px 4px 0 0;
}

/* --- 17. Skeleton Loading States --- */
.skeleton {
    background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    background-color: #222;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.skeleton-image {
    width: 100%;
    height: 300px;
}

.skeleton-text {
    height: 1.2em;
    margin: 1rem;
    border-radius: 4px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1rem;
}

/* Loading state for player */
.mini-player.loading .player-title::after {
    content: ' (Loading...)';
    opacity: 0.7;
    font-size: 0.8em;
}

/* --- 2. Main Header --- */
/* The header is fixed to the top and has a modern frosted-glass effect. */
.main-header {
    background-color: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* For Safari compatibility */
    padding: 1rem 1.5rem;
    position: fixed;
    top: 0;
    z-index: 1000;
    width: 100%;
    transition: background-color 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    /* Critical for absolute positioning of hamburger */
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
}

/* --- 3. Hamburger Menu (Mobile First) --- */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1002;
    /* Must be above the nav overlay */
    position: absolute;
    /* Matches Surf Map Implementation */
    top: 50%;
    /* Center vertically */
    right: 0;
    /* Align to the edge of the padded container */
    transform: translateY(-50%);
    /* Fine-tune vertical centering */
}

.hamburger-menu .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-salt-crystal);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Animation for hamburger transforming into an 'X' */
.nav-open .hamburger-menu .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-open .hamburger-menu .bar:nth-child(2) {
    opacity: 0;
}

.nav-open .hamburger-menu .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- 4. Main Navigation (Mobile First) --- */
/* The navigation is a full-screen overlay on mobile for a focused experience. */
.main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(26, 26, 26, 0.95);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

/* The .nav-open class (toggled by JS on the body) slides the menu in. */
.nav-open .main-nav {
    transform: translateX(0);
}

.nav-links {
    text-align: center;
}

.nav-links li {
    margin: 2rem 0;
}

.nav-links a {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--accent-lava-glow);
}

/* --- 5. Language Switcher --- */
.language-switcher {
    margin-top: 3rem;
    display: flex;
    gap: 1rem;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-salt-crystal);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.2s ease, border-bottom 0.2s ease;
    border-bottom: 2px solid transparent;
}

.lang-btn.active {
    opacity: 1;
    border-bottom-color: var(--accent-lava-glow);
}

/* --- 6. Hero Section: The Transparent Monolith --- */
.hero-section {
    height: 100dvh;
    min-height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--header-height) 1.5rem 3rem 1.5rem;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Background: Minimal interference, deep breathing */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/hero-background.jpg') no-repeat center center/cover;
    background-color: var(--bg-volcanic-night);
    z-index: 0;
    animation: zoom-in 30s ease-in-out infinite alternate;
    will-change: transform;
}

/* Vignette: Subtle focus without hiding the art */
.hero-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center,
            transparent 20%,
            rgba(0, 0, 0, 0.3) 70%,
            rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
    pointer-events: none;
}

@keyframes zoom-in {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.3);
    }
}

/* Container: The Stack */
.hero-container {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100%;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    gap: 0.5rem;
    animation: fade-in-up 1s ease-out;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 1. Identity: The Logo with Counter-Breathe */
.hero-logo-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.hero-logo {
    max-width: 280px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    will-change: transform;
    animation: breathe-logo 30s ease-in-out infinite alternate;
}

@keyframes breathe-logo {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0.95);
    }
}

/* 2. Tagline: The Volcanic Voice - Lava Hot */
.hero-tagline {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    line-height: 1.1;
    margin-bottom: 0.5rem;
    /* Tighten gap to pill */
    color: #fff;
    white-space: pre-wrap;
    /* Ensure newline renders */
    /* Intense Lava Incandescence */
    text-shadow:
        0 4px 8px #000,
        /* Hard core shadow */
        0 0 20px #8b0000,
        /* Dark Red Magma */
        0 0 40px #500000,
        /* Cooling Crust */
        0 0 80px #2a0000;
    /* Deep Heat */
    letter-spacing: -0.5px;
}

/* 3. The Highlight: Calendar Drop */
.hero-notification-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    /* Dark Translucent Pill (Tropical Noir) */
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    /* Multiple animations: Entrance + Pulse + Shimmer (via pseudo) */
    animation:
        slide-down 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards,
        border-pulse 4s ease-in-out infinite;
}

@keyframes border-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 rgba(0, 194, 168, 0), inset 0 0 0 rgba(0, 194, 168, 0);
        border-color: rgba(255, 255, 255, 0.3);
    }

    50% {
        box-shadow: 0 0 25px rgba(0, 194, 168, 0.6), inset 0 0 15px rgba(0, 194, 168, 0.3);
        border-color: rgba(0, 194, 168, 0.8);
    }
}

.hero-notification-pill::before {
    /* Shimmer Effect - Fast & Sharp */
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transform: skewX(-25deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {

    0%,
    85% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-notification-pill:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-canary-teal);
    transform: scale(1.02);
}

.pill-text {
    color: var(--text-salt-crystal);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* 4. Action: The Driver */
.hero-actions {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 1rem;
}

.cta-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 300px;
    padding: 1.1rem 2rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: none;
    text-decoration: none;
    white-space: nowrap;
    /* Ensure single line */
}

.primary-btn,
.discography-btn {
    background: var(--accent-lava-glow);
    color: white;
    box-shadow: 0 4px 20px rgba(255, 77, 77, 0.5);
    position: relative;
    overflow: hidden;
    animation: heartbeat 2s infinite;
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    5% {
        transform: scale(1.03);
    }

    10% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.03);
    }

    20% {
        transform: scale(1);
    }

    100% {
        transform: scale(1);
    }
}

.primary-btn:hover,
.discography-btn:hover {
    background: var(--accent-lava-glow-dark);
    animation: none;
    /* Stop heartbeat on hover */
    transform: scale(1.05);
}

/* 5. Trust: The Network */
.hero-socials {
    display: flex;
    gap: 2rem;
    justify-content: center;
    width: 100%;
    margin-top: 1rem;
}

.hero-socials .social-icon {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.hero-socials .icon {
    width: 28px;
    height: 28px;
}

.hero-socials .social-icon:hover {
    color: #fff;
    transform: translateY(-3px) scale(1.1);
}

/* Brand Colors on Hover */
.hero-socials .social-icon[aria-label="Spotify"]:hover {
    color: #1DB954;
    filter: drop-shadow(0 0 10px #1DB954);
}

.hero-socials .social-icon[aria-label="YouTube"]:hover {
    color: #FF0000;
    filter: drop-shadow(0 0 10px #FF0000);
}

.hero-socials .social-icon[aria-label="Apple Music"]:hover {
    color: #FA243C;
    filter: drop-shadow(0 0 10px #FA243C);
}

.hero-socials .social-icon[aria-label="Contact"]:hover {
    color: var(--accent-canary-teal);
    filter: drop-shadow(0 0 10px var(--accent-canary-teal));
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 5;
    opacity: 0.8;
    animation: bounce 2s infinite;
    text-decoration: none;
    /* For <a> tag */
}

.scroll-text {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.scroll-chevron {
    width: 12px;
    height: 12px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-6px);
    }

    60% {
        transform: translateX(-50%) translateY(-3px);
    }
}

/* --- iPhone SE / Small Screen Optimization --- */
@media (max-height: 700px) {
    .hero-section {
        min-height: 500px;
        /* Allow shrinking for short screens */
        padding-bottom: 6rem;
        /* Increased space for scroll indicator */
        padding-top: 4.5rem;
        /* Allow content to go higher */
    }

    .hero-container {
        gap: 0;
        justify-content: space-between;
        padding: 0.25rem 0;
        /* Minimal vertical padding */
    }

    /* Prevent squashing of key elements */
    .hero-logo-wrapper,
    .hero-tagline,
    .hero-notification-pill,
    .hero-actions,
    .hero-socials {
        flex-shrink: 0;
    }

    .hero-logo {
        max-width: 130px;
        max-height: 15vh;
        /* Reduced to give more space */
        width: auto;
    }

    .hero-tagline {
        font-size: 1.7rem;
        margin-bottom: 0;
        line-height: 1.1;
    }

    .cta-button {
        padding: 0.85rem 1.4rem;
        font-size: 0.9rem;
    }

    .hero-notification-pill {
        padding: 5px 14px;
        margin-bottom: 0;
    }

    .hero-socials {
        margin-top: 0;
    }
}

/* --- Desktop Adaptation --- */
@media (min-width: 768px) {
    .hero-container {
        max-width: 800px;
        gap: 2.5rem;
    }

    .hero-tagline {
        font-size: 4rem;
        margin-bottom: 1rem;
    }

    .hero-logo {
        max-width: 350px;
    }

    .cta-button {
        font-size: 1.1rem;
        padding: 1.2rem 3rem;
    }
}

/* --- 7. General Page Section Styles --- */
.page-section {
    padding: 5rem 1.5rem;
    text-align: center;
    width: 100%;
    /* Ensure sections respect container */
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent-lava-glow);
    margin: 0.5rem auto 0;
}

.alt-bg {
    background-color: #111;
    /* Provides visual separation between sections */
}

/* --- 8. Music Section --- */
.music-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 4rem;
}

.music-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.music-card img {
    display: block;
    width: 100%;
    height: auto;
    cursor: pointer;
}

.music-card:hover {
    transform: scale(1.03);
}

/* The overlay appears on hover and contains streaming links */
.music-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    /* Allows clicks to pass through to the image below */
}

.music-card:hover .music-card-overlay {
    opacity: 1;
}

.music-card:hover .music-card-info {
    pointer-events: auto;
}

.music-card-info {
    text-align: center;
    color: var(--text-salt-crystal);
    transform: translateY(15px);
    transition: transform 0.3s ease;
}

.music-card:hover .music-card-info {
    transform: translateY(0);
}

.music-card-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.music-card-title:hover {
    color: var(--accent-lava-glow);
}

.music-card-year {
    font-family: var(--font-body);
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

/* Re-enables clicks only for the links inside the overlay */
.streaming-links {
    display: flex;
    gap: 1.5rem;
    pointer-events: auto;
}

.streaming-links a .icon {
    width: 24px;
    height: 24px;
    color: var(--text-salt-crystal);
    transition: color 0.2s ease, transform 0.2s ease;
}

.streaming-links a:hover .icon {
    color: var(--accent-canary-teal);
    transform: scale(1.1);
}

/* Album Card Styling */
.music-card.is-album {
    /* Use standard card styling but keep layout adjustments for content */
    margin-right: 0;
    margin-bottom: 1.5rem;
}

/* Remove specialized hover effects that caused divergence */
.music-card.is-album:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    border-color: transparent;
    /* Reset to default or remove if inherited */
}

.music-card.is-album .music-card-content {
    padding-right: 0;
    /* Reset padding since chevron is gone */
    justify-content: center;
    /* Ensure vertical centering */
}

/* New "View Album" Action Pill (Bottom Right) */
.view-album-pill {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--text-salt-crystal);
    /* Different color to distinguish from map link */
    border-radius: 20px;
    color: var(--text-salt-crystal);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 15;
}

.view-album-pill:hover {
    background: var(--text-salt-crystal);
    color: var(--bg-volcanic-night);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.2);
}

.view-album-pill .icon {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

.album-subtitle {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Ensure platform icons have transparent backgrounds */
.streaming-links-top-right {
    background: transparent;
    /* Remove background pill if it exists */
    backdrop-filter: none;
    /* Remove blur if it interferes */
}

.streaming-links-top-right a {
    background: transparent;
    /* Ensure individual links are transparent */
}

/* Album Badge - Removed as requested */
.album-badge {
    display: none;
}

/* --- 9. About Section --- */
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
    /* Aligns image and text to the top */
}

.about-image-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.about-text-container p {
    font-size: 1.1rem;
    line-height: 1.7;
    white-space: pre-wrap;
    text-align: left;
}

.about-text-container p+p {
    margin-top: 1.5rem;
}

/* --- 10. Collaborations Section --- */
.collabs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.collab-card {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

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

.collab-card-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--accent-canary-teal);
    object-fit: cover;
    margin: 0 auto 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.collab-card-name {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* --- 11. Footer --- */
.main-footer {
    background-color: #111;
    padding: 3rem 1.5rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links .icon {
    width: 28px;
    height: 28px;
    color: var(--text-salt-crystal);
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover .icon {
    opacity: 1;
    transform: translateY(-3px);
}

.copyright {
    opacity: 0.6;
    font-size: 0.9rem;
}

/* --- 12. Side Panel --- */
/* The dark overlay behind the panel */
.side-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1900;
    /* Below the panel */
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.side-panel-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* The panel itself, slides in from the right by default */
.side-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 500px;
    height: 100%;
    background: var(--bg-volcanic-night);
    z-index: 2000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
    /* Ensure tooltips can escape the panel boundaries */
    overflow: visible;
}

/* Left panel variant is no longer needed - all panels open from right */
.side-panel.active {
    transform: translateX(0);
}

.side-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
    /* Prevents header from shrinking */
}

.side-panel-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    text-align: left;
}

.close-panel-btn {
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--text-salt-crystal);
    cursor: pointer;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.close-panel-btn:hover {
    background-color: rgba(255, 77, 77, 0.2);
    color: var(--accent-lava-glow);
}

.side-panel-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0;
    transition: padding-bottom 0.4s ease;
    /* Create a proper stacking context for tooltips */
    transform: translateZ(0);
    /* Allow tooltips to escape the overflow boundary */
    position: relative;
    /* Ensure scrolling works properly on all devices */
    -webkit-overflow-scrolling: touch;
}

/* Add padding to the bottom of the panel content when the player is active */
body.player-active .side-panel-content {
    padding-bottom: var(--player-height);
}

/* Container for collaborator hero image with consistent padding */
.side-panel-hero-container {
    padding: 1.5rem;
    padding-bottom: 0;
}

/* Square aspect ratio for collaborator hero images */
.side-panel-hero-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    /* Changed from 16/9 to square */
    object-fit: cover;
    display: block;
    border-radius: 8px;
    /* All corners rounded since it's now in a container */
}

/* Clickable album art styling */
.side-panel-hero-image.clickable-album-art {
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.side-panel-hero-image.clickable-album-art:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.side-panel-text-content {
    padding: 1.5rem;
    /* Ensure tooltips can escape this container */
    overflow: visible;
    position: relative;
}

.discography-list .music-card {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    background-color: #222;
    border-radius: 8px;
    overflow: visible;
    position: relative;
    /* Ensure tooltips can escape the card boundary */
    transform: translateZ(0);
    /* Standardized dimensions and spacing */
    min-height: 100px;
    width: 100%;
}

/* Standardized release card styling for all contexts */
.discography-list .music-card,
.side-panel-content .music-card {
    display: flex;
    align-items: stretch;
    /* Changed from center to stretch */
    margin-bottom: 1.5rem;
    background-color: #222;
    border-radius: 8px;
    overflow: visible;
    position: relative;
    /* Ensure tooltips can escape the card boundary */
    transform: translateZ(0);
    /* Standardized dimensions and spacing */
    min-height: 100px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* Prevent horizontal overflow */
    flex-wrap: nowrap;
}

/* Add breathing room for the first card's top-right tooltips to avoid clipping/overlap with header */
.discography-list .music-card:first-child {
    margin-top: 1rem;
}

/* Ensure the image maintains its size and doesn't get compressed */
.discography-list .music-card img {
    width: 100px;
    height: 100px;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 8px 0 0 8px;
    object-fit: cover;
}

.discography-list .music-card:hover,
.side-panel-content .music-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/*
 * Layout Consistency Fix (v1.1.3)
 *
 * Standardizing the layout across all overlay panels (discography, release info, collaborator info)
 * to ensure consistent behavior and prevent tooltip truncation and horizontal scrollbars.
 *
 * The release info panel was working correctly because it properly wraps its content
 * in a .discography-list element with proper padding. We're applying this same pattern
 * to all panels for consistency.
 */

/* Ensure all direct children of side-panel-content have consistent padding */
.side-panel-content>.discography-list,
.side-panel-content>.side-panel-text-content {
    padding: 1.5rem;
}

/* Ensure the hero container has consistent padding */
.side-panel-content>.side-panel-hero-container {
    padding: 1.5rem;
    padding-bottom: 0;
}

/* Fix vertical spacing in collaborator panel - remove top padding from text content
   when it follows a discography list */
.side-panel-content>.discography-list+.side-panel-text-content {
    padding-top: 0;
}

/* Remove bottom margin from the last music card in any list to fix spacing */
.discography-list .music-card:last-child {
    margin-bottom: 0;
}

/* Ensure the hero image in collaborator panels has proper spacing */
.side-panel-content>.side-panel-hero-image {
    display: block;
    width: 100%;
}

/* Fix for collaborator panel to match release info panel structure */
.side-panel-content .discography-list {
    width: 100%;
    box-sizing: border-box;
}

/* Remove hover transform override since we want consistent hover effects */
.discography-list .music-card img {
    width: 100px;
    height: 100px;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 8px 0 0 8px;
    object-fit: cover;
}

/* New layout for discography cards */
.music-card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    min-width: 0;
    /* Allow text truncation */
    height: 100px;
    /* Match the image height to maintain card dimensions */
    justify-content: center;
    /* Center content vertically */
}

.music-card-title-container {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 1.8rem 1rem 0 1.5rem;
    /* Increased top padding to clear icons */
    min-height: 0;
    /* Allow flex child to shrink if needed */
    box-sizing: border-box;
    padding-right: 10px;
    /* Reduce right padding since top padding clears icons */
}

.discography-list .music-card-title,
.side-panel-content .music-card-title {
    font-size: 1.1rem;
    /* Slightly smaller for better fit */
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-salt-crystal);
    cursor: pointer;
    transition: color 0.2s ease;
    flex: 1;
    /* Take available space */
    margin-right: 0.5rem;
    /* Spacing for icon */
}

.map-link-pill {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--accent-canary-teal);
    border-radius: 20px;
    color: var(--accent-canary-teal);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 15;
}

.map-link-pill:hover {
    background: var(--accent-canary-teal);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 194, 168, 0.3);
}

.map-link-pill .icon {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

.map-link-text {
    display: inline-block;
}

/* Ensure card content has space for the pill */
.music-card-content {
    padding-bottom: 30px;
    /* Reserve space at bottom */
}

/* Hide map link text on very small cards if needed, but pill usually fits */
@media (max-width: 350px) {
    .map-link-text {
        display: none;
    }

    .map-link-pill {
        padding: 6px;
        border-radius: 50%;
    }
}

/* Map Link for Featured Cards */
.map-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-canary-teal);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.map-link:hover {
    border-bottom-color: var(--accent-canary-teal);
}

.discography-list .music-card-title:hover,
.side-panel-content .music-card-title:hover {
    color: var(--accent-lava-glow);
}

.streaming-links-top-right {
    display: flex;
    gap: 0.8rem;
    padding: 0.5rem;
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 10;
    transform: translateZ(0);
    min-width: 0;
    /* Removed background and backdrop-filter for transparency */
}

.streaming-links-top-right .icon {
    width: 24px;
    height: 24px;
    color: var(--text-salt-crystal);
    transition: color 0.2s ease, transform 0.2s ease;
}

.streaming-links-top-right a:hover .icon {
    color: var(--accent-canary-teal);
    transform: scale(1.1);
}

/* Ensure tooltips in the new streaming links container work properly */
.streaming-links-top-right .tooltip::before,
.streaming-links-top-right .tooltip::after {
    z-index: 3001;
    /* Higher z-index for all panel tooltips */
    /* Position tooltips above the links container */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    /* Ensure text is never truncated */
    max-width: none;
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
}

.streaming-links-top-right .tooltip::before {
    content: '';
    border: 5px solid transparent;
    border-top-color: var(--accent-lava-glow);
    bottom: 100%;
    margin-bottom: 5px;
}

.streaming-links-top-right .tooltip::after {
    content: attr(data-tooltip);
    background-color: var(--accent-lava-glow);
    color: var(--text-salt-crystal);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    white-space: nowrap;
    bottom: 100%;
    margin-bottom: 15px;
    /* Ensure text is never truncated */
    max-width: none;
    overflow: visible;
    text-overflow: unset;
}

.streaming-links-top-right .tooltip:hover::before,
.streaming-links-top-right .tooltip:hover::after {
    opacity: 1;
}

/* Standardized music card info styling (for featured cards only) */
.discography-list .music-card-info,
.side-panel-content .music-card-info {
    text-align: left;
    padding: 1rem 1.5rem;
    flex-grow: 1;
    margin-right: 1rem;
    /* Space between title and links */
    flex: 1;
    /* Take available space */
    min-width: 0;
    /* Allow text truncation */
    overflow: hidden;
    /* Prevent text overflow */
    box-sizing: border-box;
}

/* Standardized music card year styling (for featured cards only) */
.discography-list .music-card-year,
.side-panel-content .music-card-year {
    margin-bottom: 0;
    opacity: 0.8;
    font-family: var(--font-body);
}

/* Standardized streaming links styling */
.discography-list .streaming-links,
.side-panel-content .streaming-links {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
    padding: 1rem 1.5rem;
    position: relative;
    z-index: 10;
    /* Ensure links are above other content */
    justify-content: flex-start;
    /* Create a stacking context for tooltips */
    transform: translateZ(0);
    /* Prevent overflow */
    min-width: 0;
    flex-wrap: nowrap;
}

/* Fix for icon sizing in small release cards (side panel) */
.discography-list .streaming-links .icon,
.side-panel-content .streaming-links .icon,
.discography-list .streaming-links-top-right .icon,
.side-panel-content .streaming-links-top-right .icon {
    width: 20px;
    height: 20px;
}

.collab-details-bio {
    text-align: left;
    white-space: pre-wrap;
    line-height: 1.7;
    margin-top: 0;
    margin-bottom: 2rem;
}

.collab-details-visit-btn-container {
    text-align: center;
    margin-top: 2rem;
}

/* --- 16. Song Info Overlay (Tabbed Interface) --- */
.song-info-tabs {
    display: flex;
    border-bottom: 1px solid #444;
    margin-bottom: 1.5rem;
}

.song-info-tab {
    background: none;
    border: none;
    color: var(--text-salt-crystal);
    padding: 0.75rem 1rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, border-bottom 0.2s ease;
    border-bottom: 3px solid transparent;
}

.song-info-tab.active {
    opacity: 1;
    border-bottom-color: var(--accent-lava-glow);
}

.song-info-tab:hover {
    opacity: 1;
}

.song-info-content {
    display: none;
    /* Hide all content by default */
}

.song-info-content.active {
    display: block;
    /* Show only the active content */
}

.song-info-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.song-info-gallery img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

/* Enhanced lyrics content styling for better responsiveness */
.lyrics-content {
    line-height: 1.6;
    padding: 1rem 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.lyrics-content p {
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
    font-size: 1rem;
}

/* Responsive lyrics panel */
@media (max-width: 768px) {
    .song-info-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 0.25rem;
    }

    .song-info-tabs::-webkit-scrollbar {
        display: none;
    }

    .song-info-tab {
        flex-shrink: 0;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        min-height: 48px;
        /* WCAG touch target */
    }

    .lyrics-content p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .song-info-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        min-height: 44px;
    }

    .lyrics-content p {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .song-info-gallery {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.5rem;
    }

    .song-info-gallery img {
        height: 80px;
    }
}

/* Enhanced side panel responsiveness for lyrics */
@media (max-width: 768px) {
    .side-panel {
        width: 100%;
        max-width: 100%;
    }

    .side-panel-content {
        padding: 0;
    }

    .side-panel-text-content {
        padding: 1rem;
    }

    .side-panel-hero-container {
        padding: 1rem;
        padding-bottom: 0;
    }
}

@media (max-width: 480px) {
    .side-panel-text-content {
        padding: 0.75rem;
    }

    .side-panel-hero-container {
        padding: 0.75rem;
        padding-bottom: 0;
    }
}

/* --- 13. Mini Audio Player (The Obsidian Pill v3.0 - Tropical Noir) --- */
.mini-player {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    width: 95%;
    max-width: 600px;
    height: 70px;

    /* Glassmorphism & Shape */
    background: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(12px) saturate(110%);
    -webkit-backdrop-filter: blur(12px) saturate(110%);
    border-radius: 50px;
    border: 1px solid rgba(0, 194, 168, 0.15);
    /* Teal Rim */

    /* Deep shadow + Teal Ambient Glow (Bioluminescence) */
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.6),
        0 0 25px rgba(0, 194, 168, 0.15),
        inset 0 0 1px rgba(0, 194, 168, 0.4);

    z-index: 2100;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: visible;
    /* Changed to visible to allow spark to glow outside */
    padding-bottom: env(safe-area-inset-bottom);

    animation: player-breathe 4s ease-in-out infinite;
}

@keyframes player-breathe {

    0%,
    100% {
        box-shadow:
            0 15px 35px rgba(0, 0, 0, 0.6),
            /* Base Depth */
            0 0 0 rgba(0, 194, 168, 0),
            /* Teal Outer (Off) */
            inset 0 0 0 rgba(0, 194, 168, 0);
        /* Teal Inner (Off) */
        border-color: rgba(255, 255, 255, 0.1);
    }

    50% {
        box-shadow:
            0 15px 35px rgba(0, 0, 0, 0.6),
            /* Base Depth */
            0 0 25px rgba(0, 194, 168, 0.6),
            /* Teal Outer (Peak) */
            inset 0 0 15px rgba(0, 194, 168, 0.3);
        /* Teal Inner (Peak) */
        border-color: rgba(0, 194, 168, 0.5);
    }
}


/* --- Player Wrapper (Logical Container) --- */
#player-wrapper {
    /* Wrapper doesn't need layout, just state management */
    display: contents;
}

.mini-player.active,
#player-wrapper.active .mini-player {
    transform: translateX(-50%) translateY(0);
}

/* --- The Holographic Scrubber (Floating Precision Tool) --- */
.holographic-scrubber {
    position: fixed;
    bottom: 85px;
    /* Floating above the player */
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: calc(95% - 100px);
    /* Align with mini-player straight edges */
    max-width: 500px;
    height: 50px;
    /* Slightly shorter for single row */
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 194, 168, 0.3);
    border-radius: 25px 25px 0 0;
    /* Rounded top, square bottom */
    display: flex;
    flex-direction: row;
    /* Side by Side */
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    gap: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
    z-index: 2000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    visibility: hidden;
    animation: player-breathe 4s ease-in-out infinite;
}

.holographic-scrubber.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Left: Dynamic Progress Bar Container */
.scrubber-track-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    position: relative;
}

/* Track */
.scrubber-track {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    display: flex;
    align-items: center;
}

/* Navigation Buttons (Embedded in Scrubber) */
.scrubber-nav-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.scrubber-nav-btn:hover {
    color: var(--color-teal);
    background: rgba(0, 194, 168, 0.1);
    box-shadow: 0 0 10px rgba(0, 194, 168, 0.3);
}

.scrubber-nav-btn .icon-container svg {
    width: 16px;
    height: 16px;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

/* Hide navigation on small screens */
@media (max-width: 480px) {
    .scrubber-nav-btn {
        display: none !important;
    }
}

/* The Neon Filament (Progress Fill) */
.scrubber-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--accent-lava-glow);
    width: 0%;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-lava-glow);
}

/* The Thumb (White Hot Spark) */
.scrubber-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #fff, 0 0 20px var(--accent-lava-glow);
}

/* Invisible Input for Interaction */
.scrubber-input {
    position: absolute;
    width: 100%;
    height: 20px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    cursor: pointer;
    z-index: 10;
    margin: 0;
}

/* Right: Time Display */
.scrubber-info {
    display: flex;
    justify-content: flex-end;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-canary-teal);
    text-shadow: 0 0 5px rgba(0, 194, 168, 0.5);
    white-space: nowrap;
    min-width: 70px;
    /* Prevent jumping */
    margin-bottom: 0;
}

/* Hide time display on narrow screens to give more space to progress bar */
@media (max-width: 400px) {
    .scrubber-info {
        display: none;
    }
}

/* Content Layout */
.player-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 24px;
    /* Increased side padding */
    position: relative;
    z-index: 25;
    /* Raise content above the seek slider (z-index 20) to prioritize buttons */
}

/* --- Left Group: Identity --- */
.player-left-group {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    margin-right: 16px;
}

.player-track-info {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 30px;
    transition: background 0.2s ease;
    max-width: 100%;
}

.player-track-info:hover {
    background: rgba(255, 255, 255, 0.05);
}

.player-track-info:hover .player-title,
.player-track-info:hover .player-artist {
    color: var(--accent-canary-teal);
    transition: color 0.2s ease;
}

/* The Vinyl Record */
.player-cover-art {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(26, 26, 26, 0.8);
    /* Removed Base Shadow, replaced with transition for conditional glow */
    box-shadow: none;
    transition: box-shadow 0.8s ease-in-out;
    /* Slow fade in/out */

    /* Animation Logic */
    animation: vinyl-spin 4s linear infinite;
    animation-play-state: paused;
}

.mini-player.playing .player-cover-art,
#player-wrapper.playing .player-cover-art {
    animation-play-state: running;
    /* Subtle White Glow when playing - ADJUSTED INTENSITY */
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

@keyframes vinyl-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.player-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.player-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.player-artist {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Right Group: Actions & Controls --- */
.player-right-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* External Links */
.player-streaming-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.player-icon-link {
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.player-icon-link:hover {
    color: var(--accent-canary-teal);
    filter: drop-shadow(0 0 8px var(--accent-canary-teal));
    transform: scale(1.1);
}

/* Icon Containers */
.icon-container svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    display: block;
}

.player-streaming-links .icon-container svg {
    width: 18px;
    height: 18px;
}

/* Beam of Light Divider */
.player-divider {
    width: 1px;
    height: 32px;
    background: linear-gradient(to bottom,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
}

/* --- The Player Control Block [Halo - Play - Close] --- */
.player-control-block {
    display: flex;
    align-items: center;
    gap: 12px;
    /* Reduced spacing for more compact layout */
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 12px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Element A: The Halo (Scrubber Trigger) */
.halo-trigger-btn {
    position: relative;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    border-radius: 50%;
}

.halo-trigger-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* SVG Ring */
.halo-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    /* Start from top */
    pointer-events: none;
}

.halo-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3;
}

.halo-fill {
    fill: none;
    stroke: var(--accent-canary-teal);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.1s linear;
    /* stroke-dasharray set via JS: "current, 100" */
}

.halo-trigger-btn .icon-container svg {
    width: 14px;
    height: 14px;
    z-index: 2;
}

/* Halo Icon Switching */
.halo-trigger-btn .icon-active {
    display: none;
}

.halo-trigger-btn.active .icon-idle {
    display: none;
}

.halo-trigger-btn.active .icon-active {
    display: block;
}


/* Element B: The Anchor (Play/Pause) */
.play-pause-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-lava-glow);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(255, 77, 77, 0.4);
    position: relative;
    z-index: 10;
}

.play-pause-btn:hover {
    background: #ff6b6b;
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--accent-lava-glow);
}

.play-pause-btn .icon-container svg,
.play-pause-btn .icon-play svg,
.play-pause-btn .icon-pause svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}


/* Element C: The Satellite (Close) */
.close-player-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
}

.close-player-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.close-player-btn .icon-container svg {
    width: 16px;
    height: 16px;
}

/* --- Responsive Logic --- */
@media (max-width: 500px) {

    .player-streaming-links,
    .player-divider {
        display: none;
    }

    .player-content {
        padding: 0 16px;
    }

    /* On mobile, reduce gap and make controls even more compact */
    .player-right-group {
        gap: 8px;
    }

    .player-control-block {
        gap: 8px;
    }

    .play-pause-btn {
        width: 40px;
        height: 40px;
    }

    .halo-trigger-btn,
    .close-player-btn {
        width: 28px;
        height: 28px;
    }

    .close-player-btn .icon-container svg {
        width: 14px;
        height: 14px;
    }
}

@media (min-width: 768px) {
    .mini-player {
        bottom: 20px;
        /* Matched to mobile position */
        /* Removed width overrides to maintain consistent 95%/600px sizing */
    }
}

/* --- 14. Tooltip --- */
/*
 * Pure CSS tooltips for icons using pseudo-elements.
 *
 * CRITICAL FIX (v1.0.7): A persistent issue with tooltip text being clipped
 * inside scrollable overlay panels was resolved. The fix involves:
 * 1. Creating a new stacking context for tooltip containers using `transform: translateZ(0)`
 * 2. Elevating tooltip z-index to 3001 to appear above other panel content
 * 3. Ensuring parent containers have `overflow: visible` for tooltips to escape
 *
 * DO NOT modify these rules without understanding the stacking context implications.
 */
.tooltip {
    position: relative;
}

.tooltip::before,
.tooltip::after {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 3000;
    /* Ensure text is never truncated */
    max-width: none;
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
}

/* The little triangle arrow */
.tooltip::before {
    content: '';
    border: 5px solid transparent;
    border-top-color: var(--accent-lava-glow);
    bottom: 100%;
    margin-bottom: 5px;
}

/* The text box */
.tooltip::after {
    content: attr(data-tooltip);
    background-color: var(--accent-lava-glow);
    color: var(--text-salt-crystal);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    white-space: nowrap;
    bottom: 100%;
    margin-bottom: 15px;
    /* Ensure text is never truncated */
    max-width: none;
    overflow: visible;
    text-overflow: unset;
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
}

/* Enhanced tooltip handling for all contexts to prevent clipping */
.discography-list .tooltip::before,
.discography-list .tooltip::after,
.side-panel-content .tooltip::before,
.side-panel-content .tooltip::after,
.song-info-content .tooltip::before,
.song-info-content .tooltip::after {
    z-index: 3001;
    /* Higher z-index for all panel tooltips */
}

/* Ensure tooltips in all contexts are fully visible */
.discography-list .streaming-links,
.side-panel-content .streaming-links,
.song-info-content .streaming-links {
    position: relative;
    /* Create a new stacking context for tooltips */
    transform: translateZ(0);
}

/* Fix for tooltip positioning in all panels */
.side-panel {
    /* Ensure tooltips can escape the panel boundaries */
    overflow: visible;
}

/* Ensure all panel content containers allow tooltips to escape */
.side-panel-content,
.side-panel-text-content,
.discography-list,
.song-info-content {
    overflow-x: visible !important;
    overflow-y: auto;
    position: relative;
    /* Create proper stacking context for tooltips */
    transform: translateZ(0);
}

/* Special handling for streaming links to ensure tooltips display properly */
.streaming-links {
    position: relative;
    z-index: 10;
    /* Create stacking context for tooltips */
    transform: translateZ(0);
}

/*
 * Vertical Scrolling Fix (v1.1.1)
 *
 * Root Cause: The tooltip fix (v1.0.7) was setting overflow: visible on all panel containers,
 * which conflicted with the overflow-y: auto rule needed for vertical scrolling.
 *
 * Solution: Changed overflow rules to use overflow-x: visible (for tooltips) while maintaining
 * overflow-y: auto (for vertical scrolling). Added -webkit-overflow-scrolling: touch for
 * better mobile scrolling performance.
 *
 * This fix ensures that:
 * 1. Vertical scrolling works properly in all overlay panels
 * 2. Tooltips can still escape the container boundaries horizontally
 * 3. Touch scrolling is optimized on mobile devices
 */
/* Fix for side panel content to prevent tooltip clipping while maintaining scrollability */
.side-panel-content {
    /* Ensure proper stacking context */
    transform: translateZ(0);
    /* Allow tooltips to escape overflow but maintain vertical scrolling */
    overflow-x: visible;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Prevent horizontal scrollbar */
    max-width: 100%;
    box-sizing: border-box;
}

/* Special handling for scrollable content within panels */
.side-panel-content>* {
    overflow-x: visible;
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure scrollable containers don't clip tooltips but maintain vertical scrolling */
.side-panel-text-content {
    overflow-x: visible;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Prevent horizontal scrollbar */
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix for discography list specifically */
.discography-list {
    overflow-x: visible;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Prevent horizontal scrollbar */
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix for song info content */
.song-info-content {
    overflow-x: visible;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Prevent horizontal scrollbar */
    max-width: 100%;
    box-sizing: border-box;
}

/* Additional fixes for tooltip visibility in all contexts */
.side-panel-content .tooltip,
.side-panel-text-content .tooltip,
.discography-list .tooltip,
.song-info-content .tooltip {
    position: relative;
    /* Ensure tooltip can escape parent container */
    z-index: 3001;
}

/* Ensure tooltips have proper positioning in all panels */
.tooltip::before,
.tooltip::after {
    /* Allow tooltips to appear above all content */
    z-index: 3002 !important;
}

/* --- 15. Desktop Styles --- */
/* Media query for screens 768px and wider */
@media (min-width: 768px) {

    /* Hide hamburger menu on desktop */
    .hamburger-menu {
        display: none;
    }

    .main-nav {
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        transform: none;
        flex-direction: row;
        align-items: center;
        gap: 2rem;
    }

    .nav-links {
        display: flex;
        gap: 2rem;
    }

    .nav-links li {
        margin: 0;
    }

    .nav-links a {
        font-size: 1rem;
    }

    .language-switcher {
        margin-top: 0;
    }

    .lang-btn {
        font-size: 0.9rem;
    }

    .hero-logo {
        max-width: 250px;
    }

    .page-section {
        padding: 6rem 1.5rem;
    }

    .section-title {
        font-size: 3rem;
    }

    .about-content {
        grid-template-columns: 1fr 1.5fr;
    }

    .music-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .discography-list .music-card img {
        width: 100px;
        height: 100px;
    }
}

/* --- 18. Horizontal Language Selector for Multi-Language Lyrics --- */
/* (Code remains unchanged for brevity, assume it exists) */

/* --- NEW: Hero Notification Badge --- */
.hero-notification-badge {
    display: inline-block;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1.2rem;
    background: rgba(255, 77, 77, 0.15);
    /* Low opacity Lava */
    border: 1px solid var(--accent-lava-glow);
    border-radius: 50px;
    color: var(--text-salt-crystal);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    text-decoration: none;
    animation: float 6s ease-in-out infinite;
}

.hero-notification-badge:hover {
    background: var(--accent-lava-glow);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 77, 77, 0.5);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* --- NEW: Merch Spotlight Section --- */
.merch-section {
    padding: 2rem 1.5rem 4rem;
    background: linear-gradient(to bottom, var(--bg-volcanic-night), #111);
    position: relative;
    z-index: 10;
    /* FIXED: Ensure 100% width to prevent overflow issues */
    width: 100%;
    box-sizing: border-box;
}

.merch-container {
    max-width: 1000px;
    margin: 0 auto;
}

.merch-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile Stack */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.merch-card:hover {
    border-color: var(--accent-lava-glow);
    transform: translateY(-2px);
}

/* Visual Side */
.merch-visual-wrapper {
    position: relative;
    background: #0a0a0a;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 300px;
}

/* The "Lava" ambient light behind the product */
.merch-glow-effect {
    position: absolute;
    width: 200px;
    height: 200px;
    background: var(--accent-lava-glow);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    z-index: 0;
}

.merch-img {
    position: relative;
    z-index: 1;
    max-width: 100%;
    height: auto;
    transform: rotate(-3deg);
    transition: transform 0.5s ease;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    border-radius: 4px;
}

.merch-card:hover .merch-img {
    transform: rotate(0deg) scale(1.05);
}

/* Text Side */
.merch-text-wrapper {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.merch-eyebrow {
    color: var(--accent-canary-teal);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 1rem;
}

.merch-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #ccc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.merch-desc {
    font-family: var(--font-body);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.merch-meta {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 2rem;
    font-family: monospace;
    text-transform: uppercase;
}

.merch-btn {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--accent-canary-teal);
    color: #000;
}

.merch-btn:hover {
    background-color: var(--text-salt-crystal);
    color: var(--bg-volcanic-night);
    transform: scale(1.05);
}

.merch-btn .icon {
    width: 20px;
    height: 20px;
}

/* Desktop Layout for Merch */
@media (min-width: 768px) {
    .merch-card {
        grid-template-columns: 1fr 1fr;
    }

    .merch-text-wrapper {
        text-align: left;
        padding: 4rem;
    }

    .merch-btn {
        align-self: flex-start;
    }

    .hero-notification-badge {
        font-size: 1rem;
        padding: 0.6rem 1.5rem;
    }
}

/* --- Narrow Mobile Optimization for Calendar --- */
@media (max-width: 480px) {
    .merch-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .merch-visual-wrapper {
        padding: 2rem;
        min-height: 250px;
    }

    .merch-img {
        /* Prevent rotation clipping at edges */
        max-width: 85%;
    }

    .merch-text-wrapper {
        padding: 1.5rem;
    }

    .merch-title {
        font-size: 1.75rem;
    }
}

/* ========================================= */
/*      MERGED SURFMAP CSS & TOKENS        */
/* ========================================= */

/* Search Component Design Tokens */
:root {
    /* Search Component Design Tokens */
    --search-bg-primary: rgba(26, 26, 26, 0.92);
    --search-bg-hover: rgba(255, 77, 77, 0.1);
    --search-bg-selected: rgba(255, 77, 77, 0.15);
    --search-text-primary: var(--text-salt-crystal, #F0F0F0);
    --search-text-secondary: rgba(240, 240, 240, 0.8);
    /* Improved contrast */
    --search-text-meta: rgba(240, 240, 240, 0.7);
    --search-border: rgba(255, 255, 255, 0.1);
    --search-border-hover: rgba(255, 77, 77, 0.2);
    --search-border-selected: rgba(255, 77, 77, 0.3);
    --search-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --search-shadow-focus: 0 6px 30px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(0, 194, 168, 0.3);
    --search-blur: blur(8px);
    /* Reduced for performance */
    --search-radius: 8px;
    --search-radius-sm: 4px;
    --search-radius-badge: 6px;
    --search-spacing-xs: 4px;
    --search-spacing-sm: 8px;
    --search-spacing-md: 12px;
    --search-spacing-lg: 16px;
    --search-transition-fast: 0.2s ease;
    --search-transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Performance optimizations */
    --search-transform-gpu: translateZ(0);
}

/* --- CUSTOM SCROLLBARS --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

#map-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-volcanic-night, #1a1a1a);
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

#map-container:active {
    cursor: grabbing;
}

#map-container.pinpoint-mode {
    cursor: crosshair !important;
}

.tile {
    position: absolute;
    top: 0;
    left: 0;
    width: 1024px;
    height: 1024px;
    transform-origin: 0 0;
    will-change: transform, opacity;
    outline: 1px solid transparent;
    user-drag: none;
    -webkit-user-drag: none;
    pointer-events: none;
    transition: opacity 0.25s ease-in;
}

.tile-error {
    background: repeating-linear-gradient(45deg,
            #2a2a2a,
            #2a2a2a 10px,
            #333333 10px,
            #333333 20px);
    border: 1px solid #444;
    opacity: 0.5;
}

/* --- DEBUG INFO --- */
.debug-info {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.85);
    color: #00ff9d;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    padding: 8px 12px;
    border-radius: 6px;
    z-index: 9999;
    pointer-events: none;
    backdrop-filter: blur(4px);
    text-align: right;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

#coord-tooltip {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.9);
    color: #ffcc00;
    padding: 6px 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: bold;
    pointer-events: none;
    z-index: 1500;
    transform: translate(15px, 15px);
    display: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- CONFIRMATION UI --- */
.confirm-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    z-index: 5000;
    color: white;
    width: 300px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from {
        transform: translate(-50%, -40%) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.confirm-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

.confirm-meta {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
}

.confirm-meta strong {
    color: #ffcc00;
}

.confirm-actions {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-save {
    background: #00ff9d;
    color: #003320;
}

.btn-save:hover {
    background: #00cc7d;
}

.btn-cancel {
    background: #e0e0e0;
    color: #333;
}

.btn-cancel:hover {
    background: #d0d0d0;
}

/* Connector Lines Layer */
#connector-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1500;
}

.ghost-marker {
    position: absolute;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50% 50% 50% 0;
    transform: translate3d(0, 0, 0) rotate(-45deg);
    z-index: 1400;
    pointer-events: none;
}

.target-marker {
    position: absolute;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle at 30% 30%, #ffcc00, #ff9900);
    border: 2px solid #fff;
    border-radius: 50% 50% 50% 0;
    transform: translate3d(0, 0, 0) rotate(-45deg);
    z-index: 1600;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.6);
    pointer-events: none;
}

/* --- SURF MARKERS --- */
.surf-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.surf-marker {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: auto;
    cursor: pointer;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    transition: z-index 0s, opacity 0.3s ease, filter 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.surf-marker.dimmed {
    opacity: 0.5;
    filter: grayscale(100%);
    z-index: 50 !important;
}

.surf-marker.highlighted {
    opacity: 1;
    filter: none;
    z-index: 2000 !important;
}

.surf-marker:hover {
    z-index: 3000 !important;
    opacity: 1;
    filter: none;
}

.marker-pin {
    width: 30px;
    height: 30px;
    background: radial-gradient(circle at 30% 30%, #00e5ff, #0097a7);
    border: 2px solid #ffffff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* TREBLE REACTION: The Spark */
.surf-marker.pulsing .marker-pin {
    /* Flash brightness on high-hats/shakers - Subtle intensity */
    filter: brightness(calc(1 + var(--p-treble, 0) * 0.2));
    /* Add electric white/cyan glow on top of drop shadow */
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.4),
        0 0 calc(var(--p-treble, 0) * 15px) rgba(255, 255, 255, 0.7);
    /* Ensure hardware acceleration for the filter/shadow transition */
    will-change: filter, box-shadow;
}

.surf-marker:hover .marker-pin {
    transform: rotate(-45deg) scale(1.2);
    background: radial-gradient(circle at 30% 30%, #50f2ff, #00bcd4);
}

.marker-cluster {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ff7e5f, #eb3b5a);
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(235, 59, 90, 0.4);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* TREBLE REACTION: The Spark (Cluster Variant) */
.surf-marker.pulsing .marker-cluster {
    filter: brightness(calc(1 + var(--p-treble, 0) * 0.2));
    box-shadow:
        0 4px 12px rgba(235, 59, 90, 0.4),
        0 0 calc(var(--p-treble, 0) * 15px) rgba(255, 255, 255, 0.7);
    will-change: filter, box-shadow;
}

.surf-marker:hover .marker-cluster {
    transform: scale(1.15);
}

/* PULSE ANIMATION - "THE TROPICAL PULSE" */
/* Optimized for 60fps using transform/opacity changes on pseudo-elements */

.surf-marker.pulsing::before,
.surf-marker.pulsing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    will-change: transform, opacity, box-shadow;
    z-index: -1;
}

/* LAYER 1: THE MAGMA CORE (Bass) 
   A deep, intense red glow.
   Now moves MORE (1.0 -> 3.0 scale) but is more transparent at rest.
*/
.surf-marker.pulsing::before {
    width: 34px;
    height: 34px;
    background: radial-gradient(circle, rgba(255, 77, 77, 0.8) 0%, transparent 70%);
    /* Massive dynamic range for movement */
    transform: translate(-50%, -50%) scale(calc(1 + var(--p-bass, 0) * 2.0));
    /* Only visible when signal is present */
    opacity: calc(var(--p-bass, 0) * 0.8);
    /* Thinner, cleaner shadow */
    box-shadow: 0 0 15px rgba(255, 77, 77, calc(var(--p-bass, 0) * 0.6));
}

/* LAYER 2: THE OCEANIC RIPPLE (Mids & Treble)
   Main ring is Teal. 
*/
.surf-marker.pulsing::after {
    width: 40px;
    height: 40px;

    /* Thinner border for elegance */
    border: 1px solid rgba(0, 194, 168, calc(var(--p-mid, 0) * 0.8));

    /* Expansion */
    transform: translate(-50%, -50%) scale(calc(1.1 + var(--p-mid, 0) * 1.8));

    /* Removed the inset white shadow to fix the "white circle" issue.
       Now uses only the outer wash. */
    box-shadow:
        0 0 0 calc(var(--p-mid, 0) * 6px) rgba(0, 194, 168, 0.15);

    opacity: calc(var(--p-mid, 0) * 0.9);
}

/* REDESIGNED TOOLTIP */
.marker-tooltip {
    position: absolute;
    bottom: 42px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.marker-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: rgba(20, 20, 20, 0.85) transparent transparent transparent;
}

.surf-marker:hover .marker-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* --- SEARCH PANEL --- */
#search-panel {
    position: absolute;
    top: 85px;
    left: 20px;
    z-index: 1500;
    width: 360px;
    max-width: calc(100vw - 40px);
    font-family: var(--font-body, 'Roboto', sans-serif);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-bar {
    background: var(--search-bg-primary);
    backdrop-filter: var(--search-blur);
    border: 1px solid var(--search-border);
    border-radius: var(--search-radius);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    box-shadow: var(--search-shadow);
    transition: all var(--search-transition-base);
    height: 44px;
    box-sizing: border-box;
}

.search-bar:focus-within {
    border-color: var(--accent-canary-teal, #00C2A8);
    box-shadow: var(--search-shadow-focus);
}

.search-icon {
    width: 20px;
    height: 20px;
    color: var(--text-salt-crystal, #F0F0F0);
    margin-right: 12px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.search-bar:focus-within .search-icon {
    opacity: 1;
}

.search-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--search-bg-primary);
    backdrop-filter: var(--search-blur);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-mobile-toggle:hover {
    background: rgba(40, 40, 40, 0.95);
    transform: scale(1.05);
}

.search-back-btn {
    display: none;
    margin-right: 8px;
    padding: 4px;
    color: #fff;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.search-back-btn:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    #search-panel {
        width: auto;
        max-width: none;
        left: 20px;
        right: auto;
        top: 80px;
        pointer-events: none;
    }

    #search-panel:not(.is-expanded) .search-bar {
        display: none;
    }

    #search-panel:not(.is-expanded) .search-mobile-toggle {
        display: flex;
        pointer-events: auto;
    }

    #search-panel.is-expanded {
        left: 10px;
        right: 10px;
        top: 80px;
        width: auto;
        pointer-events: auto;
    }

    #search-panel.is-expanded .search-bar {
        display: flex;
    }

    #search-panel.is-expanded .search-mobile-toggle {
        display: none;
    }

    #search-panel.is-expanded .search-back-btn {
        display: flex;
    }

    #search-panel.is-expanded .search-icon {
        display: none;
    }

    .result-hint {
        display: none;
    }
}

.search-input {
    border: none;
    background: transparent;
    font-size: 16px;
    width: 100%;
    color: var(--text-salt-crystal, #F0F0F0);
    outline: none;
    font-family: var(--font-body, 'Roboto', sans-serif);
    line-height: 1;
    min-height: 24px;
}

.search-input::placeholder {
    color: rgba(240, 240, 240, 0.5);
}

.search-clear {
    cursor: pointer;
    padding: 0 4px;
    display: none;
    opacity: 0.5;
    transition: all 0.2s ease;
    align-self: center;
    color: var(--text-salt-crystal, #F0F0F0);
}

.search-clear:hover {
    opacity: 1;
    color: var(--accent-lava-glow, #FF4D4D);
    transform: scale(1.1);
}

.search-bar.has-text .search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-results {
    margin-top: var(--search-spacing-sm);
    background: var(--search-bg-primary);
    backdrop-filter: var(--search-blur);
    border: 1px solid var(--search-border);
    border-radius: var(--search-radius);
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--search-shadow);
    display: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity var(--search-transition-base), transform var(--search-transition-base);
}

.search-results.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.result-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--search-border);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background: var(--search-bg-hover);
    border-bottom-color: var(--search-border-hover);
    transform: translateX(2px);
}

.result-item.selected {
    background: var(--search-bg-selected);
    border-bottom-color: var(--search-border-selected);
    box-shadow: inset 3px 0 0 0 var(--accent-lava-glow, #FF4D4D);
    transform: translateX(3px);
}

.result-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.result-name {
    font-weight: 600;
    color: var(--text-salt-crystal, #F0F0F0);
    font-size: 15px;
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    line-height: 1.2;
    margin-bottom: 2px;
}

.result-meta {
    font-size: 12px;
    color: var(--search-text-secondary);
    margin-top: 2px;
    font-family: var(--font-body, 'Roboto', sans-serif);
}

.badge {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--search-radius-badge);
    text-transform: uppercase;
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.badge.beginner {
    background: linear-gradient(135deg, rgba(0, 194, 168, 0.8), rgba(0, 194, 168, 0.6));
    color: #ffffff;
    border: 1px solid rgba(0, 194, 168, 0.3);
}

.badge.intermediate {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 215, 0, 0.7));
    color: #000000;
    border: 1px solid rgba(255, 215, 0, 0.4);
    font-weight: 800;
}

.badge.advanced {
    background: linear-gradient(135deg, var(--accent-lava-glow, #FF4D4D), var(--accent-lava-glow-dark, #e63939));
    color: #ffffff;
    border: 1px solid rgba(255, 77, 77, 0.3);
}

.badge.expert {
    background: linear-gradient(135deg, var(--accent-lava-glow, #FF4D4D), var(--accent-lava-glow-dark, #e63939));
    color: #ffffff;
    border: 1px solid rgba(255, 77, 77, 0.3);
}

.result-hint {
    padding: 12px;
    text-align: center;
    font-size: 12px;
    color: rgba(240, 240, 240, 0.6);
    font-family: var(--font-body, 'Roboto', sans-serif);
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    margin: 8px;
    font-style: italic;
}

/* --- SPOT EDITOR MODAL --- */
.editor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 6000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.editor-modal {
    background: #fff;
    width: 600px;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-header {
    padding: 16px 24px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.editor-close {
    cursor: pointer;
    font-size: 20px;
    color: #999;
}

/* Tabs */
.editor-tabs {
    display: flex;
    padding: 0 24px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.editor-tab {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.editor-tab:hover {
    color: #00e5ff;
}

.editor-tab.active {
    color: #0097a7;
    border-bottom-color: #0097a7;
}

/* Content */
.editor-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.editor-section {
    display: none;
}

.editor-section.active {
    display: block;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: #00e5ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Chips */
.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-option {
    padding: 6px 12px;
    background: #f0f0f0;
    border-radius: 16px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.chip-option:hover {
    background: #e0e0e0;
}

.chip-option.selected {
    background: #e0f7fa;
    color: #006064;
    border-color: #00bcd4;
    font-weight: 500;
}

/* Footer */
.editor-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    background: #fff;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Attribution */
.mapbox-attribution-container {
    bottom: 0;
    left: 0;
    position: absolute;
    display: block;
    margin: 0 10px 5px;
    font-size: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 5px;
    border-radius: 3px;
    z-index: 1000;
    pointer-events: auto;
}

.mapbox-attribution-container a {
    color: #444;
    text-decoration: none;
}

.mapbox-attribution-container a:hover {
    text-decoration: underline;
}

/* --- SURF SPOT DETAILS PANEL --- */
/* Surf Spot Panel Optimized Styles */
:root {
    --panel-bg: #1a1a1a;
    --panel-border: #333;
    --text-primary: #f5f5f5;
    /* Improved Contrast to Salt Crystal */
    --text-secondary: #d0d0d0;
    --accent-color: #ff6b6b;
    --highlight-bg: #2a2a2a;
    --highlight-color-good: #2ecc71;
    --warning-color: #f39c12;
    --tab-active-border: var(--accent-color);
    --font-family-sans: 'Roboto', sans-serif;
}

.surf-spot-panel-optimized {
    color: var(--text-primary);
    font-family: var(--font-family-sans);
    height: auto;
    display: flex;
    flex-direction: column;
}

.alternative-names {
    display: none;
}

/* Hero Section */
.surf-spot-panel__hero {
    position: relative;
    margin: 0;
    padding: 0;
    aspect-ratio: 3 / 2;
    background-color: #222;
}

.surf-spot-panel__hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.surf-spot-panel__hero-overlay {
    position: absolute;
    padding: 0.25rem;
    /* Tighter padding for Glass aesthetic */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
}

/* GPS: Top Left */
.surf-spot-panel__hero-overlay.top-left {
    top: 0.25rem;
    left: 0.25rem;
}

/* Badge: Top Right */
.surf-spot-panel__hero-overlay.top-right {
    top: 0.25rem;
    right: 0.25rem;
    bottom: auto;
}

/* Alt Names: Bottom Left */
.surf-spot-panel__hero-overlay.bottom-left {
    bottom: 0.25rem;
    left: 0.25rem;
}

/* Glassmorphic Elements */
.surf-spot-panel__alt-names {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.05em;

    /* Glass Pill */
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gps-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gps-link:hover {
    background: var(--accent-lava-glow, #FF4D4D);
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 77, 77, 0.4);
}

.gps-link .icon-globe {
    width: 18px;
    height: 18px;
}

.surf-spot-panel__hero-badge {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
}

/* Content and Tabs */
.surf-spot-panel__content {
    padding: 1rem 1.5rem;
    flex-grow: 1;
}

.surf-spot-panel__tab-nav {
    display: flex;
    border-bottom: 1px solid var(--panel-border);
    margin-bottom: 1.5rem;
}

.surf-spot-panel__tab-btn {
    background: none;
    border: none;
    color: #a0a0a0;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.surf-spot-panel__tab-btn:hover {
    color: var(--text-primary);
}

.surf-spot-panel__tab-btn.is-active {
    color: var(--text-primary);
    border-bottom-color: var(--tab-active-border);
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
    /* Subtle Glow */
}

.surf-spot-panel__tab-panel {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Panel Sections */
.panel-section {
    margin-bottom: 2.5rem;
}

.panel-section__title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 0.5rem;
}

.panel-section__description {
    line-height: 1.8;
    /* Editorial readability */
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.info-grid-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-grid-item__label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    opacity: 0.8;
}

.seabed-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* FIXED: Matches other values */
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.panel-grid-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: center;
}

.panel-grid-item__title {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    text-align: center;
}

.panel-grid-item__value {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.icon-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hazard-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #f0f0f0;
}

.hazard-item svg {
    width: 16px;
    height: 16px;
    fill: var(--warning-color);
    flex-shrink: 0;
    filter: drop-shadow(0 0 5px rgba(243, 156, 18, 0.4));
    /* Neon Glow */
}

.crowd-icons {
    display: flex;
    gap: 0.25rem;
    color: var(--text-secondary);
}

.crowd-icons svg {
    width: 20px;
    height: 20px;
}

/* Season Chart - Reverted to Grid */
.season-chart {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4px;
    width: 100%;
}

.season-month {
    aspect-ratio: 1;
    background-color: #222;
    /* Dark inactive */
    border-radius: 2px;
    /* Subtle rounding */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #666;
    transition: all 0.2s;
    border: 1px solid #333;
    min-width: 0;
    /* ADDED: Fix for mobile grid overflow */
}

.season-month.is-active {
    background-color: var(--highlight-color-good);
    color: #1a1a1a;
    /* Dark text on bright green */
    font-weight: 700;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.4);
    /* Green Glow */
    border-color: transparent;
}

/* UPDATED: Higher visibility for current month */
.season-month.is-current-month {
    border: 2px solid #ffffff;
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    transform: scale(1.15);
    z-index: 10;
    position: relative;
}

/* Compass Chart - HUD Style */
.compass-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.compass-container--swell .compass {
    max-width: 240px;
}

.compass-container--wind .compass {
    max-width: 200px;
}

.compass {
    width: 100%;
    max-width: 220px;
}

.compass-bg {
    fill: transparent;
    stroke: #333;
    stroke-width: 1;
}

.compass-segment {
    fill: transparent;
    stroke: #333;
    stroke-width: 1.5;
    /* Increased for visibility */
    transition: all 0.3s ease;
    stroke-linecap: round;
    /* Better edges */
}

/* Active segment glows */
.compass-segment.is-active {
    fill: rgba(46, 204, 113, 0.2);
    stroke: var(--highlight-color-good);
    /* FIXED: Ensure stroke is visible on top */
    paint-order: stroke;
    filter: drop-shadow(0 0 4px rgba(46, 204, 113, 0.5));
    z-index: 10;
    /* Hint to renderer */
}

.compass-inner-circle {
    fill: #222;
    stroke: #444;
    stroke-width: 1;
}

.compass-label {
    font-size: 10px;
    fill: #888;
    text-anchor: middle;
    dominant-baseline: middle;
    font-weight: 700;
}

.real-time-arrow {
    fill: #fff;
    stroke: none;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.8));
    transform-origin: center;
}

/* Tide Chart - Neon Wave */
.tide-chart-container {
    width: 100%;
    margin: 0;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.02));
    border-radius: 8px;
    overflow: visible;
    padding: 10px 0;
}

.tide-chart__svg {
    width: 100%;
    height: 80px;
    display: block;
}

/* Reverted to slightly more visible grid lines */
.tide-chart__grid-line {
    stroke: #fff;
    /* Changed to white for visibility */
    stroke-width: 1;
    stroke-dasharray: 3 3;
    opacity: 0.2;
    /* Controlled opacity */
}

/* Sophisticated Cyan-Teal Gradient handled in JS */
.tide-chart__sine-wave {
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 6px rgba(79, 195, 247, 0.4));
    /* Subtler Glow */
}

.tide-chart__section-highlight {
    fill: rgba(46, 204, 113, 0.15);
    /* Very subtle green */
    stroke: none;
    /* Rounded top */
    clip-path: inset(0 0 0 0 round 4px 4px 0 0);
    transition: all 0.3s ease-in-out;
}

.tide-chart__current-tide-line {
    stroke: #fff;
    stroke-width: 1;
    stroke-dasharray: 4 2;
    opacity: 0.8;
}

.tide-chart__current-tide-marker {
    fill: #fff;
    stroke: var(--panel-bg);
    stroke-width: 2;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}

/* Responsive */
@media (min-width: 480px) {
    .tide-chart__svg {
        height: 120px;
    }
}

@media (min-width: 768px) {
    .tide-chart__svg {
        height: 140px;
    }
}

@media (max-width: 768px) {
    .side-panel {
        width: 100%;
        max-width: 100%;
    }

    .side-panel-content {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- SURF GALLERY --- */
.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    z-index: 2500;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.gallery-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* Grid View */
.gallery-grid-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.gallery-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.gallery-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
}

@media (hover: hover) {
    .gallery-close-btn:hover {
        color: var(--accent-lava-glow, #FF4D4D);
    }
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 3/2;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    animation: fadeIn 0.5s ease backwards;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

@media (hover: hover) {
    .gallery-item:hover {
        transform: scale(1.02);
        box-shadow: 0 0 0 2px var(--accent-lava-glow, #FF4D4D);
    }

    .gallery-item:hover img {
        transform: scale(1.1);
    }
}

.gallery-item:active {
    transform: scale(0.98);
}

.gallery-thumb-wrapper {
    width: 100%;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: #fff;
    pointer-events: none;
}

.gallery-item-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Lightbox */
.gallery-lightbox {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2600;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #000;
    transition: opacity 0.3s ease;
}

.gallery-lightbox.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(30px) brightness(0.4);
    z-index: -1;
    transition: background-image 0.5s ease;
}

.lightbox-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

/* Loading Spinner */
.lightbox-loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--accent-lava-glow, #FF4D4D);
    border-radius: 50%;
    position: absolute;
    animation: spin 1s linear infinite;
    z-index: 5;
}

/* Navigation Controls */
.lightbox-controls button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.2s, transform 0.1s;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}

/* Interaction States for Nav Buttons */
@media (hover: hover) {
    .lightbox-controls button:hover {
        background: var(--accent-lava-glow, #FF4D4D);
    }
}

.lightbox-controls button:active {
    background: var(--accent-lava-glow, #FF4D4D);
    transform: translateY(-50%) scale(0.9);
}

.lb-prev {
    left: 20px;
}

.lb-next {
    right: 20px;
}

/* Fixed Top-Right Close Button */
.lb-close-fixed {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.2s, transform 0.1s;
    z-index: 20;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .lb-close-fixed:hover {
        background: rgba(255, 77, 77, 0.5);
        transform: scale(1.1);
    }
}

.lb-close-fixed:active {
    background: rgba(255, 77, 77, 0.5);
    transform: scale(0.9);
}

/* Caption Pill */
.lightbox-caption-pill {
    position: absolute;
    bottom: 30px;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 90%;
    transition: all 0.3s ease;
    z-index: 15;
}

.lb-text {
    text-align: left;
}

.lb-title {
    margin: 0;
    font-size: 1rem;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
}

.lb-locate-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-canary-teal, #00C2A8);
    border: none;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.lb-locate-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: block;
    /* Ensure it renders */
}

@media (hover: hover) {
    .lb-locate-btn:hover {
        transform: scale(1.1);
        background: #fff;
    }
}

.lb-locate-btn:active {
    transform: scale(0.9);
    background: #fff;
}

/* Mobile Landscape Optimization (Short Screens) */
@media (max-height: 500px) {
    .lightbox-caption-pill {
        bottom: 10px;
        left: 10px;
        border-radius: 8px;
        background: linear-gradient(to right, rgba(0, 0, 0, 0.7), transparent);
        backdrop-filter: none;
        border: none;
        padding: 8px;
        gap: 10px;
    }

    .lb-title {
        font-size: 0.9rem;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    }

    .lb-locate-btn {
        width: 32px;
        height: 32px;
    }

    .lb-close-fixed {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }

    /* Adjust Nav buttons for landscape */
    .lb-prev {
        left: 10px;
    }

    .lb-next {
        right: 10px;
    }

    .lightbox-controls button {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* --- Audio Overlay (Variant B) --- */
.surf-spot-panel__hero-overlay.audio-overlay {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 6px 10px;
    /* Adjusted padding */
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0;
    /* Removed margin to align with other corner elements */
    pointer-events: auto;
    transition: transform 0.2s ease, background-color 0.2s ease;
    /* Ensure it doesn't block interaction underneath unless clicked */
    z-index: 20;
    /* Explicitly set position to align with design request */
    top: 0.25rem !important;
    left: 0.25rem !important;
}

.surf-spot-panel__hero-overlay.audio-overlay:hover {
    transform: scale(1.02);
    background: rgba(0, 0, 0, 0.85);
    border-color: var(--accent-lava-glow);
}

.track-overlay-card {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    max-width: 220px;
}

.track-overlay-art {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.track-overlay-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-overlay-play-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.track-overlay-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.track-overlay-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.track-overlay-artist {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Invisible button covering the card for interaction */
.play-track-btn-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
}

/* Reposition GPS Icon */
.surf-spot-panel__hero-overlay.bottom-left {
    top: auto;
    bottom: 0.25rem;
    left: 0.25rem;
}

/* Adjust alt names if GPS is bottom-left */
.surf-spot-panel__hero-overlay.shifted-right {
    left: 50px;
    /* Push right to avoid overlap with GPS icon */
}

/* Ensure play icon in overlay is white */
.track-overlay-play-icon .icon {
    fill: #fff;
}

/* --- Share UI --- */
.surf-spot-panel__hero-overlay.bottom-right {
    top: auto;
    bottom: 0.25rem;
    right: 0.25rem;
    left: auto;
    pointer-events: auto;
    /* Ensure button is clickable */
}

.share-trigger {
    /* Inherits .gps-link styles */
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.share-trigger svg {
    width: 16px;
    height: 16px;
}

.hero-share-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.hero-share-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.share-content {
    width: 90%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    color: #fff;
    animation: fadeIn 0.3s ease-out;
}

.share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.editor-lang-badge {
    color: rgba(240, 240, 240, 0.6);
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.02em;
}

.editor-lang-badge strong {
    color: var(--color-brand-secondary, #4dc2a8);
    font-weight: 600;
}

.editor-header h2 {
    padding-bottom: 0.5rem;
}

.share-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 1px;
}

.close-share-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-share-btn:hover {
    color: var(--accent-lava-glow);
}

.share-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.copy-url-btn {
    width: 100%;
    font-size: 0.9rem;
    padding: 0.8rem;
    max-width: none;
    /* Override cta-button max-width */
}

.qr-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.qr-controls {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 1rem;
}

.qr-option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    flex: 1;
}

.qr-option-group label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #aaa;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.color-picker {
    display: flex;
    gap: 0.5rem;
}

.color-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    padding: 0;
}

.color-btn.active {
    border-color: var(--accent-canary-teal);
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(0, 194, 168, 0.4);
}

.qr-preview-container {
    /* Checkerboard pattern for transparency visualization */
    background-image:
        linear-gradient(45deg, #ccc 25%, transparent 25%),
        linear-gradient(-45deg, #ccc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ccc 75%),
        linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-color: #fff;

    padding: 10px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.qr-preview-container canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.download-qr-btn {
    width: 100%;
    font-size: 0.8rem;
    padding: 0.6rem;
    background: transparent;
    border: 1px solid var(--accent-canary-teal);
    color: var(--accent-canary-teal);
    max-width: none;
    animation: none;
    /* Disable heartbeat */
    box-shadow: none;
}

.download-qr-btn:hover {
    background: var(--accent-canary-teal);
    color: #000;
    transform: scale(1.02);
}

.download-qr-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #555;
    color: #555;
    background: transparent;
}

/* --- Share UI Redesign --- */
.share-content {
    width: 340px;
    max-width: 90%;
    /* Card Style */
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    gap: 1.2rem;
}

.share-header {
    padding-bottom: 0.8rem;
    margin-bottom: 0;
    /* Reset */
}

.share-body {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* URL Input Group */
.share-url-group {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.share-url-group:focus-within {
    border-color: var(--accent-canary-teal);
}

.share-url-input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 0.8rem 1rem;
    width: 100%;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    outline: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-copy-btn {
    background: transparent;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-canary-teal);
    padding: 0 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.share-copy-btn:hover {
    background: rgba(0, 194, 168, 0.1);
}

.share-copy-btn.copied {
    background: var(--accent-canary-teal);
    color: #000;
}

.share-copy-btn svg {
    width: 18px;
    height: 18px;
}

/* QR Section - Compact Horizontal Layout */
.qr-compact-container {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}

.qr-canvas-wrapper {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    /* Checkerboard */
    background-image:
        linear-gradient(45deg, #ccc 25%, transparent 25%),
        linear-gradient(-45deg, #ccc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ccc 75%),
        linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    background-color: #fff;

    padding: 8px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.qr-canvas-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.qr-controls-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    justify-content: center;
    height: 140px;
    /* Match canvas height */
}

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

.qr-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #aaa;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.color-picker.mini {
    gap: 6px;
}

.color-picker.mini .color-btn {
    width: 20px;
    height: 20px;
    border-width: 1px;
}

.download-qr-btn.icon-only {
    width: 100%;
    margin-top: auto;
    /* Push to bottom */
    border-radius: 6px;
    padding: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-qr-btn.icon-only svg {
    width: 20px;
    height: 20px;
}

/* --- Share Redesign V2 --- */

/* Re-use trigger style for close button */
.share-close-toggle {
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    z-index: 150;
    /* Ensure it's above overlay */
}

.share-trigger-container {
    position: absolute;
    z-index: 150;
}

.share-trigger-container.bottom-right {
    bottom: 0.25rem;
    right: 0.25rem;
}

/* Color Pickers V2 */
.color-btn {
    /* Better visibility */
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.color-btn[data-color="#ffffff"] {
    border-color: #000;
    /* Black border for white button */
}

.color-btn[data-color="#000000"] {
    border-color: #fff;
    /* White border for black button */
}

.color-btn[data-color="transparent"] {
    border-color: #fff;
}

.color-btn.active {
    transform: scale(1.2);
    border: 2px solid var(--accent-canary-teal) !important;
    box-shadow: 0 0 10px rgba(0, 194, 168, 0.6);
}

/* --- Neon Button Style --- */
.color-btn[data-color="neon"] {
    background: url('images/qr-code-background.webp');
    background-size: cover;
    background-position: center;
    border-color: #000;
}