/* CSS Variables */
:root {
    --primary-purple: #6366f1;
    --primary-purple-dark: #4f46e5;
    --primary-purple-light: #8b5cf6;
    --accent-orange: #f59e0b;
    --accent-orange-dark: #d97706;
    --success-green: #10b981;
    --danger-red: #ef4444;
    --neutral-dark: #1f2937;
    --neutral-gray: #6b7280;
    --text-white: #ffffff;
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    overflow-x: hidden;
    background: var(--neutral-dark);
}

/* Main Menu - Keep existing styles */
#main-menu-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    position: relative;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-light) 50%, var(--primary-purple-dark) 100%);
}

.background-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-image: radial-gradient(circle at 25% 25%, white 2px, transparent 2px),
    radial-gradient(circle at 75% 75%, white 2px, transparent 2px);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
}

.menu-container {
    position: relative;
    z-index: 10;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.logo-container h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin: 0 0 16px 0;
    background: linear-gradient(45deg, var(--text-white), #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.25rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
    line-height: 1.6;
}

#start-game-button {
    position: relative;
    background: linear-gradient(45deg, var(--accent-orange), var(--accent-orange-dark));
    color: var(--text-white);
    border: none;
    padding: 18px 36px;
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

#start-game-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.4);
}

.button-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

#start-game-button:hover .button-glow {
    left: 100%;
}

/* Picture-search-blacklist label */
label[for="picture-search-blacklist"] {
    display: block;
    margin: 24px 0 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* Picture-search-blacklist input */
#picture-search-blacklist {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    margin-bottom: 32px;
}

#picture-search-blacklist::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#picture-search-blacklist:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 2px var(--accent-orange);
}

/* Game Section - Redesigned */
#game-section {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Floating Score */
.floating-score {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    color: var(--text-white);
    padding: 12px 24px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.score-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.score-value {
    font-size: 1.2rem;
    color: var(--accent-orange);
}

/* Main Game Screen */
.game-screen {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.panel {
    width: 50%;
    height: 100vh;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--neutral-dark);
}

/* Artist credit styling */
.artist-credit {
    position: absolute;
    bottom: 1%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text-white);
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 0.85rem;
    max-width: 80%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.left-panel .artist-credit {
    left: 1%;
}

.right-panel .artist-credit {
    right: 1%;
}

.artist-title {
    font-weight: 600;
    opacity: 0.8;
}

.artist-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Mobile adjustments for artist credit */
@media (max-width: 768px) {
    .artist-credit {
        font-size: 0.8rem;
        padding: 6px 10px;
        bottom: 15px;
    }

    .left-panel .artist-credit {
        right: auto;
        left: 1%;
        top: 1%;
        bottom: auto;
    }

    .right-panel .artist-credit {
        right: auto;
        left: 1%;
        top: auto;
        bottom: 1%;
    }

    .artist-name {
        max-width: 120px;
    }
}


/* Image link styling */
.image-link-container {
    position: absolute;
    top: 1%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.left-panel .image-link-container {
    left: 1%;
}

.right-panel .image-link-container {
    right: 1%;
}

.image-link {
    color: var(--primary-purple-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.image-link:hover {
    color: var(--accent-orange);
}

/* Mobile adjustments for image links */
@media (max-width: 768px) {
    .image-link-container {
        padding: 6px 10px;
    }

    .right-panel .image-link-container {
        right: auto;
        left: 1%;
    }

    .left-panel .image-link-container {
        top: auto;
        bottom: 1%;
    }

    .image-link {
        font-size: 0.8rem;
    }
}


/* Tag Overlays - Much smaller and cleaner */
.tag-overlay {
    position: absolute;
    top: 50%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    color: var(--text-white);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.left-overlay {
    right: 30px;
}

.right-overlay {
    left: 30px;
}

.tag-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    word-break: break-word;
    line-height: 1.3;
}

.appearance-count {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-white);
}

.appearance-count.mystery {
    color: var(--accent-orange);
    font-size: 3rem;
}

.appearance-label {
    font-size: 0.85rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Guess Buttons - Floating */
.guess-buttons {
    position: absolute;
    bottom: 80px;
    transform: translateX(-50%);
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 50;
}

.buttons-container {
    display: flex;
    gap: 16px;
}

.guess-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 120px;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.guess-btn.higher {
    background: rgba(16, 185, 129, 0.9);
    color: var(--text-white);
}

.guess-instructions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    color: var(--text-white);
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    z-index: 100;
    animation: slideInGuessButtons 0.4s ease-out;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.guess-btn.lower {
    background: rgba(239, 68, 68, 0.9);
    color: var(--text-white);
}

.guess-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.btn-icon {
    font-size: 1.1rem;
    font-weight: bold;
}

/* Floating Results - MOVED HIGHER UP */
.floating-results-wrapper {
    position: fixed;
    top: 75%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
}

.floating-results {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    color: var(--text-white);
    padding: 40px 60px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 300px;
}

#result-message {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.action-buttons button {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 120px;
}

#next-round-button {
    background: linear-gradient(45deg, var(--success-green), #059669);
    color: var(--text-white);
}

#main-menu-return-button {
    background: linear-gradient(45deg, var(--neutral-gray), #4b5563);
    color: var(--text-white);
}

.action-buttons button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Styling for result score in floating results */
#result-score {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--accent-orange);
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    display: inline-block;
}

#result-score .score-value {
    color: var(--primary-purple-light);
    font-size: 1.3rem;
    font-weight: 700;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #result-score {
        font-size: 1rem;
        padding: 6px 12px;
        margin-bottom: 16px;
    }

    #result-score .score-value {
        font-size: 1.1rem;
    }
}

/* Footer */
.game-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    z-index: 10;
}

.creator {
    color: var(--primary-purple-light);
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .game-screen {
        flex-direction: column;
    }

    .panel {
        width: 100%;
        height: 50vh;
    }

    .tag-overlay {
        position: absolute;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        min-width: 180px;
    }

    .left-overlay,
    .right-overlay {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .left-overlay {
        top: auto;
        bottom: 20px;
    }

    .guess-buttons {
        bottom: 50%;
        flex-direction: column;
        align-items: center;
        transform: translate(-50%, 50%);
    }

    .guess-btn {
        width: 140px;
    }

    .guess-instructions {
        bottom: 5%;
        padding: 8px 16px;
        font-size: 0.9rem;
        width: auto;
        max-width: 85%;
        opacity: 0.9;
    }

    .floating-results {
        padding: 30px 40px;
        width: 90%;
        max-width: 400px;
    }

    .floating-results-wrapper {
        top: 83%;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .action-buttons button {
        width: 140px;
    }
}

@media (max-width: 480px) {
    .tag-overlay {
        padding: 16px;
        min-width: 160px;
    }

    .tag-name {
        font-size: 1rem;
    }

    .appearance-count {
        font-size: 2rem;
    }

    .appearance-count.mystery {
        font-size: 2.5rem;
    }

    .floating-score {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .guess-btn {
        padding: 14px 20px;
        font-size: 0.9rem;
        min-width: 110px;
    }

    .buttons-container {
        flex-direction: column;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes slideInTags {
    from {
        opacity: 0;
        transform: translateY(-30%);
    }

    to {
        opacity: 1;
        transform: translateY(-50%);
    }
}

@keyframes slideInTagsMobile {
    from {
        opacity: 0;
        transform: translate(-50%, -30%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}


@keyframes slideInGuessButtons {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }

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

.floating-results {
    animation: slideIn 0.4s ease-out;
}

.guess-buttons {
    animation: slideInGuessButtons 0.4s ease-out;
}

.tag-overlay {
    animation: slideInTags 0.4s ease-out;
}

.panel:hover .tag-overlay {
    transform: translateY(-50%) scale(1.02);
}

@media (max-width: 768px) {
    .panel:hover .tag-overlay {
        transform: translateX(-50%) scale(1.02);
    }

    .tag-overlay {
        animation: slideInTagsMobile 0.4s ease-out;
    }
}

/* Non-clickable links */
.non-clickable {
    pointer-events: none;
    text-decoration: none;
    color: white;
    cursor: default;
}

/* Settings Layout */
.menu-settings {
    margin: 25px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-white);
    font-weight: 500;
    font-size: 1.1rem;
}

/* Třída pro ten doplňkový text, co jsi chtěl vyčlenit */
.setting-description {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* Úprava labelu pro blacklist, aby ladil s novým stylem */
.blacklist-label {
    display: block;
    margin: 10px 0 10px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-white);
    opacity: 0.9;
}

/* Základní obal přepínače */
.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

/* Skrytí původního checkboxu */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Pozadí přepínače (Track) - Defaultně červená pro NSFW */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ef4444; /* Barva z JS pro "Wrong" */
    transition: 0.3s cubic-bezier(0.4, 0.0, 0.2, 1); /* Plynulejší herní animace */
    border-radius: 30px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3); /* Vnitřní stín pro hloubku */
}

/* Samotné kolečko (Knob) */
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: #ffffff;
    transition: 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Lehký stín pod kolečkem */
}

/* Stav zapnuto (Safe Mode) */
input:checked + .slider {
    background-color: #10b981; /* Barva z JS pro "Correct" */
}

/* Pohyb kolečka při zapnutí */
input:checked + .slider:before {
    transform: translateX(24px);
}

/* Focus state pro přístupnost (když uživatel tabuje přes klávesnici) */
input:focus-visible + .slider {
    outline: 2px solid #6366f1; /* Vaše modrá barva z JS (Tie) */
    outline-offset: 2px;
}

/* Pozadí modalu - silnější blur a tmavší překrytí */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

/* Box modalu - používá tvůj styl menu kontejneru */
.modal-content {
    background: rgba(31, 41, 55, 0.9); /* var(--neutral-dark) s opacitou */
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(99, 102, 241, 0.2); /* Jemná fialová záře */
    position: relative;
}

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

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--text-white), #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.close-modal {
    color: var(--neutral-gray);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.close-modal:hover {
    color: var(--danger-red);
    transform: rotate(90deg);
}

#artist-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

/* Stylování scrollbaru pro modal */
#artist-list::-webkit-scrollbar {
    width: 6px;
}
#artist-list::-webkit-scrollbar-thumb {
    background: var(--primary-purple);
    border-radius: 10px;
}

#artist-list li {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    color: var(--text-white);
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

#artist-list li:hover {
    background: rgba(99, 102, 241, 0.15);
    transform: translateX(5px);
}

/* Styl pro ten text "Multiple artists" v panelu */
.clickable-artist {
    color: var(--accent-orange) !important;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px dashed var(--accent-orange);
}

.clickable-artist:hover {
    color: var(--text-white) !important;
    border-bottom: 1px solid var(--text-white);
}

/* Animace pro modal */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Globální footer mimo container */
.global-footer {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    z-index: 20;
    text-align: center;
}

.footer-content {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 10px 25px;
    background: rgba(0, 0, 0, 0.2); /* Velmi jemné ztmavení pozadí pro čitelnost */
    backdrop-filter: blur(5px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Čitelnost jména Shoob */
.made-by {
    color: #ffffff; /* Čistě bílá pro maximální kontrast */
    font-size: 0.95rem;
    font-weight: 400;
}

.made-by a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid var(--primary-purple-light);
    transition: var(--transition);
}

.made-by a:hover {
    color: var(--accent-orange);
    border-bottom-color: var(--accent-orange);
}

/* Oddělovač */
.divider {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
}

/* Donation link jako výrazná pilulka */
.donation-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-orange);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.donation-pill:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.beer-icon {
    font-size: 1.1rem;
}

/* Na mobilech to dáme nad sebe, aby se to nepomačkalo */
@media (max-width: 480px) {
    .footer-content {
        flex-direction: column;
        gap: 10px;
        border-radius: 15px;
    }
    .divider { display: none; }
    .global-footer { bottom: 15px; }
}
