/* CSS Variables for OriginalColor Theme (now default) */
:root {
    --bg-primary: #03258C;
    --bg-secondary: rgba(3, 37, 140, 0.95);
    --text-primary: #F2D338;
    --text-secondary: #3DD9C9;
    --border-primary: #0D0D0D;
    --border-secondary: rgba(242, 211, 56, 0.2);
    --accent-primary: #3DD9C9;
    --accent-green: #3DD9C9;
    --accent-green-hover: #2BC7B5;
    --logo-asset: url('./assets/logo_fullcolor.webp');
    --bg-asset: url('./assets/BahiaFM_Color_background.webp');
    --footer-bg: #03258C; /* Colorful theme footer background */
    --footer-text: #F2D338; /* Colorful theme footer text */
}

/* Secondary (previous) theme */
body.theme-secondary {
    --bg-primary: #fff;
    --bg-secondary: rgba(255, 255, 255, 0.95);
    --text-primary: #111;
    --text-secondary: #666;
    --border-primary: #111;
    --border-secondary: #eee;
    --accent-primary: #007bff;
    --accent-green: #28a745;
    --accent-green-hover: #218838;
    --logo-asset: url('./assets/logo.webp');
    --bg-asset: url('./assets/BahiaFM_BW_background.webp');
    --footer-bg: #f8f9fa; /* Light theme footer background */
    --footer-text: #666;   /* Light theme footer text */
}

/* Ensure Font Awesome icons appear white */
.fa,
.fa-solid,
.fa-brands,
.fa-regular {
    color: #fff;
}

/* Apply theme variables to elements */
body {
    background: var(--bg-primary);
    background-image: var(--bg-asset);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-variation-settings: "ROND" 0;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation Styles */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
    z-index: 1000;
    box-sizing: border-box;
}

.nav-left .station-name {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-variation-settings: "ROND" 0;
}

.nav-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-right a {
    color: var(--text-primary);
    text-decoration: none;
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-variation-settings: "ROND" 0;
    transition: color 0.3s ease;
}

.nav-right a:hover {
    color: var(--accent-primary);
}

/* Social Media Icons */
.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.social-link:hover {
    color: var(--accent-primary);
    background-color: rgba(0, 123, 255, 0.1);
    transform: scale(1.1);
}

/* OriginalColor theme social hover */
body.theme-originalcolor .social-link:hover {
    background-color: var(--accent-primary);
    color: var(--border-primary);
}

.social-link svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.surf-btn {
    position: fixed;
    bottom: 70px;
    left: 20px;
    display: inline-block;
    padding: 0;
    border: 3px solid #000; /* 2px * 1.5 */
    border-radius: 12px;    /* 8px * 1.5 */
    background: #000;
    overflow: hidden;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.surf-btn:hover {
    transform: scale(1.05);
}

.surf-btn img {
    display: block;
    height: 48px; /* 32px * 1.5 */
    width: auto;
}

/* Share Dropdown Styles */
.share-container {
    position: relative;
    display: inline-block;
}

.share-btn {
    border: none;
    background: transparent;
    cursor: pointer;
}

.share-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--border-primary);
    color: var(--bg-primary);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 8px 0;
    margin-top: 8px;
}

.share-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--border-primary);
}

.share-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--bg-primary) !important;
    text-decoration: none;
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-variation-settings: "ROND" 0;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.share-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--bg-primary) !important;
}

/* Colorful theme share options */
body:not(.theme-secondary) .share-option {
    color: #F2D338 !important;
}

body:not(.theme-secondary) .share-option:hover {
    background-color: var(--accent-primary);
    color: var(--border-primary) !important;
}

.share-option svg {
    width: 16px;
    height: 16px;
    fill: var(--bg-primary) !important;
    flex-shrink: 0;
}

/* Colorful theme share option svg */
body:not(.theme-secondary) .share-option svg {
    fill: #F2D338 !important;
}

body:not(.theme-secondary) .share-option:hover svg {
    fill: var(--border-primary) !important;
}

.share-option span {
    flex: 1;
    color: var(--bg-primary) !important;
}

/* Colorful theme share option span */
body:not(.theme-secondary) .share-option span {
    color: #F2D338 !important;
}

body:not(.theme-secondary) .share-option:hover span {
    color: var(--border-primary) !important;
}

/* Animated Text Strip */
.animated-strip {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: 40px;
    background: var(--border-primary);
    color: var(--bg-primary);
    overflow: hidden;
    z-index: 999;
    display: flex;
    align-items: center;
.surf-btn {
    position: fixed;
    bottom: 70px;
    left: 20px;
    display: inline-block;
    border: 5px solid #000;      /* Thicker border */
    border-radius: 12px;         /* Rounded corners (optional) */
    padding: 4px;                /* Optional: space inside border */
    background: rgba(0,0,0,0.1); /* Optional: subtle background */
    transition: border-color 0.2s;
}
}

.scrolling-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.scrolling-message {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-variation-settings: "ROND" 0;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.initial-message {
    position: static;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-variation-settings: "ROND" 0;
    font-size: 14px;
    opacity: 1;
    color: var(--bg-primary);
    text-align: center;
    animation: pulse 2s ease-in-out infinite;
}

/* Scrolling text color for default (colorful) theme */
body:not(.theme-secondary) .initial-message {
    color: #F2D338;
}

body:not(.theme-secondary) .scrolling-message {
    color: #F2D338;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Main Content Styles */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 100px; /* 60px navbar + 40px animated strip */
    min-height: calc(100vh - 100px);
}

.player-container {
    text-align: center;
    padding: 40px;
    max-width: 400px;
    width: 100%;
}

/* Logo/Play Button Styles */
.station-logo {
    width: 300px; /* 150% of original 200px */
    height: 300px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    border: 4px solid var(--border-primary);
    /* Default paused state - translucent/dimmed */
    opacity: 0.4;
}

.station-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
    /* Brighten on hover to indicate it's clickable */
    opacity: 0.7;
}

@media (max-width: 768px) {
    .station-logo {
        width: 225px; /* 150% of original 150px */
        height: 225px;
    }
}

@media (max-width: 480px) {
    .station-logo {
        width: 180px; /* 150% of original 120px */
        height: 180px;
    }
}

/* Playing Animation */
@keyframes bump {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.playing {
    animation: bump 1s ease-in-out infinite;
    /* Remove dimming when playing - full opacity */
    opacity: 1 !important;
}

/* Controls Styles */
.controls {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.control-btn {
    background: var(--border-primary);
    color: var(--bg-primary);
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    font-variation-settings: "ROND" 0;
    transition: all 0.3s ease;
    min-width: 120px;
}


.control-btn i {
    font-size: 24px;
    color: #fff;
}

#mute-btn.muted {
    opacity: 0.5;
}

.control-btn:hover {
    background: var(--text-secondary);
    transform: translateY(-2px);
}

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

/* Install Button Styles */
.install-btn {
    background: var(--accent-green);
    color: var(--bg-primary);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    font-variation-settings: "ROND" 0;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-left: 10px;
}

.install-btn:hover {
    background: var(--accent-green-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* OriginalColor theme install button */
body.theme-originalcolor .install-btn {
    color: var(--border-primary);
}

body.theme-originalcolor .install-btn:hover {
    box-shadow: 0 2px 8px var(--accent-primary);
}

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

.install-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

/* Accessibility focus styles */
.control-btn:focus-visible,
.share-btn:focus-visible,
.theme-toggle:focus-visible {
    outline: 2px solid var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(61, 217, 201, 0.5);
}

#volume-slider:focus-visible {
    outline: 2px solid var(--accent-primary);
}

/* Volume Container */
.volume-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 200px;
}

/* Volume Percentage Display */
.volume-percentage {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    font-variation-settings: "ROND" 0;
    text-align: center;
    min-width: 40px;
    transition: color 0.3s ease;
}

.volume-percentage.muted {
    color: #dc3545;
}

.volume-percentage.high {
    color: var(--accent-green);
}

#volume-slider {
    width: 100%;
    height: 5px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #111;
    cursor: pointer;
    transition: all 0.3s ease;
}

#volume-slider::-webkit-slider-thumb:hover {
    background: #333;
    transform: scale(1.1);
}

#volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #111;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

/* Status Information */
.status-info {
    margin-top: 30px;
}

#status-text {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

#now-playing {
    font-size: 1rem;
    color: #666;
    font-style: italic;
}

/* Footer Styles */
/* Footer Styles */
.footer {
    background: var(--footer-bg);
    text-align: center;
    padding: 20px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.footer p {
    margin: 0;
    color: var(--footer-text);
    font-size: 0.9rem;
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-variation-settings: "ROND" 0;
}

.footer a {
    color: var(--footer-text);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Font Weight Utilities */
.doto-light {
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
    font-variation-settings: "ROND" 0;
}

.doto-regular {
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-variation-settings: "ROND" 0;
}

.doto-medium {
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    font-variation-settings: "ROND" 0;
}

.doto-semibold {
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    font-variation-settings: "ROND" 0;
}

.doto-bold {
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-variation-settings: "ROND" 0;
}

.doto-extrabold {
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 800;
    font-style: normal;
    font-variation-settings: "ROND" 0;
}

.doto-black {
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 900;
    font-style: normal;
    font-variation-settings: "ROND" 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 0 15px;
        height: 50px;
    }
    
    .nav-left .station-name {
        font-size: 1.2rem;
    }
    
    .nav-right {
        gap: 15px;
    }
    
    .nav-right a {
        font-size: 0.9rem;
    }
    
    /* Share dropdown mobile adjustments */
    .share-dropdown {
        right: 0;
        min-width: 200px;
        max-width: calc(100vw - 30px);
    }
    
    .share-option {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .share-option i {
        font-size: 1.1rem;
        margin-right: 10px;
    }
    
    .main-content {
        padding-top: 50px;
        min-height: calc(100vh - 50px);
    }
    
    .player-container {
        padding: 20px;
    }
    
    .station-logo {
        width: 225px; /* 150% of original 150px */
        height: 225px;
    }
}

@media (max-width: 480px) {
    .nav-right {
        gap: 10px;
    }
    
    .nav-right a {
        font-size: 0.8rem;
    }
    
    /* Share dropdown small mobile adjustments */
    .share-dropdown {
        min-width: 180px;
        font-size: 0.85rem;
    }
    
    .share-option {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .share-option i {
        font-size: 1rem;
        margin-right: 8px;
    }
    
    .station-logo {
        width: 180px; /* 150% of original 120px */
        height: 180px;
    }
    
    .player-container {
        padding: 15px;
    }
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Error State */
.error {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 5px;
    margin-top: 20px;
}

/* Success State */
.success {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 5px;
    margin-top: 20px;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 1001;
    background: linear-gradient(45deg, #03258C, #3DD9C9, #F2D338, #0D0D0D);
    background-size: 400% 400%;
    animation: gradientShift 4s ease infinite;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
}


.theme-toggle i {
    font-size: 24px;

}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

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

/* Gradient animation for theme toggle button */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Colorful theme toggle button */
body:not(.theme-secondary) .theme-toggle {
    background: linear-gradient(45deg, #ffffff, #888888, #333333, #000000);
    background-size: 400% 400%;
    animation: gradientShift 2s ease infinite, rotateIcon 0.5s ease;
    color: #000;
}

@keyframes rotateIcon {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* TODO: Add custom styles for different themes */
/* TODO: Add animations for better user experience */
/* TODO: Add dark mode support */
