/**
 * ====================================
 * SUPERMUSIC.SK - MODERN DESIGN 2026
 * ====================================
 *
 * Unified CSS for all pages:
 * - index.php (Homepage)
 * - skupina.php (Artist page)
 * - piesen.php (Song/Chords page)
 *
 * Design inspiration: Spotify, RateYourMusic, Genius
 * Last updated: 2025-10-03
 */


/* ====================================
   1. CSS VARIABLES & THEME
   ==================================== */

:root {
    /* Colors - Dark Theme */
    --primary-bg: #0f0f0f;
    --secondary-bg: #1a1a1a;
    --card-bg: #222;
    --border-color: #333;
    --text-primary: #fff;
    --text-secondary: #aaa;

    /* Accent Colors */
    --accent-color: #e74c3c;
    --accent-hover: #c0392b;
    --success-color: #27ae60;
    --chord-color: #3498db;
    --warning-color: #f39c12;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Layout */
    --header-height: 60px;
    --border-radius: 8px;
    --max-width: 1400px;

    /* Animations */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}


/* ====================================
   2. RESET & BASE STYLES
   ==================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}


/* ====================================
   3. HEADER & NAVIGATION
   ==================================== */

.header-container {
    background: var(--secondary-bg);
    border-bottom: 2px solid var(--border-color);
    position: -webkit-sticky; /* Safari fallback */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

/* AdSense anchor ad fix - keep sticky but shift below Google anchor ad */
body[style*="padding-top"] .header-container {
    /* top is set dynamically by JS MutationObserver */
}

.header-top {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.6rem var(--spacing-md);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--spacing-md);
}

/* Left Navigation */
.left-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.logo h1 {
    margin: 0;
}

.logo img {
    height: 32px;
    width: auto;
}

.left-nav nav ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
    margin: 0;
    padding: 0;
}

.left-nav nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    position: relative;
}

.left-nav nav a:hover {
    color: var(--accent-color);
    background: rgba(231, 76, 60, 0.1);
}

.left-nav nav a.active {
    color: #ffffff;
    background: var(--accent-color);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
    transform: translateY(-1px);
}

.left-nav nav a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--accent-color);
}

/* Center Search */
.search-form {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    width: 100%;
}

.search-form input {
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    flex: 1;
    transition: var(--transition);
}

.search-form input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.search-form input::placeholder {
    color: #666;
}

.search-form button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.search-form button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* Search Wrapper for Autocomplete */
.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    justify-self: center; /* Center in grid cell */
    grid-column: 2; /* Explicitly place in middle column */
}

/* Search Suggestions Dropdown */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.search-suggestions.active {
    display: block;
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover,
.search-suggestion-item.selected {
    background: var(--accent-color);
    color: white;
}

.search-suggestion-item img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 12px;
    background: var(--primary-bg);
}

.search-suggestion-info {
    flex: 1;
    overflow: hidden;
}

.search-suggestion-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-suggestion-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.search-suggestion-item:hover .search-suggestion-meta,
.search-suggestion-item.selected .search-suggestion-meta {
    color: rgba(255, 255, 255, 0.8);
}

.search-suggestions-footer {
    padding: 10px 15px;
    text-align: center;
    background: var(--primary-bg);
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.search-suggestions-footer a {
    color: var(--accent-color);
    font-weight: 600;
}

.search-suggestions-footer a:hover {
    text-decoration: underline;
}

/* Search section labels (Interpreti, Piesne) */
.search-section-label {
    padding: 8px 15px 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: var(--primary-bg);
    border-bottom: 1px solid var(--border-color);
    letter-spacing: 0.5px;
}

/* Song items in suggestions */
.search-suggestion-song {
    background: rgba(var(--accent-rgb, 52, 152, 219), 0.03);
}

.search-suggestion-song .song-type-icon {
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    background: var(--primary-bg);
    border-radius: 4px;
    flex-shrink: 0;
}

/* Search suggestions - popular section */
.search-suggestions-popular {
    border-bottom: 1px solid var(--border-color);
    padding: 4px 0;
}

.search-suggestions-popular-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 6px 15px 2px;
    letter-spacing: 0.5px;
}

.search-suggestion-popular-item .popular-icon {
    font-size: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Popular searches tag cloud (homepage widget) */
.popular-searches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-height: 34px;
}

.popular-searches.ticker-active {
    flex-wrap: nowrap;
    overflow: hidden;
}

.search-tag.pop-in {
    animation: popIn 0.2s ease-out both;
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.search-tag.fade-out {
    animation: fadeOut 0.2s ease-in both;
}

@keyframes fadeOut {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.8); }
}

.search-tag {
    padding: 6px 14px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.search-tag:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.search-tag-count {
    font-size: 0.8em;
    opacity: 0.5;
    margin-left: 4px;
}

/* Right Navigation */
.right-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.right-nav nav ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
    margin: 0;
    padding: 0;
}

.right-nav nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    position: relative;
}

.right-nav nav a:hover {
    color: var(--accent-color);
    background: rgba(231, 76, 60, 0.1);
}

.right-nav nav a.active {
    color: #ffffff;
    background: var(--accent-color);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
    transform: translateY(-1px);
}

.right-nav nav a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--accent-color);
}

/* Dropdown Menu */
.desktop-nav li.dropdown {
    position: relative;
}

/* Invisible bridge to prevent menu from closing */
.desktop-nav li.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
    display: none;
}

.desktop-nav li.dropdown:hover::after {
    display: block;
}

.desktop-nav .dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    min-width: 200px;
    z-index: 1001;
    padding: 0.5rem 0;
}

.desktop-nav li.dropdown:hover .dropdown-menu {
    display: block;
}

.desktop-nav .dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    border-radius: 0;
}

.desktop-nav .dropdown-menu a:hover {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-color);
}

/* Language Picker - Dropdown */
.lang-picker {
    position: relative;
    margin-right: 8px;
}

.lang-picker-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.lang-picker-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.lang-picker-btn i {
    font-size: 13px;
}

.lang-picker-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1500;
    min-width: 50px;
    overflow: hidden;
}

.lang-picker.open .lang-picker-dropdown {
    display: block;
}

.lang-picker-dropdown a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    transition: var(--transition);
    letter-spacing: 0.5px;
    text-align: center;
}

.lang-picker-dropdown a:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}

.lang-picker-dropdown a.active {
    color: var(--accent-color);
    background: rgba(231, 76, 60, 0.1);
}

/* Mobile Language Picker (inside mobile menu) */
.mobile-lang-picker {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 1rem 1.5rem;
}

.mobile-lang-picker a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.mobile-lang-picker a:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}

.mobile-lang-picker a.active {
    color: var(--accent-color);
    background: rgba(231, 76, 60, 0.15);
    border-color: var(--accent-color);
}

/* User Button */
.user-button {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.user-button:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: scale(1.1);
}

/* User button when logged in - green indicator */
.user-button.user-logged-in {
    border-color: #27ae60;
    color: #27ae60;
}

.user-button.user-logged-in:hover {
    background: #27ae60;
    color: white;
    border-color: #27ae60;
}

.user-nick {
    font-size: 14px;
    font-weight: 500;
    margin-left: 5px;
}

/* User Dropdown Menu */
.user-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background: var(--secondary-bg);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.user-menu-nick {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.user-menu-email {
    font-size: 12px;
    color: var(--text-secondary);
}

.user-menu-items {
    padding: 8px 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text-primary);
    transition: background 0.2s ease;
    cursor: pointer;
}

.user-menu-item:hover {
    background: var(--secondary-bg);
}

.user-menu-item.logout {
    color: var(--accent-color);
    border-top: 1px solid var(--border-color);
}

.user-menu-item.logout:hover {
    background: rgba(231, 76, 60, 0.1);
}

.user-menu-icon {
    margin-right: 10px;
    font-size: 16px;
}

.right-nav {
    position: relative;
}

/* Hamburger Menu Button (Mobile Only) */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-btn span {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -280px; /* Hide off-screen (exact width) */
    width: 280px;
    height: 100vh;
    background: var(--secondary-bg);
    z-index: 2000;
    transition: left 0.3s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.5);
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-content {
    padding: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--primary-bg);
}

.mobile-menu-header .close-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.mobile-menu-header .close-btn:hover {
    color: var(--accent-color);
    transform: rotate(90deg);
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav li {
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.mobile-nav a i {
    width: 24px;
    text-align: center;
    color: var(--accent-color);
}

.mobile-nav a:hover {
    background: var(--primary-bg);
    color: var(--accent-color);
}

.mobile-nav a.active {
    background: var(--accent-color);
    color: #ffffff;
    font-weight: 700;
    border-left: 4px solid #ffffff;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.mobile-nav a.active i {
    color: #ffffff;
}

/* Mobile Menu Separator */
.mobile-nav .menu-separator {
    height: 8px;
    background: var(--primary-bg);
    border-bottom: 1px solid var(--border-color);
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Hide mobile menu on desktop (min-width: 993px) */
@media (min-width: 993px) {
    .mobile-menu,
    .mobile-menu-backdrop {
        display: none !important;
    }
}


/* ====================================
   4. LAYOUT & CONTAINERS
   ==================================== */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-sm);
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

/* Two-column layout for artist/song pages */
.content-grid-sidebar {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--spacing-lg);
}


/* ====================================
   5. CARDS & COMPONENTS
   ==================================== */

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.2);
    border-color: var(--accent-color);
}

.card-content {
    padding: var(--spacing-md);
}


/* ====================================
   6. SECTION TITLES
   ==================================== */

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--accent-color);
    border-radius: 2px;
}


/* ====================================
   7. FEATURED BANNER (Homepage)
   ==================================== */

.featured-banner-container {
    position: relative;
    margin-bottom: var(--spacing-lg);
}

.featured-banner {
    display: flex;
    gap: var(--spacing-md);
    height: 144px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.featured-banner::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.featured-banner a {
    flex: 0 0 calc(25% - var(--spacing-sm));
    min-width: 200px;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    display: block;
}

.featured-banner img {
    width: 100%;
    height: 100%;
    max-height: 180px;
    object-fit: cover;
    object-position: center;
    border-radius: var(--border-radius);
    transition: var(--transition);
    filter: brightness(0.7) contrast(1.1);
}

.featured-banner a:hover img {
    transform: scale(1.1);
    filter: brightness(0.9) contrast(1.1);
}

.featured-banner a:hover {
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.4);
}

/* Carousel Arrow */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    z-index: 10;
}

.carousel-arrow:hover {
    background: var(--accent-hover);
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow.left {
    left: -20px;
}

.carousel-arrow.right {
    right: -20px;
}

/* Genre-card style inside featured-banner (TOP artists carousel) */
.featured-banner .genre-card {
    flex: 0 0 208px;
    min-height: 100%;
}

/* Hide scrollbar in carousels */
.featured-banner::-webkit-scrollbar {
    display: none;
}

.featured-banner {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}


/* ====================================
   8. GENRE CARDS
   ==================================== */

.genre-card {
    position: relative;
    padding: 2rem 1rem;
    text-align: center;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.genre-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 100%);
    transition: var(--transition);
}

.genre-card:hover::before {
    background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 100%);
}

.genre-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--accent-color);
    box-shadow: 0 12px 24px rgba(0,0,0,0.5);
}

.genre-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.genre-card span {
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}


/* ====================================
   9. NEWS CAROUSEL
   ==================================== */

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-lg);
}

.carousel-main {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel-main::-webkit-scrollbar {
    display: none;
}

.carousel-main .card {
    flex: 0 0 calc(33.333% - var(--spacing-md));
    min-width: 280px;
}

.news-card {
    position: relative;
    height: 350px;
}

.news-card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: center;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    background: var(--secondary-bg);
}

.news-card-content {
    padding: var(--spacing-md);
}

.news-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-card-meta {
    display: flex;
    gap: var(--spacing-md);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.news-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}


/* ====================================
   10. SONGS GRID
   ==================================== */

.songs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.song-card {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
}

.song-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
    background: var(--secondary-bg);
}

.song-info {
    flex: 1;
}

.song-artist {
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.2rem;
}

.song-title {
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.song-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}


/* ====================================
   11. ARTIST PAGE - HEADER
   ==================================== */

.artist-header {
    position: relative;
    height: 200px;
    background-size: cover;
    background-position: center 30%;
}

.artist-header-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-lg);
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
}

.artist-name {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: var(--spacing-sm);
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.artist-name a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

.artist-name a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.artist-genre {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.artist-stats {
    display: flex;
    gap: var(--spacing-lg);
    font-size: 0.95rem;
}

.artist-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.artist-stats .stat-number {
    font-weight: 700;
    color: var(--accent-color);
}

/* Official Web button in artist header - top right corner */
.official-web-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.5rem;
    background: #1e90ff;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.official-web-btn:hover {
    background: #0078e7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    color: #fff;
}

.official-web-btn i {
    font-size: 0.75rem;
}

/* Song name in artist header (mobile only) */
.song-name-mobile {
    display: none;  /* Hidden on desktop */
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.25rem;
    font-weight: 400;
}


/* ====================================
   12. TABS NAVIGATION
   ==================================== */

.tabs {
    background: var(--secondary-bg);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: var(--header-height);
    z-index: 100;
}

.tabs-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    overflow-x: auto;
    scrollbar-width: thin;
}

.tab {
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.tab:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.tab-badge {
    display: inline-block;
    margin-left: 0.3rem;
    padding: 0.1rem 0.4rem;
    background: var(--accent-color);
    color: white;
    border-radius: 10px;
    font-size: 0.75rem;
}

/* Song type icons in tabs */
.tab .song-icons {
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
}

.tab .song-icon {
    min-width: 40px;
    height: 20px;
    padding: 0.1rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    line-height: 16px;
    text-align: center;
    transition: var(--transition);
    vertical-align: middle;
    margin-left: 4px;
    cursor: pointer;
}

.tab .song-icon sub {
    font-size: 0.65rem;
    font-weight: 600;
    margin-left: 1px;
}

.tab .song-icon:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.tab .song-icon.active {
    box-shadow: 0 0 0 2px rgba(255,255,255,0.5);
}


/* ====================================
   13. SONG LIST (Artist Page)
   ==================================== */

.songs-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.song-item {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1rem;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 1rem;
    align-items: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.song-item:hover {
    background: #333;
}

.song-number {
    font-size: 0.9rem;
    color: var(--text-secondary);
    width: 30px;
}

.song-title-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.song-title-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.song-icons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.song-icon {
    min-width: 26px;
    height: 26px;
    padding: 0 4px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.song-icon sub {
    font-size: 0.65rem;
    margin-left: 1px;
}

.song-icon.chord {
    background: #1a1a1a;
    border: 1px solid #666;
}

.song-icon.text {
    background: #1a1a1a;
    border: 1px solid #666;
}

.song-icon.tab {
    background: #1a1a1a;
    border: 1px solid #666;
}

.song-icon.translation {
    background: #1a1a1a;
    border: 1px solid #666;
}

.song-icon.video {
    background: #1a1a1a;
    border: 1px solid #666;
}

.song-icon.notes {
    background: #1a1a1a;
    border: 1px solid #666;
}

.song-icon:hover {
    transform: scale(1.15);
    filter: brightness(1.2);
}

/* Override .chord:hover for song icons */
.song-icon.chord:hover {
    color: white;
    text-decoration: none;
}

.song-rating {
    display: flex;
    gap: 0.2rem;
}

.star {
    color: var(--warning-color);
    font-size: 1rem;
}


/* ====================================
   14. ALPHABET FILTER
   ==================================== */

.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: var(--spacing-lg);
}

.alphabet-filter a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.alphabet-filter a:hover,
.alphabet-filter a.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}


/* ====================================
   15. SONG PAGE - HEADER
   ==================================== */

.song-header {
    background: var(--secondary-bg);
    border-bottom: 2px solid var(--border-color);
    padding: var(--spacing-lg);
}

.song-header-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 560px;
    gap: var(--spacing-xl);
    align-items: start;
}

.song-header-left {
    min-width: 0;
}

.song-header-right {
    position: relative;
}

.song-header-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.song-header-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive: stack vertically on smaller screens */
@media (max-width: 1200px) {
    .song-header-content {
        grid-template-columns: 1fr;
    }

    .song-header-right {
        max-width: 700px;
        margin: var(--spacing-lg) auto 0;
    }
}

.song-header .song-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: var(--spacing-sm);
}

.song-header .song-artist {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.song-artist a {
    color: var(--accent-color);
    text-decoration: none;
}

.song-artist a:hover {
    text-decoration: underline;
}

/* Favorite icon in song header */
.favorite-icon {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.95em;
    cursor: pointer;
    color: #555;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.favorite-icon:hover {
    transform: scale(1.2);
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.favorite-icon.disabled {
    cursor: default;
}

.favorite-icon.disabled:hover {
    transform: none;
    color: #555;
    text-shadow: none;
}

.favorite-icon.active {
    color: #ffd700;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

.song-meta {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.song-meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.song-credits {
    margin-top: var(--spacing-md);
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.song-credits span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.song-versions {
    margin-top: var(--spacing-md);
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.9rem;
    padding: var(--spacing-sm);
    border: 2px solid #27ae60;
    border-radius: 8px;
    background: rgba(39, 174, 96, 0.1);
}

.version-btn {
    padding: 0.4rem 0.8rem;
    background: var(--card-bg);
    border: 1px solid #27ae60;
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: var(--transition);
}

.version-btn:hover {
    background: #27ae60;
    color: white;
    border-color: #27ae60;
}


/* ====================================
   16. TOOLBAR (Song Page)
   ==================================== */

.toolbar {
    background: var(--card-bg);
    position: sticky;
    top: var(--header-height);
    z-index: 100;
}

.toolbar-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.toolbar-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--secondary-bg);
    color: var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.toolbar-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.toolbar-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
}


/* ====================================
   17. CHORD DISPLAY
   ==================================== */

/* Chord Schemes Grid */
.chord-schemes {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    border: 1px solid var(--border-color);
    margin-bottom: var(--spacing-lg);
}

.chord-schemes h3 {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.chord-schemes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

/* Chord Schemes Toolbar Wrapper */
.chord-schemes-toolbar {
    background: transparent !important;
    position: static;
    top: auto;
}

.chord-schemes-toolbar.hidden {
    display: none;
}

.chord-schemes-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

/* Toolbar Actions (right side of chord bar) */
.toolbar-actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    flex-shrink: 0;
    padding-left: 1rem;
    padding-top: 5px;
}

/* Vertical Transpose Controls */
.transpose-controls-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.35rem;
    background: transparent;
    border: none;
    min-width: 60px;
    align-items: center;
    justify-content: center;
}

.transpose-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--accent-color);
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.transpose-btn:hover {
    background: rgba(255, 165, 0, 0.1);
    transform: scale(1.05);
}

.transpose-btn:active {
    transform: scale(0.95);
}

.transpose-reset {
    background: transparent;
    color: var(--text-secondary);
}

.transpose-reset:hover {
    background: rgba(255, 165, 0, 0.1);
    color: var(--accent-color);
}

.transpose-info-vertical {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 600;
}

/* Responsive - stack horizontally on mobile */
@media (max-width: 768px) {
    /* GLOBAL: Edge-to-edge mobile design - zero side padding */
    .container {
        padding: 0;
        margin: 0 auto;
    }

    body {
        padding: 0;
        margin: 0;
        overflow-x: hidden;
        /* Safe area padding for notch devices (iPhone X+) */
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    /* Edge-to-edge song text and chords on mobile (like Ultimate Guitar) */
    .song-text,
    .chord-text {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        margin-left: 0;
        margin-right: 0;
    }

    /* Regular text content keeps minimal padding */
    .article-content,
    .forum-post,
    p:not(.no-padding) {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Cards and sections get minimal padding */
    .card,
    .section,
    .post-item {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    /* Chord container edge-to-edge on mobile */
    .chord-container {
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;  /* Remove top border */
        padding: 0 0.75rem;  /* Remove top/bottom padding */
        margin: 0;
        background: transparent;  /* Remove background */
    }

    .chord-schemes-wrapper {
        flex-direction: column;
    }

    .transpose-controls-vertical {
        flex-direction: row;
        border: none;
        min-width: auto;
        width: 100%;
    }

    .transpose-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .transpose-info-vertical {
        margin-top: 0;
        margin-left: 0.5rem;
        display: flex;
        align-items: center;
    }
}

/* Horizontal chord schemes under toolbar */
.chord-schemes-horizontal {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    background: var(--primary-bg);
    border: none;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--primary-bg);
    flex: 1;
    align-items: center;
}

.chord-schemes-horizontal::-webkit-scrollbar {
    height: 8px;
}

.chord-schemes-horizontal::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

.chord-schemes-horizontal::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

.chord-schemes-horizontal .chord-svg-container {
    flex-shrink: 0;
    width: 70px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.35rem;
}

/* Song Header Toolbar Inline (collapsible with chords) */
.song-header-toolbar-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--secondary-bg);
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}

/* Full-width Menu Toggle Button */
.menu-toggle {
    width: 100%;
    padding: 0.6rem 1rem;
    background: #e74c3c;
    border: none;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.menu-toggle:hover {
    background: #c0392b;
}

.chord-schemes-horizontal.hidden {
    display: none;
}
    background: #e74c3c;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin: 0.5rem;
}

.chord-schemes-show:hover {
    background: #c0392b;
    color: #fff;
}

.chord-scheme-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-primary);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.chord-scheme-item:hover {
    border-color: var(--chord-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.chord-scheme-item img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* SVG Chord Container */
.chord-svg-container {
    min-height: 100px;
    max-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.chord-svg-container svg {
    max-width: 100%;
    height: auto;
    max-height: 90px;
}

.chord-svg-label {
    margin-top: var(--spacing-sm);
    font-weight: bold;
    font-size: 0.9rem;
    color: #fff;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Version Tabs (Excel-like) */
.version-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding-left: 10px;
}

.version-tab {
    padding: 4px 12px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px 6px 0 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
    margin-right: 2px;
    margin-bottom: -1px;
}

.version-tab:hover {
    background: var(--card-bg);
    color: var(--text-primary);
}

.version-tab.active {
    background: #fff3b0;
    color: #1a1a1a;
    font-weight: 600;
    border-bottom-color: #fff3b0;
}

/* Sidebar Tabs (Excel-like) */
.sidebar-tabs {
    display: flex;
    padding-left: 10px;
}

.sidebar-tab {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    color: #888;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: -1px;
}

.sidebar-section-tabbed {
    border-top-left-radius: 0;
    margin-top: calc(-1 * var(--spacing-lg));
}

.chord-container {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border-top-left-radius: 0;
    padding: var(--spacing-lg);
    border: 1px solid var(--border-color);
    max-width: 100%;
    overflow-x: auto;
    position: relative;
    z-index: 1;
}

/* Compact Song Info Bar */
.song-info-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 0 0 15px 0;
    margin-bottom: 15px;
    background: none;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.info-bar-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    flex: 1;
}

/* Hidden on desktop, shown on mobile */
.info-bar-toggle-mobile {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 4px;
}

.info-bar-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 8px;
}

.info-bar-artist {
    color: var(--accent-color);
    text-decoration: none;
}

.info-bar-artist:hover {
    text-decoration: underline;
}

.info-bar-separator {
    color: var(--text-secondary);
}

.info-bar-song {
    color: var(--text-primary);
}

.info-bar-favorite {
    cursor: pointer;
    font-size: 1.1em;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.info-bar-favorite:hover,
.info-bar-favorite.active {
    color: #f1c40f;
}

.info-bar-item {
    color: var(--text-secondary);
    white-space: nowrap;
}

.info-bar-rank {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.info-bar-rank:hover {
    text-decoration: underline;
}

.info-bar-hitparada {
    color: #fff !important;
    background: linear-gradient(135deg, #2c3e50, #1a5276);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8em;
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s;
}

.info-bar-hitparada:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26, 82, 118, 0.5);
    text-decoration: none;
}

.info-bar-rating {
    color: #f1c40f;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.info-bar-rating .rating-stars {
    display: inline-flex;
    gap: 1px;
    line-height: 1;
}

.info-bar-rating .rating-star {
    cursor: pointer;
    font-size: 1.05em;
    color: #888;
    transition: color 0.12s, transform 0.12s;
    padding: 0 1px;
}

.info-bar-rating .rating-star.filled {
    color: #f1c40f;
}

.info-bar-rating .rating-star:hover,
.info-bar-rating .rating-star.hover-preview {
    color: #ffd633;
    transform: scale(1.18);
}

/* Hover behaviour: stars before the hovered one get filled preview */
.info-bar-rating .rating-stars:hover .rating-star {
    color: #555;
}

.info-bar-rating .rating-stars .rating-star.hover-preview,
.info-bar-rating .rating-stars .rating-star.hover-preview ~ .rating-star {
    color: #555;
}

.info-bar-rating .rating-stars:hover .rating-star.hover-preview,
.info-bar-rating .rating-stars .rating-star.hover-preview {
    color: #ffd633;
}

.info-bar-rating .rating-value {
    font-weight: 600;
    color: #f1c40f;
}

.info-bar-rating .rating-count {
    color: var(--text-secondary);
    font-size: 0.85em;
}

.info-bar-rating .rating-cta {
    color: var(--accent-color, #4fc3f7);
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
}

.info-bar-rating-empty .rating-stars .rating-star {
    color: #555;
}

.info-bar-rating .rating-user-badge {
    color: #2ecc71;
    font-size: 0.85em;
    font-weight: bold;
}

.info-bar-rating.just-voted .rating-stars {
    animation: rating-pulse 0.5s ease-out;
}

@keyframes rating-pulse {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}

.info-bar-contributor {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    text-decoration: none;
}

.info-bar-contributor:hover {
    color: var(--accent-color);
}

.info-bar-note {
    font-style: italic;
    color: var(--text-secondary);
    flex-basis: 100%;
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 4px 0;
}

.info-bar-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.info-bar-more {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 8px;
}

.info-bar-more:hover {
    color: var(--accent-color);
}

.info-bar-extra {
    display: none;
    width: 100%;
    gap: 15px;
    padding-top: 10px;
    margin-top: 8px;
    border-top: 1px dashed var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.song-info-bar.expanded .info-bar-extra {
    display: flex;
    flex-wrap: wrap;
}

.song-info-bar.expanded .info-bar-more {
    content: '▲';
}

/* Sheet Music (ABC Notation) Section */
.sheet-music-section {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.sheet-music-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}
.sheet-music-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}
.sheet-music-controls {
    display: flex;
    gap: 6px;
}
#sheetMusicContent {
    padding: 10px;
    overflow-x: auto;
}
#abcNotationRender {
    max-width: 100%;
    color: #000;
    background: #fff;
    border-radius: 6px;
    padding: 8px;
}
#abcNotationRender svg {
    max-width: 100%;
    height: auto;
}
@media (max-width: 768px) {
    .sheet-music-header {
        flex-wrap: wrap;
        gap: 6px;
    }
    #sheetMusicContent {
        padding: 5px;
    }
}

.chord-text-wrapper {
    position: relative;
}

.chord-text {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.8;
    white-space: pre-wrap;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Floating text controls - top right of song text */
.text-controls-float {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 4px;
    z-index: 10;
    opacity: 0.7;
}

.text-controls-float:hover {
    opacity: 1;
}

.text-control-btn {
    width: 36px;
    height: 36px;
    background: var(--card-bg);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--text-primary);
}

.text-control-btn:hover {
    background: var(--accent-color);
    color: #000;
    transform: scale(1.1);
    background: var(--accent-color);
    border-color: var(--accent-color);
}

@media (max-width: 768px) {
    .text-controls-float {
        position: fixed !important;
        top: auto !important;
        bottom: 50px !important;
        right: 20px !important;
        left: auto !important;
        opacity: 0.9;
        z-index: 1000;
    }

    .text-control-btn {
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }
}

.chord-text sup {
    vertical-align: super;
    font-size: 1.4em;
    line-height: 0;
    color: #f1c40f;
}

.chord {
    color: #f1c40f;
    font-weight: bold;
    font-style: italic;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    padding: 0 2px;
    -webkit-user-select: none; /* Safari */
    user-select: none;
}

.chord:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Transpose Display */
.transpose-info {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid var(--chord-color);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: var(--chord-color);
}

/* Chord Popup */
.chord-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--secondary-bg);
    border: 2px solid var(--chord-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.chord-popup.show {
    display: block;
}

.chord-diagram {
    text-align: center;
}

.chord-diagram h3 {
    margin-bottom: var(--spacing-md);
    color: var(--chord-color);
}

.chord-diagram pre {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    line-height: 1.4;
}


/* ====================================
   18. RATING SECTION (Sidebar)
   ==================================== */

/* Rating item container (vľavo label, vpravo rating) */
.song-info-rating {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.song-info-rating .info-label {
    flex-shrink: 0;
    min-width: 120px;
}

/* Rating wrapper - inline vpravo od labelu */
.rating-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

/* Compact rating stars for sidebar */
.rating-stars {
    display: flex;
    justify-content: flex-end;
    gap: 0.25rem;
    margin: 0;
}

.star {
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.star:hover {
    transform: scale(1.15);
}

.star.filled {
    color: var(--warning-color);
}

.star.empty {
    color: #555;
}

.rating-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: right;
}


/* ====================================
   19. COMMENTS SECTION
   ==================================== */

.comments-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    border: 1px solid var(--border-color);
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
}

.comment {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.comment:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.comment-author {
    font-weight: 700;
}

.comment-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.comment-text {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.comment-card {
    max-width: 100%;
    overflow: hidden;
}

.comment-reply {
    max-width: 100%;
    overflow: hidden;
}


/* ====================================
   20. SIDEBAR
   ==================================== */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Sticky sidebar for artist/song pages */
.sidebar.sticky {
    position: sticky;
    top: 70px;
    height: fit-content;
}

.sidebar-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 12px;
    margin-bottom: 0;
    border: 1px solid var(--border-color);
    max-height: 600px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--card-bg);
}

.sidebar-section::-webkit-scrollbar {
    width: 8px;
}

.sidebar-section::-webkit-scrollbar-track {
    background: var(--card-bg);
}

.sidebar-section::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

/* Similar Artists Styles */
.similar-artists-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.similar-artist-item {
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.similar-artist-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
    transform: translateX(4px);
}

.similar-artist-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.similar-artist-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.similar-artist-link:hover .similar-artist-name {
    color: var(--accent-color);
}

.similar-artist-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.widget {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--accent-color);
}


/* ====================================
   21. TOP SONGS LIST (Sidebar)
   ==================================== */

#topSongsContainer {
    max-height: 60vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.top-song {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    margin-bottom: 0.3rem;
}

.top-song:hover {
    background: rgba(255,255,255,0.05);
}

.top-song.active {
    background: linear-gradient(90deg, rgba(46, 204, 113, 0.25), rgba(46, 204, 113, 0.1));
    border-left: 4px solid #2ecc71;
    padding-left: calc(0.6rem - 4px);
    position: relative;
}

.top-song.active::before {
    content: "▶";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: #2ecc71;
    opacity: 0.8;
}

.top-song.active .top-song-number {
    color: #2ecc71;
    font-weight: 700;
}

.top-song.active .top-song-title {
    color: #2ecc71;
    font-weight: 600;
}

.top-song-number {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    width: 24px;
    flex-shrink: 0;
}

.top-song-info {
    flex: 1;
    min-width: 0;
}

.top-song-title {
    font-weight: 500;
    font-size: 0.85rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-song-artist {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.load-more-songs {
    width: 100%;
    padding: 0.8rem;
    margin-top: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.load-more-songs:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

/* CTA: View all songs from artist */
.view-all-songs-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--accent-color), #e67e22);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.3);
}

.view-all-songs-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
    background: linear-gradient(135deg, #e67e22, var(--accent-color));
}

.view-all-songs-cta .cta-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.view-all-songs-cta:hover .cta-arrow {
    transform: translateX(4px);
}

/* TOP 100 CTA */
.add-chords-float {
    top: 42px !important;
}

.add-chords-btn {
    width: auto !important;
    padding: 0 10px !important;
    border-radius: 18px !important;
    background: #e67e22 !important;
    border-color: #e67e22 !important;
    color: #fff !important;
    text-decoration: none;
    font-size: 0.8rem !important;
    white-space: nowrap;
}

.add-chords-btn:hover {
    background: #d35400 !important;
    border-color: #d35400 !important;
}

.top100-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    margin-bottom: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #1abc9c, #2980b9);
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(41, 128, 185, 0.3);
}

.top100-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.4);
    background: linear-gradient(135deg, #2980b9, #1abc9c);
    color: #fff;
    text-decoration: none;
}

.top100-cta .cta-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.top100-cta:hover .cta-arrow {
    transform: translateX(4px);
}

.top100-cta-text {
    display: inline-block;
    margin-top: 10px;
    color: var(--accent-color);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.top100-cta-text:hover {
    color: #1abc9c;
    text-decoration: underline;
}

/* "Ľudia si pozreli aj" - main content section */
.also-viewed-section {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.also-viewed-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.also-viewed-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.also-viewed-item {
    display: block;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 215, 0, 0.05);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.also-viewed-item:hover {
    background: rgba(255, 215, 0, 0.12);
    border-left-color: var(--accent-color);
    transform: translateX(3px);
}

.also-viewed-song {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.also-viewed-artist {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}


/* ====================================
   22. NEWS ITEMS (Sidebar)
   ==================================== */

.news-item {
    display: flex;
    gap: 0.8rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.news-item:hover {
    background: rgba(231, 76, 60, 0.05);
    padding-left: 0.5rem;
}

.news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.news-thumb {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
}

.news-content h4 {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.news-title {
    font-weight: 600;
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
}

.news-date {
    color: var(--text-secondary);
    font-size: 0.75rem;
}


/* ====================================
   23. VIDEO CONTAINER - Modern 16:9 YouTube Player
   ==================================== */

/* YouTube Video Card */
.youtube-video-card {
    margin-bottom: 0;
    padding: 0;
}

/* Karaoke Toggle */
.karaoke-toggle-bar {
    display: flex;
    justify-content: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid var(--border-color);
}

.karaoke-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--secondary-bg);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.karaoke-toggle-btn:hover {
    border-color: #e91e63;
    color: #e91e63;
    background: rgba(233, 30, 99, 0.08);
}

.karaoke-toggle-btn.active {
    background: #e91e63;
    border-color: #e91e63;
    color: #fff;
}

.karaoke-toggle-btn .karaoke-icon {
    font-size: 1rem;
}

/* YouTube Ambient Player (artist sidebar) */
.youtube-ambient-card {
    padding: 0;
    overflow: hidden;
}

.yt-ambient-header {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
}

.yt-ambient-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.yt-ambient-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}

.yt-ambient-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Responsive 16:9 Video Container */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625) */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: #000;
    transition: all 0.3s ease;
}

.video-container:hover {
    box-shadow: 0 8px 24px rgba(255, 165, 0, 0.2);
    transform: translateY(-2px);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 12px;
}


/* ====================================
   24. BUTTONS
   ==================================== */

.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #333;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* Load More Button - Genius Style */
.load-more-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: var(--spacing-md) auto 0;
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.load-more-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.load-more-btn:active {
    transform: translateY(0);
}

.load-more-btn.loading {
    opacity: 0.6;
    cursor: wait;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: var(--spacing-md);
}


/* ====================================
   25. BADGES
   ==================================== */

.badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    background: var(--accent-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge.new {
    background: var(--success-color);
}


/* ====================================
   26. LINKS & VIEW ALL
   ==================================== */

.view-all-link {
    display: block;
    padding: 0.8rem 0;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    transition: var(--transition);
}

.view-all-link:hover {
    background: rgba(231, 76, 60, 0.1);
}


/* ====================================
   26a. HITPARÁDA ITEMS
   ==================================== */

.hitparada-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* ====================================
   27. FOOTER
   ==================================== */

footer {
    background: var(--secondary-bg);
    border-top: 2px solid var(--border-color);
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg) 0;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    text-align: center;
    color: var(--text-secondary);
}

/* HotInfo Widget - pod footer */
.hotinfo-widget {
    background: #1a1a2e;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 12px 0;
    font-size: 0.82em;
}
.hotinfo-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}
.hotinfo-header {
    margin-bottom: 6px;
    color: #666;
}
.hotinfo-label { font-size: 0.9em; }
.hotinfo-brand {
    color: #e67e22;
    text-decoration: none;
    font-weight: 600;
}
.hotinfo-brand:hover { color: #f39c12; text-decoration: underline; }
.hotinfo-items {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}
.hotinfo-breaking {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
    width: 100%;
}
.hotinfo-breaking:hover { text-decoration: underline; }
.hotinfo-badge {
    background: #e74c3c;
    color: #fff;
    font-size: 0.7em;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 4px;
    animation: hotinfo-pulse 2s infinite;
}
@keyframes hotinfo-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.hotinfo-meta { color: #888; font-size: 0.85em; }
.hotinfo-item {
    color: #888;
    text-decoration: none;
}
.hotinfo-item::before {
    content: '•';
    margin-right: 4px;
    color: #555;
}
.hotinfo-item:hover { color: #bbb; text-decoration: underline; }

@media (max-width: 768px) {
    .hotinfo-items { flex-direction: column; gap: 4px; }
}


/* ====================================
   28. RESPONSIVE DESIGN
   ==================================== */

@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .carousel-main {
        grid-template-columns: repeat(2, 1fr);
    }

    .albums-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    /* Edge-to-edge for song page - cancel container padding */
    .content-grid-sidebar {
        display: flex;
        flex-direction: column;
        margin: 0;
        gap: 0;
    }

    /* Mobile order: 1. Text piesne, 2. YouTube video, 3. Ostatné sidebar, 4. Komentáre */
    .song-main-content {
        display: contents; /* Makes children direct flex items of content-grid-sidebar */
    }

    .song-text-wrapper {
        order: 1;
        margin: 0;
        border-radius: 0;
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }

    .also-viewed-section {
        order: 2;
        margin: 0;
        border-radius: 0;
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }

    .also-viewed-grid {
        grid-template-columns: 1fr;
    }

    .youtube-video-card {
        order: 3;
        margin: 0;
        border-radius: 0;
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }

    .sidebar.sticky {
        position: static;
        display: contents; /* Makes children direct flex items */
    }

    .sidebar-section {
        margin: 0;
        border-radius: 0;
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }

    .sidebar-section:not(.youtube-video-card) {
        order: 4;
    }

    .comments-section {
        order: 5;
        margin: 0;
        border-radius: 0;
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }

    .songs-grid {
        grid-template-columns: 1fr;
    }

    .toolbar-container {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-group {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .header-top {
        grid-template-columns: auto 1fr auto !important;  /* Mobile header: hamburger+logo | search | user */
        gap: var(--spacing-sm);
    }

    /* Removed: .left-nav flex-direction (moved to line 3487) */

    .left-nav nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .right-nav nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .carousel-main {
        grid-template-columns: 1fr;
    }

    .songs-grid {
        grid-template-columns: 1fr;
    }

    .albums-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .featured-banner .genre-card {
        flex: 0 0 140px;
    }

    .featured-banner {
        height: 100px;
    }

    .carousel-arrow {
        display: none;
    }

    .featured-banner-container {
        margin-bottom: var(--spacing-sm);
    }

    .grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Artist Header - Compact mobile version */
    .artist-header {
        height: 120px;  /* Reduced from 400px */
    }

    .artist-name {
        font-size: 1.5rem;
    }

    /* Show song name in artist header on mobile */
    .song-name-mobile {
        display: block;
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.85);
    }

    .song-header .song-title {
        font-size: 1.8rem;
    }

    /* Hide genre and stats on mobile */
    .artist-genre,
    .artist-stats {
        display: none;
    }

    /* Official Web button - compact on mobile */
    .official-web-btn {
        position: absolute !important;
        top: 6px !important;
        right: 6px !important;
        left: auto !important;
        padding: 0.3rem 0.5rem !important;
        font-size: 0.7rem !important;
        border-radius: 4px !important;
        background: #1e90ff !important;
        color: #fff !important;
        z-index: 100 !important;
    }

    /* Hide duplicate song title on mobile (keep toolbar visible) */
    .song-header-left {
        display: none;
    }

    .tabs-container {
        overflow-x: auto;
    }

    /* Removed conflicting .container padding - using edge-to-edge on mobile */

    /* Footer sections - 2 columns on tablet */
    .footer-sections-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }

    /* === MOBILE: Version Tabs (25.1.2026) === */
    .version-tabs {
        padding-left: 0;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 0 -0.75rem; /* Edge-to-edge on mobile */
        padding: 0 0.75rem;
    }

    .version-tabs::-webkit-scrollbar {
        display: none;
    }

    .version-tab {
        padding: 10px 14px;
        font-size: 0.85rem;
        flex-shrink: 0;
        min-height: 44px; /* iOS touch target */
        display: flex;
        align-items: center;
    }

    /* === MOBILE: Song Info Bar (25.1.2026) === */
    .song-info-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 10px 0 15px 0;
    }

    .info-bar-main {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .info-bar-title {
        flex-wrap: wrap;
        flex: 1;
        min-width: 0;
        font-size: 1rem;
    }

    .info-bar-artist {
        font-size: 1rem;
    }

    .info-bar-song {
        font-size: 1rem;
    }

    /* Stats on separate row */
    .info-bar-item {
        font-size: 0.85rem;
    }

    /* Hide contributor avatar on mobile, keep name */
    .info-bar-avatar {
        display: none;
    }

    /* Extra info items inline */
    .info-bar-extra-item {
        font-size: 0.8rem;
    }
    .info-bar-note {
        font-size: 0.8rem;
    }

    /* === MOBILE: Toolbar Actions (25.1.2026) === */
    .toolbar-actions {
        padding-left: 0.5rem;
        gap: 0.25rem;
        flex-wrap: wrap;
    }

    /* === MOBILE: Hide button labels, show only icons (25.1.2026) === */
    .toolbar-btn .btn-label {
        display: none;
    }

    /* === MOBILE: Compact song info bar (25.1.2026) === */
    .info-bar-stats {
        display: none !important;
    }

    .info-bar-toggle-mobile {
        display: inline-flex !important;
    }

    .song-info-bar.mobile-expanded .info-bar-stats {
        display: inline-flex !important;
    }

    .song-info-bar.mobile-expanded .info-bar-main {
        flex-wrap: wrap;
    }

    /* === MOBILE: Sidebar Tabs (25.1.2026) === */
    .sidebar-tabs {
        padding-left: 0.75rem;
        order: 3; /* Same as sidebar-section to keep with TOP piesne */
    }

    .sidebar-tab {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    /* === MOBILE: TOP Songs Container (25.1.2026) === */
    #topSongsContainer {
        max-height: 50vh; /* Reduced from 60vh */
    }

    /* === MOBILE: Song items in one row (25.1.2026) === */
    .song-item {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 0.5rem;
        padding: 0.75rem;
        align-items: center;
    }

    .song-number {
        flex-shrink: 0;
        width: auto;
        min-width: 20px;
    }

    .song-title-link {
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .song-icons {
        flex-shrink: 0;
        display: flex;
        gap: 0.25rem;
    }

    .song-rating {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    /* === MOBILE SMALL: Even more compact (25.1.2026) === */
    .version-tab {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .info-bar-title {
        font-size: 0.95rem;
    }

    /* Hide rank on very small screens */
    .info-bar-rank {
        display: none;
    }

    /* Hide extra info items on very small screens */
    .info-bar-extra-item {
        display: none;
    }

    #topSongsContainer {
        max-height: 40vh;
    }
    .song-item {
        grid-template-columns: auto 1fr auto auto;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .song-number {
        width: auto;
        min-width: 20px;
    }

    .song-title-link {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .song-icons {
        flex-shrink: 0;
    }

    .song-rating {
        flex-shrink: 0;
    }

    .alphabet-filter a {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    /* Footer sections - 1 column on mobile */
    .footer-sections-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Footer navigation - vertical on mobile */
    footer nav {
        flex-direction: column !important;
        gap: 1rem !important;
    }
}


/* ====================================
   29. UTILITIES
   ==================================== */

.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }

/* Flex & Grid helpers */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

/* Common patterns */
.no-decoration { text-decoration: none; }
.inherit-color { color: inherit; }
.relative { position: relative; }
.absolute { position: absolute; }

/* Artist label overlay */
.artist-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 600;
}

/* Stats text */
.stats-number {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.stats-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Album card content */
.album-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.album-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Image sizing */
.img-full {
    width: 100%;
}

.img-square {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.img-rounded {
    border-radius: var(--border-radius);
}

/* Chord card (akordy) */
.chord-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.3rem;
}

.chord-notation {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Hitparady wrapper - 4 charts in row */
.hitparady-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 1200px) {
    .hitparady-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .hitparady-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Hitparada card */
.hitparada-card {
    padding: 1rem;
    font-size: 0.9rem;
}

/* Featured card — SuperMusic TOP (tmavomodré pozadie, žltý header) */
.hitparada-card-featured {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 215, 0, 0.25);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.hitparada-card-featured .hitparada-title-link {
    color: #ffd700;
}

.hitparada-card-featured .hitparada-item:hover {
    background: rgba(255, 215, 0, 0.08);
}

.hitparada-header {
    text-align: center;
    margin-bottom: 1rem;
}

.hitparada-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.3rem;
}

.hitparada-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
}

/* Hitparada item */
.hitparada-item {
    text-decoration: none;
    color: inherit;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.hitparada-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.hitparada-rank {
    font-weight: 700;
    color: var(--accent-color);
    margin-right: 0.5rem;
}

.hitparada-artist {
    color: var(--text-secondary);
}

.hitparada-song {
    color: var(--text-primary);
}

.hitparada-trend {
    font-size: 0.7rem;
    font-weight: 700;
    margin-right: 0.3rem;
    display: inline-block;
    text-align: center;
}
.hitparada-up { color: #4caf50; }
.hitparada-down { color: #f44336; }
.hitparada-same { color: #888; }
.hitparada-new {
    color: #ff9800;
    font-size: 0.75rem;
}

.hitparada-title-link {
    color: var(--accent-color);
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
}

.hitparada-title-link:hover {
    text-decoration: underline;
}

/* Image square utility */
.img-square {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

/* Songbooks promo grid (homepage) */
.songbooks-promo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 1200px) {
    .songbooks-promo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .songbooks-promo-grid {
        grid-template-columns: 1fr;
    }
}

.songbook-promo-card {
    padding: 1rem;
    transition: border-color 0.2s, transform 0.15s;
    display: flex;
    flex-direction: column;
}

.songbook-promo-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.songbook-promo-header {
    text-align: center;
    margin-bottom: 6px;
}

.songbook-promo-header .hitparada-title-link {
    font-size: 1.1rem;
}

.songbook-promo-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
    margin-top: 2px;
}

.songbook-promo-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-align: center;
}

.songbook-promo-songs {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.songbook-promo-song {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.songbook-promo-song-name {
    color: var(--text-primary);
}

.songbook-promo-song-artist {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.songbook-promo-song-artist::before {
    content: " \2013  ";
}

.songbook-promo-cta {
    font-size: 0.8rem;
    color: var(--accent-color);
    text-align: center;
    font-weight: 600;
}

.songbook-promo-with-cover {
    display: flex;
    gap: 12px;
    align-items: center;
    height: 100%;
}

.songbook-promo-cover {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
}

.songbook-promo-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.songbook-promo-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.songbook-promo-info .hitparada-title-link {
    font-size: 1rem;
}

.songbook-promo-info .songbook-promo-meta {
    text-align: left;
    margin-bottom: 4px;
}

.songbook-promo-info .songbook-promo-cta {
    text-align: left;
    margin-top: auto;
}

/* Badge colors */
.badge-green {
    background: #27ae60;
}

.badge-blue {
    background: #3498db;
}

.badge-red {
    background: #e74c3c;
}

.badge-yellow {
    background: #f39c12;
}

/* Search form in akordy section */
.search-form-akordy {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.5rem;
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    color: white;
    border-radius: 4px;
}

.search-btn {
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-btn:hover {
    background: var(--accent-hover);
}

/* Popular chords links */
.popular-links {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #888;
}

.popular-links a {
    color: var(--accent-color);
}

.popular-links a:hover {
    text-decoration: underline;
}

/* Placeholder box */
.placeholder-box {
    background: #333;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #666;
}

/* Text center with padding */
.text-center-padded {
    color: #aaa;
    text-align: center;
    padding: 1rem;
}

.text-center-padded a {
    color: #e74c3c;
    text-decoration: none;
}

.text-center-padded a:hover {
    text-decoration: underline;
}

/* Albums carousel */
.albums-carousel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    width: 100%;
}

.albums-carousel-grid .card {
    min-width: 0; /* Allow cards to shrink */
}

.album-card-link {
    text-decoration: none;
    color: inherit;
    padding: 1rem;
}

/* Badge blue for genres */
.badge-blue-genre {
    background: #2980b9;
}

/* Footer navigation */
.footer-nav-container {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-nav-link:hover {
    color: var(--accent-color);
}

.footer-meta-links {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.footer-meta-links a {
    color: #aaa;
    text-decoration: none;
}

.footer-meta-links a:hover {
    text-decoration: underline;
}

/* Text center with margin top */
.text-center-mt {
    text-align: center;
    margin-top: 2rem;
}

/* Full width button with margin */
.btn-full-mt {
    width: 100%;
    margin-top: 1rem;
    text-align: center;
}

.btn-full {
    width: 100%;
}

/* Album list */
.album-list {
    list-style: none;
    padding: 0;
}

.album-list-item {
    margin-bottom: 0.8rem;
}

.album-list-meta {
    color: var(--text-secondary);
}

/* Photo grid */
.photo-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.photo-thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

/* Button full width with smaller margin */
.btn-full-mt-sm {
    width: 100%;
    margin-top: 1rem;
}

/* Social links list */
.social-links-list {
    list-style: none;
    padding: 0;
}

.social-links-item {
    margin-bottom: 0.5rem;
}

.social-link {
    color: var(--text-primary);
    text-decoration: none;
}

.social-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Artist header with specific background (for prototype) */
.artist-header-elan {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.8)), url('/photos/35243_uvod1.webp');
}

/* Genre cards with specific backgrounds */
.genre-card-ludove {
    background-image: url('/photos/2616943_Jarabica.webp');
}

.genre-card-krestanske {
    background-image: url('/photos/2617241_Simon-Bilina-2media-foto-Kate-Sramkova4-scaled.webp');
}

.genre-card-romske {
    background-image: url('/photos/2617337_gims3.webp');
}

.genre-card-country {
    background-image: url('/photos/2617390_ggg2.webp');
}

.genre-card-filmova {
    background-image: url('/photos/2617197_1900x1900-000000-80-0-0.webp');
}

.genre-card-detske {
    background-image: url('/photos/2616909_Sabrina_Carpenter_2017b.webp');
}


/* ====================================
   30. ACCESSIBILITY
   ==================================== */

/* Focus styles */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ====================================
   20. CHORD PAGE
   ==================================== */

.chord-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

.chord-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--secondary-bg) 0%, var(--card-bg) 100%);
    border-radius: var(--border-radius);
}

.chord-title {
    font-size: 2.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.chord-name {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 3rem;
}

.chord-code {
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: 400;
}

/* Chord Diagrams */
.chord-diagrams {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.diagram-section {
    background: var(--card-bg);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.diagram-title {
    font-size: 1.5rem;
    margin: 0 0 var(--spacing-md) 0;
    color: var(--text-primary);
    text-align: center;
}

/* Guitar Diagram */
.guitar-diagram {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.guitar-fretboard {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    line-height: 1.5;
    margin: 0;
    padding: var(--spacing-md);
    background: var(--secondary-bg);
    border-radius: var(--border-radius);
    color: var(--text-primary);
}

.guitar-fretboard .pressed {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.8rem;
}

.guitar-fretboard .not-played {
    color: var(--text-secondary);
    font-weight: bold;
}

.guitar-fretboard .open {
    color: var(--text-secondary);
}

/* Keyboard Diagram */
.keyboard-diagram {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    padding: var(--spacing-md);
}

.keyboard-container {
    display: flex;
    align-items: flex-start;
    gap: 0;
    background: var(--secondary-bg);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
}

.keyboard-container img {
    display: block;
    height: auto;
    max-width: 100%;
}

.black-key-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.black-key-group .black-top {
    display: block;
}

.black-key-group .black-bottom {
    display: flex;
    gap: 0;
}

/* Chord Footer */
.chord-footer {
    text-align: center;
    padding: var(--spacing-lg);
}

.chord-footer .btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chord-page {
        padding: 0;  /* Edge-to-edge */
    }

    .chord-header {
        margin: 0;  /* Edge-to-edge */
        padding: 1rem 0.75rem;
        border-radius: 0;  /* Edge-to-edge */
    }

    .diagram-section {
        margin: 0;  /* Edge-to-edge */
        padding: 1rem 0.75rem;
        border-radius: 0;  /* Edge-to-edge */
        border-left: none;  /* Edge-to-edge */
        border-right: none;  /* Edge-to-edge */
    }

    .chord-diagrams {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .chord-title {
        font-size: 2rem;
    }

    .chord-name {
        font-size: 2.5rem;
    }

    .chord-code {
        font-size: 1.5rem;
    }

    .guitar-fretboard {
        font-size: 1.2rem;
    }

    .keyboard-container {
        transform: scale(0.8);
        transform-origin: center;
    }

    .chord-footer {
        margin: 0;  /* Edge-to-edge */
        padding: 1rem 0.75rem;
    }
}

@media (max-width: 480px) {
    .chord-page {
        padding: 0;  /* Edge-to-edge */
    }

    .chord-header {
        margin: 0;  /* Edge-to-edge */
        padding: 0.75rem 0.75rem;
        border-radius: 0;  /* Edge-to-edge */
    }

    .diagram-section {
        margin: 0;  /* Edge-to-edge */
        padding: 0.75rem 0.75rem;
        border-radius: 0;  /* Edge-to-edge */
        border-left: none;  /* Edge-to-edge */
        border-right: none;  /* Edge-to-edge */
    }

    .chord-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .chord-name {
        font-size: 2rem;
    }

    .chord-code {
        font-size: 1.2rem;
    }

    .guitar-fretboard {
        font-size: 1rem;
        padding: var(--spacing-sm);
    }

    .keyboard-container {
        transform: scale(0.6);
    }

    .chord-footer {
        margin: 0;  /* Edge-to-edge */
        padding: 0.75rem 0.75rem;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #666;
    }
}

/* ====================================
   21. CHORDS LIST PAGE
   ==================================== */

.chords-list-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

.page-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.page-header h1 {
    font-size: 2.5rem;
    margin: 0 0 var(--spacing-sm) 0;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Root Notes Navigation */
.root-notes-nav {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.root-note-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
}

.root-note-btn:hover {
    background: var(--secondary-bg);
    border-color: var(--accent-color);
}

.root-note-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

/* Chords Info */
.chords-info {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--card-bg);
    border-radius: var(--border-radius);
}

.chords-info strong {
    color: var(--accent-color);
}

/* Chords Grid */
.chords-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

/* Flat grid variant (no column wrappers - used for inline panel) */
.chords-grid-flat {
    gap: var(--spacing-xs);
}

.chords-column {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

/* Detail panel spans full width when inside flat grid */
.chords-grid-flat > .chord-detail-panel {
    grid-column: 1 / -1;
}

.chord-item {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.chord-item:hover {
    background: var(--secondary-bg);
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.chord-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-primary);
    text-decoration: none;
    gap: var(--spacing-sm);
}

.chord-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--accent-color);
}

.chord-code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Help Section */
.chords-help {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.chords-help h2 {
    text-align: center;
    margin: 0 0 var(--spacing-lg) 0;
    color: var(--accent-color);
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.help-item {
    padding: var(--spacing-md);
    background: var(--secondary-bg);
    border-radius: var(--border-radius);
}

.help-item h3 {
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--text-primary);
}

.help-item p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .chords-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .root-notes-nav {
        gap: var(--spacing-xs);
    }

    .root-note-btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 1rem;
    }

    .help-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* Toolbar responsive - smaller buttons on mobile */
    .toolbar-btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.85rem;
    }

    .toolbar-btn span {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .chords-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 2rem;
    }
}


/* ====================================
   30b. CHORD DETAIL PANEL (akordy.php inline)
   ==================================== */

/* Active chord item highlight */
.chord-item.active {
    background: var(--secondary-bg);
    border-color: var(--chord-color);
    transform: translateX(5px);
}

.chord-item.active .chord-name {
    color: var(--chord-color);
}

/* Detail Panel - hidden by default */
.chord-detail-panel {
    display: none;
    background: var(--card-bg);
    border: 1px solid var(--chord-color);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-xl);
    overflow: hidden;
    animation: cdpSlideDown 0.25s ease-out;
}

.chord-detail-panel.open {
    display: block;
}

@keyframes cdpSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Panel header */
.cdp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(52, 152, 219, 0.1);
    border-bottom: 1px solid var(--border-color);
}

.cdp-title {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-sm);
}

.cdp-chord-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--chord-color);
}

.cdp-chord-code {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.cdp-close {
    font-size: 1.5rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.cdp-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Voicing tabs */
.cdp-voicings {
    display: flex;
    gap: 6px;
    padding: 10px var(--spacing-md);
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
}

.cdp-voicing-tab {
    padding: 6px 14px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.cdp-voicing-tab:hover {
    border-color: var(--chord-color);
    color: var(--text-primary);
}

.cdp-voicing-tab.active {
    background: var(--chord-color);
    border-color: var(--chord-color);
    color: #fff;
    font-weight: 600;
}

/* Panel body - guitar + keyboard side by side */
.cdp-body {
    display: flex;
    gap: var(--spacing-lg);
    padding: var(--spacing-md);
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.cdp-guitar {
    flex-shrink: 0;
}

.cdp-keyboard {
    flex-shrink: 0;
}

/* Panel footer */
.cdp-footer {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 10px var(--spacing-md);
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.cdp-footer a {
    color: var(--chord-color);
    text-decoration: none;
}

.cdp-footer a:hover {
    text-decoration: underline;
}

.cdp-sep {
    color: var(--text-secondary);
}

/* ====================================
   30c. CSS KEYBOARD (Pure CSS Piano)
   ==================================== */

.css-keyboard {
    position: relative;
    display: flex;
    height: 150px;
    border-radius: 4px;
    overflow: hidden;
}

.kb-white {
    width: 36px;
    height: 120px;
    background: #f0f0f0;
    border: 1px solid #999;
    border-radius: 0 0 4px 4px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 6px;
    position: relative;
    z-index: 1;
    cursor: default;
    transition: background 0.15s;
}

.kb-white span {
    font-size: 10px;
    color: #666;
    font-weight: 500;
}

.kb-white:hover {
    background: #e0e0e0;
    transform: scaleY(0.98);
    transform-origin: top;
}

.kb-white.active {
    background: var(--chord-color);
}

.kb-white.active:hover {
    background: #2980b9;
}

.kb-white.active span {
    color: #fff;
    font-weight: 700;
}

.kb-black-row {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 75px;
    z-index: 2;
    pointer-events: none;
}

.kb-black {
    position: absolute;
    width: 24px;
    height: 75px;
    background: #222;
    border: 1px solid #000;
    border-radius: 0 0 3px 3px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 4px;
    cursor: default;
    transition: background 0.15s;
}

.kb-black span {
    font-size: 8px;
    color: #888;
    font-weight: 500;
}

.kb-black:hover {
    background: #444;
}

.kb-black.active {
    background: var(--chord-color);
    border-color: var(--chord-color);
}

.kb-black.active:hover {
    background: #2980b9;
    border-color: #2980b9;
}

.kb-black.active span {
    color: #fff;
    font-weight: 700;
}

/* Black key positions - based on standard piano layout */
.kb-black[data-pos="cs"] { left: 24px; }
.kb-black[data-pos="ds"] { left: 60px; }
.kb-black[data-pos="fs"] { left: 132px; }
.kb-black[data-pos="gs"] { left: 168px; }
.kb-black[data-pos="as"] { left: 204px; }

/* ====================================
   30d. CHORD DETAIL PANEL - Mobile
   ==================================== */

@media (max-width: 768px) {
    .cdp-body {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
        padding: var(--spacing-sm);
    }

    .cdp-chord-name {
        font-size: 1.3rem;
    }

    .cdp-voicings {
        padding: 8px 10px;
    }

    .cdp-voicing-tab {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    .css-keyboard {
        transform: scale(0.85);
        transform-origin: center top;
    }

    .cdp-footer {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    .cdp-sep {
        display: none;
    }
}

/* ====================================
   31. LIGHT THEME (Classic White Background) - ONLY CHORD CONTAINER
   ==================================== */

/* Light theme - only for chord container */
.chord-container.light-theme {
    background: #ffffff !important;
    border: 1px solid #ddd !important;
}

.chord-container.light-theme .chord-text {
    color: #000 !important;
    font-weight: 900 !important;
}

/* Classic blue chords for light theme */
.chord-container.light-theme .chord {
    color: #3498db !important;
}

.chord-container.light-theme .chord:hover {
    color: #e74c3c !important;
}

.chord-container.light-theme .chord-text sup {
    color: #3498db !important;
}

/* Light theme - song info bar */
.chord-container.light-theme .song-info-bar {
    color: #333 !important;
    border-bottom-color: #ddd !important;
}

.chord-container.light-theme .info-bar-title,
.chord-container.light-theme .info-bar-song {
    color: #333 !important;
}

.chord-container.light-theme .info-bar-artist {
    color: #e74c3c !important;
}

.chord-container.light-theme .info-bar-item {
    color: #666 !important;
}

.chord-container.light-theme .info-bar-separator {
    color: #999 !important;
}

/* ============================================
   SEARCH PAGE - Compact Results
   ============================================ */

/* Compact result items */
.result-compact {
    padding: 0.5rem 0 !important;
}

.result-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Compact badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-size: 14px;
    flex-shrink: 0;
}

.badge-artist {
    background: #27ae60;
    color: white;
}

.badge-song {
    background: #3498db;
    color: white;
}

.badge-lyrics {
    background: #e67e22;
    color: white;
}

/* Result name link */
.result-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.result-name:hover {
    color: var(--accent-color);
}

/* Artist link */
.result-artist-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.result-artist-link:hover {
    color: var(--accent-color);
}

/* Result info and separator */
.result-info {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.result-separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Compact preview */
.result-preview-compact {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0.25rem 0 0 2rem;
    line-height: 1.4;
    font-style: italic;
}

/* Result item spacing */
.result-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.result-item:last-child {
    border-bottom: none;
}

/* ============================================
   SONG PAGE - Simplified Header + Sidebar Info
   ============================================ */

/* Simplified song header */
.song-header-simple .song-header-left {
    padding: 0;
}

.song-header-simple .song-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.song-header-simple .song-artist {
    font-size: 1.2rem;
    margin-bottom: 0;
}

/* Song Info Card in Sidebar */
.song-info-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 0;
}

.song-info-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.song-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.song-info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

/* Contributor link */
.contributor-item {
    align-items: flex-start !important;
}

.contributor-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.contributor-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contributor-link:hover {
    color: var(--chord-color);
}

.contributor-link:hover .contributor-name {
    text-decoration: underline;
}

.contributor-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.contributor-link:hover .contributor-avatar {
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.contributor-name {
    display: inline-block;
}

.contributor-songs {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-left: 0.3rem;
}

/* ============================================
   CONTRIBUTOR PROFILE PAGE
   ============================================ */

.contributor-header {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.contributor-avatar-large {
    flex-shrink: 0;
}

.contributor-avatar-large img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border-color);
}

.contributor-info {
    flex: 1;
}

.contributor-info .contributor-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.contributor-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: var(--secondary-bg);
    border-radius: var(--border-radius);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.songs-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.songs-table-wrapper {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.songs-table {
    width: 100%;
    border-collapse: collapse;
}

.songs-table thead tr {
    background: var(--secondary-bg);
    border-bottom: 2px solid var(--border-color);
}

.songs-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.songs-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.songs-table tbody tr:hover {
    background: var(--secondary-bg);
}

.songs-table td {
    padding: 1rem;
}

.col-artist {
    width: 30%;
}

.col-song {
    width: 40%;
}

.col-type {
    width: 15%;
}

.col-views {
    width: 15%;
    text-align: right;
}

.artist-link, .song-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.artist-link:hover, .song-link:hover {
    color: var(--chord-color);
    text-decoration: underline;
}

.song-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--secondary-bg);
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.views-count {
    font-weight: 600;
    color: var(--text-primary);
}

.no-songs {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background: var(--accent-color);
    color: #fff;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
}

.pagination-btn:hover {
    background: var(--chord-color);
    transform: translateY(-2px);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    .contributor-header {
        flex-direction: column;
        text-align: center;
    }

    .contributor-stats {
        justify-content: center;
    }

    .songs-table th, .songs-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }

    .col-type {
        display: none;
    }
}

/* Versions in sidebar */
.song-versions-sidebar {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.song-versions-sidebar .info-label {
    display: block;
    margin-bottom: 0.5rem;
}

.version-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.version-btn-compact {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: #27ae60;
    border: 1px solid #27ae60;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.version-btn-compact:hover {
    background: #229954;
    color: white;
    border-color: #229954;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .song-info-card {
        margin-bottom: 1rem;
    }
}

/* ============================================
   SONG PAGE - Inline Header (Artist - Title)
   ============================================ */

/* Inline song header */
.song-header-inline .song-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.song-header-inline .song-header-left {
    padding: 0.25rem 0;
    flex: 1;
    min-width: 300px;
}

.song-header-inline .song-header-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.song-header-toolbar .toolbar-group-header {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.song-header-toolbar .chord-schemes-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: #e74c3c;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.song-header-toolbar .chord-schemes-close:hover {
    background: #c0392b;
    color: #fff;
}

.song-title-inline {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    line-height: 1.3;
}

/* Toolbar in header */
.toolbar-group-header {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.toolbar-group-header .toolbar-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.85rem;
}

.song-artist-link {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

.song-artist-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.title-separator {
    color: var(--text-secondary);
    font-weight: 400;
    opacity: 0.6;
}

.song-name {
    color: var(--text-primary);
}

/* Responsive - stack on small screens */
@media (max-width: 768px) {
    .song-title-inline {
        font-size: 1.4rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .title-separator {
        display: none;
    }
}

/* ============================================
   AUTOSCROLL FLOATING PANEL
   ============================================ */

#autoscrollPanel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: transparent;
    border: none;
    padding: 0.5rem;
    display: none;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
    z-index: 9999;
}

.autoscroll-title {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.autoscroll-btn {
    width: 44px;
    height: 44px;
    background: var(--accent-color);
    border: none;
    border-radius: 8px;
    color: #000;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.autoscroll-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.autoscroll-btn:active {
    transform: scale(0.95);
}

.autoscroll-pause {
    background: #6c757d;
}

.autoscroll-pause:hover {
    background: #5a6268;
}

/* Responsive */
@media (max-width: 768px) {
    #autoscrollPanel {
        bottom: 10px;
        right: 10px;
    }

    .autoscroll-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* ====================================
   RESPONSIVE - MOBILE HEADER & NAVIGATION
   ==================================== */

/* Tablet and smaller */
@media (max-width: 992px) {
    /* Show hamburger button */
    .hamburger-btn {
        display: flex !important;
    }

    /* Hide desktop navigation */
    .desktop-nav {
        display: none !important;
    }

    /* Adjust header layout - use flexbox */
    .header-top {
        display: flex;
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    /* Left nav (hamburger + logo) - minimal width */
    .left-nav {
        order: 1;
        flex-shrink: 0;
    }

    /* Right nav (user button) - minimal width */
    .right-nav {
        order: 3;
        flex-shrink: 0;
    }

    /* Search takes remaining space in same row */
    .search-wrapper {
        order: 2;
        flex: 1;
        min-width: 0;
    }
}

/* Mobile phone */
@media (max-width: 768px) {
    .header-top {
        display: grid !important;  /* Override flexbox from 992px query */
        padding: 0.5rem var(--spacing-sm);
        /* Grid: auto (hamburger+logo) | 1fr (search) | auto (user) */
        grid-template-columns: auto 1fr auto;
        gap: 0.5rem;
    }

    /* Keep hamburger and logo on same line */
    .left-nav {
        flex-direction: row !important;
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .logo img {
        height: 28px;
    }

    /* Search wrapper pre grid systém */
    .search-wrapper {
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    /* Search form - flex child sizing */
    .search-form {
        max-width: 100%;
    }

    .header-top .search-form input {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
        min-width: 0;
        width: 0; /* flex: 1 will expand it, but allows shrinking */
    }

    .header-top .search-form input::placeholder {
        font-size: 0.8rem;
    }

    .header-top .search-form button {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    /* Search suggestions dropdown na mobile */
    .search-suggestions {
        width: 280px;
        left: 50%;
        transform: translateX(-50%);
        max-height: 60vh;
    }

    .search-suggestion-item {
        padding: 8px 10px;
    }

    .search-suggestion-item img {
        width: 36px;
        height: 36px;
    }

    /* Right nav - user button úplne napravo */
    .right-nav {
        justify-self: end;  /* Grid alignment na pravý okraj */
    }

    /* Hide lang picker on mobile - languages are in mobile menu */
    .lang-picker {
        display: none;
    }

    .user-button {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        flex-shrink: 0;
    }

    .user-nick {
        display: none;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .header-top {
        padding: 0.4rem 0.5rem;
        gap: 0.3rem;
        grid-template-columns: auto 1fr auto;
    }

    /* Minimal gap between hamburger and logo */
    .left-nav {
        flex-direction: row !important;
        gap: 0.3rem;
    }

    .logo img {
        height: 24px;
    }

    .hamburger-btn {
        width: 26px;
        height: 20px;
    }

    .hamburger-btn span {
        height: 2.5px;
    }

    /* Ešte menší search na malých displejoch */
    .search-wrapper {
        max-width: 160px;
    }

    .search-form {
        width: 100%;
    }

    .search-form input {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }

    .search-form input::placeholder {
        font-size: 0.75rem;
    }

    /* Hide search button emoji on very small screens, show only border */
    .search-form button {
        min-width: 36px;
    }

    /* Right nav - user button úplne napravo */
    .right-nav {
        justify-self: end;
    }

    .user-button {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .mobile-menu {
        width: 100%;
        left: -100%; /* Full width on small screens */
    }
}

/* ====================================
   ADMIN STATS PAGES (2025-10-09)
   ==================================== */

/* Admin Page Container */
.admin-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.admin-page-header {
    margin-bottom: 2rem;
}

.admin-page-title {
    color: #ffa500;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.admin-page-subtitle {
    color: #999;
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Admin Stats Section */
.admin-stats-section {
    margin-top: 20px;
}

.admin-stats-header {
    background: #1a1a1a;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #fff;
    border-left: 4px solid #e74c3c;
}

.admin-stats-highlight {
    color: #ffa500;
    font-weight: bold;
}

.admin-stats-count {
    color: #ffa500;
    font-weight: bold;
}

.admin-stats-pagination {
    margin-top: 10px;
}

.admin-stats-pagination a {
    color: #ffa500;
    text-decoration: none;
    font-weight: bold;
}

.admin-stats-pagination a:hover {
    color: #ff6b00;
    text-decoration: underline;
}

/* Admin Stats Table */
.admin-stats-table {
    width: 100%;
    border-collapse: collapse;
    background: #222;
    border-radius: 8px;
    overflow: hidden;
}

.admin-stats-table thead {
    background: #333;
}

.admin-stats-table th {
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #444;
    font-weight: 600;
}

.admin-stats-table th a {
    color: #fff;
    text-decoration: none;
}

.admin-stats-table th a:hover {
    color: #ffa500;
}

.admin-stats-table tbody tr.odd {
    background: #222;
}

.admin-stats-table tbody tr.even {
    background: #2a2a2a;
}

.admin-stats-table tbody tr:hover {
    background: #333;
}

.admin-stats-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #333;
}

.admin-stats-table td a {
    color: #4a9eff;
    text-decoration: none;
}

.admin-stats-table td a:hover {
    color: #6bb3ff;
    text-decoration: underline;
}

/* Photos Grid */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 20px;
}

.photo-item {
    background: #222;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.photo-item:hover {
    border-color: #ffa500;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 165, 0, 0.2);
}

.photo-thumb {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.photo-info {
    color: #999;
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.photo-size {
    color: #ffa500;
    font-weight: 600;
}

.photo-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
}

.btn-delete,
.btn-view {
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    text-decoration: none !important;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: inline-block;
    border: none;
}

.btn-delete {
    background: #dc3545 !important;
    color: white !important;
}

.btn-delete:hover {
    background: #c82333 !important;
    color: white !important;
}

.btn-view {
    background: #4a9eff !important;
    color: white !important;
}

.btn-view:hover {
    background: #3a8eef !important;
    color: white !important;
}

/* Empty State */
.admin-empty-state {
    padding: 40px;
    text-align: center;
    background: #1a1a1a;
    border-radius: 8px;
    color: #aaa;
    font-size: 16px;
}

/* Success/Error Messages */
.admin-success {
    padding: 15px;
    background: #4CAF50;
    color: white;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.admin-error {
    padding: 15px;
    background: #f44;
    color: white;
    border-radius: 8px;
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
    }
    
    .admin-page-title {
        font-size: 1.5rem;
    }
    
    .admin-stats-table {
        font-size: 0.9rem;
    }
    
    .admin-stats-table th,
    .admin-stats-table td {
        padding: 8px;
    }
}


/* ====================================
   SAFARI COMPATIBILITY FIXES
   Added: 2026-01-24
   ==================================== */

/* Safari iOS: Fix for 100vh including address bar */
@supports (-webkit-touch-callout: none) {
    .main-content {
        min-height: -webkit-fill-available;
    }
}

/* Safari: Smooth scroll polyfill hint - handled by JS */
@media not all and (min-resolution:.001dpcm) {
    @supports (-webkit-appearance:none) {
        html {
            /* Safari detected - smooth scroll handled by JS polyfill */
        }
    }
}

/* Safari: Fix flexbox gap fallback for older versions */
@supports not (gap: 1rem) {
    .left-nav,
    .search-form,
    .header-top,
    .nav-tabs {
        margin: -0.5rem;
    }
    .left-nav > *,
    .search-form > *,
    .header-top > *,
    .nav-tabs > * {
        margin: 0.5rem;
    }
}

/* Safari: Backdrop filter with webkit prefix */
.modal-overlay,
.dropdown-menu {
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* Safari: Touch action for better scroll performance */
.song-content,
.lyrics-content,
.scrollable {
    -webkit-overflow-scrolling: touch;
}

/* ====================================
   SAFARI iOS MOBILE FIXES
   Added: 2026-01-26
   Target: Reduce bounce rate on iOS Safari
   ==================================== */

/* iOS Safari: Prevent text size adjustment */
@supports (-webkit-touch-callout: none) {
    body {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    /* Fix for 100vh on iOS (address bar issue) */
    .main-content,
    .page-container {
        min-height: -webkit-fill-available;
    }

    /* Improve touch responsiveness */
    a, button, .clickable {
        -webkit-tap-highlight-color: rgba(0, 102, 204, 0.2);
        touch-action: manipulation;
    }

    /* Fix sticky positioning on iOS */
    .site-header {
        position: -webkit-sticky;
        position: sticky;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    /* Improve scroll performance */
    .song-content,
    .lyrics-content,
    .chord-text,
    .trending-grid,
    .songs-list {
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }

    /* Fix font rendering on iOS */
    body, .chord-text, .song-title, h1, h2, h3 {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* iOS Safari: Better click/tap handling */
@media (hover: none) and (pointer: coarse) {
    /* Larger tap targets for mobile */
    .nav-tabs a,
    .song-item a,
    .trending-card {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Remove hover effects that cause issues on touch */
    .trending-card:hover,
    .song-item:hover {
        transform: none;
    }

    /* Better touch feedback */
    .trending-card:active,
    .song-item:active,
    .btn:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

/* Safari: Fix for CSS Grid gap in older versions */
@supports not (gap: 1rem) {
    .trending-grid {
        margin: -7.5px;
    }
    .trending-grid > * {
        margin: 7.5px;
    }

    .content-grid {
        margin: -10px;
    }
    .content-grid > * {
        margin: 10px;
    }
}

/* =============================================
   EXPLICIT CONTENT PROTECTION
   ============================================= */

.explicit-content-wrapper {
    position: relative;
    min-height: 200px;
}

.chord-text.blurred {
    filter: blur(8px);
    user-select: none;
    pointer-events: none;
}

.explicit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10;
    border-radius: 8px;
}

.explicit-warning {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg, #fff);
    border-radius: 12px;
    max-width: 400px;
    margin: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.explicit-badge {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.explicit-warning h3 {
    margin: 1rem 0;
    color: var(--text-color, #333);
    font-size: 1.3rem;
}

.explicit-warning p {
    color: var(--text-secondary, #666);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.explicit-warning .login-required {
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
    margin-bottom: 1rem;
}

.explicit-warning .btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--accent-color, #007bff);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

.explicit-warning .btn:hover {
    background: var(--accent-hover, #0056b3);
    transform: translateY(-1px);
}

.explicit-warning .btn:active {
    transform: translateY(0);
}

/* Dark mode adjustments */
[data-theme="dark"] .explicit-warning {
    background: var(--card-bg, #1e1e1e);
}

[data-theme="dark"] .explicit-warning h3 {
    color: var(--text-color, #fff);
}

/* Safari iOS: Prevent zoom on input focus */
@supports (-webkit-touch-callout: none) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Popular searches tag cloud - mobile */
@media (max-width: 768px) {
    .popular-searches {
        gap: 6px;
        max-height: 72px;
        overflow: hidden;
    }

    .search-tag {
        padding: 5px 10px;
        font-size: 0.82rem;
    }
}

/* Safari: Hardware acceleration for animations */
.trending-card,
.song-item,
.album-card,
.artist-card {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

/* ====================================
   TOP 20 + RECENTLY VIEWED (float)
   ==================================== */

.top20-flow {
    overflow: hidden;
}

.rv-card {
    float: left;
    width: 200px;
    margin: 0 0.8rem 0.6rem 0;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 0.7rem;
    border: 1px solid var(--border-color);
}

.rv-header {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border-color);
}

.rv-list {
    display: flex;
    flex-direction: column;
}

.rv-item {
    text-decoration: none;
    color: inherit;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    transition: background 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    font-size: 0.85rem;
    line-height: 1.3;
}

.rv-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.rv-artist {
    color: var(--text-secondary);
    font-size: 0.85em;
}

.rv-more-btn {
    display: block;
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.3rem;
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.rv-more-btn:hover {
    background: rgba(231, 76, 60, 0.1);
}

.top20-item {
    display: inline-block;
    vertical-align: top;
    width: 200px;
    margin: 0 0.4rem 0.4rem 0;
}

.top20-item .stats-number,
.top20-item .stats-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .rv-card {
        float: none;
        width: 100%;
        margin: 0 0 0.8rem 0;
    }

    .top20-item {
        display: block;
        width: 100%;
        margin-right: 0;
    }
}

/* ====================================
   DESKTOP OPTIMIZATION (wide screens)
   ==================================== */

@media (min-width: 1200px) {
    body {
        font-size: 17px;
        line-height: 1.65;
    }

    .chord-text {
        font-size: 1.05rem;
        line-height: 1.85;
    }
}

@media (min-width: 1440px) {
    .content-grid-sidebar {
        grid-template-columns: 1fr 400px;
    }

    body {
        font-size: 18px;
    }
}

/* ====================================
   PRINT STYLES (songbook, general)
   ==================================== */

@media print {
    /* Hide non-essential UI */
    header, footer, nav,
    .site-header, .site-footer, .mobile-menu, .hamburger,
    .beta-banner, .cookie-banner,
    .sb-actions, .sb-share, .sb-share-panel, .sb-embed-share,
    .sb-search, .back-link,
    .remove-btn, .move-btn, .col-actions,
    .reklama, .ad-container, [class*="adsense"], ins.adsbygoogle,
    .songbook-modal, .modal-overlay,
    .content-sidebar, .sidebar {
        display: none !important;
    }

    /* Clean background */
    body, .songbook-page, .main-content, .content-area {
        background: #fff !important;
        color: #000 !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 12pt;
    }

    .songbook-page {
        max-width: 100% !important;
        padding: 10px !important;
    }

    /* Header */
    .sb-header h1 {
        color: #000 !important;
        font-size: 16pt;
        margin-bottom: 4px;
    }
    .sb-header .sb-meta, .sb-header .sb-desc {
        color: #333 !important;
    }

    /* Song table */
    .song-list {
        width: 100% !important;
        border-collapse: collapse;
    }
    .song-list th {
        color: #000 !important;
        border-bottom: 2px solid #000 !important;
        padding: 4px 8px;
        font-size: 10pt;
    }
    .song-list td {
        border-bottom: 1px solid #ccc !important;
        padding: 4px 8px;
        font-size: 10pt;
        color: #000 !important;
    }
    .song-list .col-song a, .song-list .col-artist a {
        color: #000 !important;
        text-decoration: none;
    }
    .song-list .col-type { display: table-cell !important; }
    .type-badge {
        background: none !important;
        color: #000 !important;
        border: 1px solid #999;
        padding: 1px 4px;
        font-size: 8pt;
    }

    /* Remove link underlines, keep compact */
    a { color: #000 !important; text-decoration: none !important; }
    a[href]:after { content: none !important; }
}
