/* Začátek obsahu z původního style.css */
/* === Kompaktní zprávy v chatu === */
.chat-message {
    display: flex;
    align-items: baseline;
    gap: 0.4em;
    background: none;
    border-radius: 0.5em;
    padding: 0.18em 0.5em 0.18em 0.7em;
    margin-bottom: 0.13em;
    font-size: 0.97em;
    line-height: 1.32;
    transition: background 0.2s;
}
.chat-gender-dot {
    display: inline-block;
    width: 0.48em;
    height: 0.48em;
    border-radius: 50%;
    margin-right: 0.18em;
    vertical-align: middle;
    background: #64748b;
}
.chat-message.male .chat-gender-dot { background: #60a5fa; }
.chat-message.female .chat-gender-dot { background: #ec4899; }
.chat-message.neutral .chat-gender-dot { background: #64748b; }
.chat-nick {
    font-weight: bold;
    color: #60a5fa;
    margin-right: 0.13em;
    letter-spacing: 0.01em;
    font-size: 0.98em;
    text-shadow: 0 1px 2px #0f172a44;
    transition: color 0.2s;
}
.chat-time {
    color: #64748b;
    font-size: 0.85em;
    margin-right: 0.5em;
}
.chat-text {
    color: #e5e7eb;
    word-break: break-word;
}
/* OPRAVA: hidden skryje pouze modální okna */
.modal.hidden {
    display: none !important;
}
/* === Veřejný chat (shoutbox) modal === */
#global-chat-modal.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.55);
    z-index: 2100 !important;
}
/* Zajistí, že chat je vždy nad dýní, ale jen když je otevřený */
#global-chat-modal .modal-content {
    z-index: 9999 !important;
    background: linear-gradient(135deg, #0a1833 80%, #14213d 100%);
    border-radius: 1.7em;
    box-shadow: 0 10px 36px 0 rgba(10,24,51,0.60), 0 2px 16px 0 rgba(0,212,255,0.10);
    min-width: 320px;
    max-width: 98vw;
    width: 100%;
    padding: 2.5rem 2rem 1.7rem 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 110px;
    max-height: 80vh;
    overflow: hidden;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    transition: box-shadow 0.2s, background 0.2s;
    animation: chat-modal-fadein 0.4s cubic-bezier(.4,0,.2,1);
}

@keyframes chat-modal-fadein {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
#global-chat-modal .modal-overlay {
    display: none;
}
#global-chat-modal .modal-content h2 {
    text-align: center;
    margin-bottom: 1rem;
}
#global-chat-modal #global-chat-messages {
    background: linear-gradient(120deg, #101c33 80%, #1a2747 100%);
    border-radius: 1.1em;
    padding: 1.1em 0.8em 1.1em 1em;
    min-height: 120px;
    max-height: 40vh;
    overflow-y: auto;
    margin-bottom: 1.2em;
    font-size: 0.97rem;
    scrollbar-width: thin;
    scrollbar-color: #38bdf8 #101c33;
    box-shadow: 0 2px 12px 0 rgba(10,24,51,0.18);
    transition: background 0.2s;
}

/* Jemnější a moderní scrollbar pouze pro chat */
#global-chat-modal #global-chat-messages::-webkit-scrollbar {
    width: 7px;
    background: #232b3b;
    border-radius: 6px;
}
#global-chat-modal #global-chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(120deg, #38bdf8 40%, #22d3ee 100%);
    border-radius: 6px;
    min-height: 30px;
}
#global-chat-modal #global-chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(120deg, #0ea5e9 40%, #06b6d4 100%);
}
#global-chat-modal #global-chat-form {
    display: flex;
    gap: 0.5em;
    background: rgba(20,33,61,0.85);
    border-radius: 0.8em;
    padding: 0.7em 0.7em 0.7em 1em;
    box-shadow: 0 1px 6px 0 rgba(10,24,51,0.10);
}
#global-chat-modal #global-chat-input {
    flex: 1;
    border-radius: 0.5em;
    border: 1px solid #22305a;
    background: #16213e;
    color: #fff;
    padding: 0.7em 1em;
    font-size: 1rem;
    box-shadow: 0 1px 4px 0 rgba(10,24,51,0.08);
}
#global-chat-modal #global-chat-input:focus {
    outline: 2px solid #38bdf8;
    background: #22305a;
}
#global-chat-modal button[type="submit"] {
    background: #38bdf8;
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 0.5em;
    padding: 0.7em 1.3em;
    font-size: 1rem;
    transition: background 0.2s;
    box-shadow: 0 1px 4px 0 rgba(10,24,51,0.10);
}
#global-chat-modal button[type="submit"]:hover {
    background: #0ea5e9;
}
#global-chat-modal #close-global-chat-modal {
    position: absolute;
    top: 0.7em;
    right: 1em;
    font-size: 2rem;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 9999;
    transition: color 0.2s;
}
#global-chat-modal #close-global-chat-modal:hover {
    color: #fff;
}
/* Badge pro počet nových zpráv */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0.2em;
    right: 0.2em;
    min-width: 1.2em;
    height: 1.2em;
    padding: 0 0.3em;
    background: #ef4444;
    color: #fff;
    font-size: 0.85em;
    font-weight: bold;
    border-radius: 9999px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.2s;
}
.badge.hidden {
    display: none;
}
/* Nový úzký karusel, střed, bez podbarvení, s gradientem na okrajích */
/* Karusel je vždy vystředěný, úzký, nikdy nepřekrývá pravý horní roh (login/hamburger) */
/* Karusel je vždy vystředěný, úzký, nikdy nepřekrývá pravý horní roh (login/hamburger) */
.info-marquee-center {
    width: 70vw;
    min-width: 220px;
    max-width: 600px;
    position: absolute;
    top: 0.5em;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    overflow: hidden;
    pointer-events: none;
    height: 2.1em;
    display: flex;
    align-items: center;
}

/* Track je označitelný, ale neblokuje overlaye */
.info-marquee-center-track {
    display: inline-block;
    white-space: nowrap;
    color: #fff;
    font-size: 0.75em;
    font-weight: 500;
    animation: info-marquee-center-scroll 120s linear infinite;
    padding-left: 100%;
    pointer-events: auto;
}

@keyframes info-marquee-center-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

.info-marquee-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2.5em;
    pointer-events: none;
    z-index: 121;
}

.info-marquee-fade-left {
    left: 0;
    background: linear-gradient(to right, transparent 0%, transparent 100%);
}

.info-marquee-fade-right {
    right: 0;
    background: linear-gradient(to left, transparent 0%, transparent 100%);
}

@media (max-width: 600px) {
    .info-marquee-center {
        width: 98vw;
        max-width: 99vw;
        font-size: 0.75em;
        top: 0.2em;
        left: 50%;
        transform: translateX(-50%);
    }

    .info-marquee-center-track {
        font-size: 0.75em;
        padding-left: 100vw;
    }
}

/* Zajisti, že hamburger menu je vždy nad karuselem a Halloween tlačítkem */
#hamburger-container,
#mobile-menu {
    z-index: 200 !important;
}

/* Halloween tlačítko musí být POD hamburger menu */
#halloween-corner {
    z-index: 150 !important;
}

#message-box {
    z-index: 99999 !important;
}

/* Všechny modaly mají extra vysoký z-index, aby byly vždy nad detaily a panely */
.modal {
    z-index: 2100 !important;
}

#item-detail-modal {
    z-index: 1500 !important;
}

@media (max-width: 640px) {
    .switcher-track .search-type-btn {
        display: block;
        width: 100%;
        height: auto;
        padding: 0.7em 0;
        font-size: 1.05rem;
        text-align: center;
        border-radius: 0.5em;
        margin: 0.1em 0;
    }

    .switcher-track .search-type-btn span,
    .switcher-track .search-type-btn svg {
        vertical-align: middle !important;
        margin-left: 0.2em;
    }

    /* Skryj tlačítko Zprávy v hlavním panelu na mobilu */
    #show-messages-btn {
        display: none !important;
    }
}

.container>.card {
    padding-top: 1.2rem;
    padding-bottom: 1.2rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.container>.card {
    box-shadow: 0 0 32px 0 rgba(33, 150, 243, 0.18), 0 2px 16px 0 rgba(0, 212, 255, 0.12);
    border-radius: 1.2em;
}

body:not(.theme-halloween) .binge-blue-title {
    box-shadow: none;
}

@media (max-width: 640px) {
    .main-banner-gap {
        margin-bottom: 0.5rem !important;
    }
}

@media (max-width: 640px) {
    #halloween-corner {
        font-size: 1.3rem !important;
    }
}

@media (max-width: 640px) {

    .binge-blue-title .deco-knife,
    .binge-blue-title .deco-skull {
        font-size: 0.55em !important;
        margin-right: 0.05em !important;
        margin-left: 0 !important;
    }
}

@media (max-width: 640px) {
    .binge-blue-title {
        font-size: 2.1rem !important;
    }
}

body.theme-halloween .binge-blue-title .deco-skull {
    font-size: 0.7em !important;
    vertical-align: -0.08em;
}

@media (max-width: 640px) {

    .halloween-bat.bat3,
    .halloween-bat.bat4 {
        display: none !important;
    }
}

/* Skrytí lebky a nože v banneru mimo Halloween téma */
.only-halloween {
    display: none !important;
}

body.theme-halloween .only-halloween {
    display: inline !important;
}

body.theme-halloween .main-banner-desc {
    color: #ef4444 !important;
}

body.theme-halloween .binge-blue-title .deco-knife {
    font-size: 0.7em !important;
    vertical-align: -0.08em;
}

/* Skrytí očí a krvavého efektu v banneru mimo Halloween téma */
.binge-blue-title .halloween-eyes {
    display: none;
}

.binge-blue-title .halloween-blood-drip {
    display: none;
}

/* --- Oči nad nápisem BingeBlue pouze pro Halloween téma --- */
body.theme-halloween .binge-blue-title .halloween-eyes {
    display: inline-block;
    position: absolute;
    left: 30%;
    top: -1.6em;
    font-size: 0.6em;
    z-index: 10;
    animation: eyes-blink 7s infinite;
    filter: drop-shadow(0 0 8px #fff8);
    pointer-events: none;
}

@keyframes eyes-blink {

    0%,
    97%,
    100% {
        opacity: 1;
    }

    98%,
    99% {
        opacity: 0.1;
    }
}

/* --- Krvavý efekt pod nápisem BingeBlue pouze pro Halloween téma --- */
body.theme-halloween .binge-blue-title {
    position: relative;
    text-shadow: 0 2px 16px #ff3b3b99, 0 1px 0 #fff, 0 0 2px #3b82f6;
}

body.theme-halloween .binge-blue-title .halloween-blood-drip {
    display: block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -0.5em;
    width: 2.8em;
    height: 1.2em;
    pointer-events: none;
    z-index: 2;
    background: none;
}

body.theme-halloween .binge-blue-title .halloween-blood-drip::before {
    content: '';
    display: block;
    width: 100%;
    height: 0.5em;
    background: linear-gradient(180deg, #ff3b3b 60%, #a80000 100%);
    border-radius: 0 0 1em 1em;
    box-shadow: 0 2px 8px #a8000055;
}

body.theme-halloween .binge-blue-title .halloween-blood-drip::after {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    top: 0.5em;
    width: 0.4em;
    height: 0.8em;
    background: linear-gradient(180deg, #ff3b3b 60%, #a80000 100%);
    border-radius: 0 0 0.3em 0.3em;
    transform: translateX(-50%);
    animation: bloodDripAnim 2.2s infinite linear;
    box-shadow: 0 1px 4px #a8000055;
}

@keyframes bloodDripAnim {
    0% {
        height: 0.2em;
        opacity: 0.7;
    }

    60% {
        height: 0.8em;
        opacity: 1;
    }

    100% {
        height: 0.2em;
        opacity: 0.7;
    }
}

/* --- BingeBlue custom styl pro název v banneru --- */
.binge-blue-title {
    display: inline-block;
    font-family: 'Orbitron', 'Inter', Arial, sans-serif !important;
    font-size: 3.2rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-shadow: 0 2px 16px #2563eb55, 0 1px 0 #fff, 0 0 2px #3b82f6;
    color: #fff;
    background: none;
    padding: 0.1em 0.3em;
    border-radius: 0.3em;
}

/* Výraznější modrý gradient a záře pro část 'Blue' v názvu */
.binge-blue-title .blue-gradient {
    background: linear-gradient(90deg, #00eaff 0%, #2196f3 10%, #1565c0 30%, #005bea 50%, #1565c0 70%, #2196f3 90%, #0d47a1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    /* Odstraněno transparentní vyplnění, aby gradient byl opravdu vybarvený */
    /* -webkit-text-fill-color: transparent; */
    /* color: transparent; */
    text-shadow:
        0 0 2px #fff,
        0 1px 0 #fff,
        0 0 8px #2196f3,
        0 0 6px #1565c0,
        0 0 2px #005bea;
    font-weight: 900;
    letter-spacing: 0.04em;
    animation: blueGlow 3.5s ease-in-out infinite alternate;
}

@keyframes blueGlow {
    0% {
        filter: drop-shadow(0 0 0px #2196f3) opacity(0.85);
    }

    100% {
        filter: drop-shadow(0 0 4px #1565c0) opacity(1);
    }
}

@media (max-width: 640px) {
    .container {
        padding-top: 2.5rem !important;
    }
}

@media (max-width: 640px) {

    .bangers-title .deco-hanged,
    .deco-hanged {
        display: none !important;
    }
}

/* Styl pro klasickou ikonu chatbota */
#chat-toggle-btn .classic-icon {
    display: flex;
    /* Změněno na flex pro centrování SVG */
    align-items: center;
    justify-content: center;
}

#chat-toggle-btn .classic-icon svg {
    width: 28px;
    /* Zvětšeno pro lepší viditelnost */
    height: 28px;
}

/* Stylizované oko pro vstup chatbota - POUZE PRO HALLOWEEN */
#chat-toggle-btn .bot-eye {
    display: none;
    /* Skryté ve výchozím stavu */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: radial-gradient(ellipse at center, #f7ff6a 60%, #b6ff4a 85%, #222 100%);
    border-radius: 50%;
    box-shadow: 0 0 24px 6px #eaff00cc, 0 0 0 2px #222 inset;
    z-index: 2;
    border: 2px solid #b6ff4a;
}

#chat-toggle-btn .bot-eye-pupil {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 18px;
    background: #222;
    border-radius: 50% 50% 60% 60%/60% 60% 50% 50%;
    box-shadow: 0 0 6px 2px #000a inset;
    z-index: 3;
    animation: bot-pupil-blink 12s infinite;
}

@keyframes bot-pupil-blink {

    0%,
    95%,
    100% {
        height: 18px;
    }

    97% {
        height: 4px;
    }

    98% {
        height: 18px;
    }
}

#chat-toggle-btn .bot-eye-reflection {
    position: absolute;
    left: 60%;
    top: 38%;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    z-index: 4;
    filter: blur(0.5px);
}

/* Logika zobrazení pro Halloween téma */
body.theme-halloween #chat-toggle-btn .classic-icon {
    display: none;
}

body.theme-halloween #chat-toggle-btn .bot-eye {
    display: block;
}

/* === HALLOWEEN ANIMACE === */
/* Mlha dole */
.halloween-fog {
    display: none;
}

body.theme-halloween .halloween-fog {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 80px;
    z-index: 1200;
    pointer-events: none;
    background: linear-gradient(to top, #fff2 60%, transparent 100%);
    animation: fog-move 32s linear infinite alternate;
}

@keyframes fog-move {
    0% {
        filter: blur(8px) opacity(0.7);
    }

    100% {
        filter: blur(16px) opacity(0.9);
    }
}

/* Oči v rohu */
.halloween-eyes {
    display: none;
}

body.theme-halloween .halloween-eyes {
    display: block;
    position: fixed;
    top: 1.2rem;
    right: 1.5rem;
    z-index: 2001;
    font-size: 2.2rem;
    animation: eyes-blink 14s infinite;
    filter: drop-shadow(0 0 8px #fff8);
}

@keyframes eyes-blink {

    0%,
    92%,
    100% {
        opacity: 1;
    }

    95% {
        opacity: 0.1;
    }

    98% {
        opacity: 1;
    }
}

/* Pavučina a pavouk */
.halloween-web {
    display: none;
}

body.theme-halloween .halloween-web {
    display: block;
    position: fixed;
    top: 0.5rem;
    left: 1.2rem;
    z-index: 2001;
    font-size: 2.2rem;
}

.halloween-spider {
    display: none;
}

body.theme-halloween .halloween-spider {
    display: block;
    position: fixed;
    top: 2.2rem;
    left: 2.1rem;
    z-index: 2002;
    font-size: 1.7rem;
    animation: spider-down 12s infinite alternate;
}

@keyframes spider-down {
    0% {
        transform: translateY(-1.2em);
    }

    100% {
        transform: translateY(2.5em);
    }
}

/* Blesk */
.halloween-flash {
    display: none;
}

body.theme-halloween .halloween-flash {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(255, 255, 255, 0.18);
    pointer-events: none;
    opacity: 0;
    animation: flash-lightning 24s infinite;
}

@keyframes flash-lightning {

    0%,
    97%,
    100% {
        opacity: 0;
    }

    98% {
        opacity: 1;
    }

    99% {
        opacity: 0;
    }
}

/* Padající netopýři */
.halloween-bats {
    display: none;
}

body.theme-halloween .halloween-bats {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    top: 0.5rem;
    z-index: 2001;
    width: 100vw;
    pointer-events: none;
}

/* Netopýři poletují a krouží */
.halloween-bat {
    position: absolute;
    font-size: 1.5rem;
    animation-duration: 9s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

.halloween-bat.bat1 {
    animation-name: bat-fly1;
    left: 10vw;
    animation-delay: 0s;
    animation-duration: 32s;
}

.halloween-bat.bat2 {
    animation-name: bat-fly2;
    left: 30vw;
    animation-delay: 2s;
    animation-duration: 32s;
}

.halloween-bat.bat3 {
    animation-name: bat-fly3;
    left: 60vw;
    animation-delay: 4s;
    animation-duration: 32s;
}

.halloween-bat.bat4 {
    animation-name: bat-fly4;
    left: 80vw;
    animation-delay: 1s;
    animation-duration: 32s;
}

@media (max-width: 640px) {
    .halloween-bat.bat1 {
        left: 8vw !important;
    }

    .halloween-bat.bat2 {
        left: 72vw !important;
    }
}

@keyframes bat-fly1 {
    0% {
        top: 0.5rem;
        transform: scaleX(1) rotate(-10deg);
        opacity: 0.7;
    }

    10% {
        top: 8vh;
        left: 12vw;
    }

    20% {
        top: 18vh;
        left: 15vw;
    }

    30% {
        top: 12vh;
        left: 18vw;
    }

    40% {
        top: 22vh;
        left: 14vw;
    }

    50% {
        top: 8vh;
        left: 10vw;
    }

    60% {
        top: 20vh;
        left: 13vw;
    }

    70% {
        top: 14vh;
        left: 17vw;
    }

    80% {
        top: 4vh;
        left: 12vw;
    }

    100% {
        top: 0.5rem;
        left: 10vw;
        transform: scaleX(1) rotate(-10deg);
        opacity: 0.7;
    }
}

@keyframes bat-fly2 {
    0% {
        top: 4vh;
        transform: scaleX(-1) rotate(10deg);
        opacity: 0.7;
    }

    15% {
        top: 14vh;
        left: 32vw;
    }

    30% {
        top: 8vh;
        left: 35vw;
    }

    45% {
        top: 22vh;
        left: 28vw;
    }

    60% {
        top: 10vh;
        left: 33vw;
    }

    75% {
        top: 18vh;
        left: 31vw;
    }

    100% {
        top: 4vh;
        left: 30vw;
        transform: scaleX(-1) rotate(10deg);
        opacity: 0.7;
    }
}

@keyframes bat-fly3 {
    0% {
        top: 8vh;
        transform: scaleX(1) rotate(-8deg);
        opacity: 0.7;
    }

    20% {
        top: 18vh;
        left: 62vw;
    }

    40% {
        top: 10vh;
        left: 65vw;
    }

    60% {
        top: 24vh;
        left: 68vw;
    }

    80% {
        top: 12vh;
        left: 63vw;
    }

    100% {
        top: 8vh;
        left: 60vw;
        transform: scaleX(1) rotate(-8deg);
        opacity: 0.7;
    }
}

@keyframes bat-fly4 {
    0% {
        top: 6vh;
        transform: scaleX(-1) rotate(8deg);
        opacity: 0.7;
    }

    25% {
        top: 16vh;
        left: 82vw;
    }

    50% {
        top: 10vh;
        left: 85vw;
    }

    75% {
        top: 24vh;
        left: 88vw;
    }

    100% {
        top: 6vh;
        left: 80vw;
        transform: scaleX(-1) rotate(8deg);
        opacity: 0.7;
    }
}

/* Duch proplouvající obrazovkou */
.halloween-ghost {
    display: none;
}

body.theme-halloween .halloween-ghost {
    display: block;
    position: fixed;
    left: -4rem;
    bottom: 8rem;
    z-index: 2002;
    font-size: 1.7rem;
    opacity: 0.7;
    animation: ghost-move 36s linear infinite;
}

@keyframes ghost-move {
    0% {
        left: -4rem;
        bottom: 8rem;
        opacity: 0.7;
    }

    10% {
        opacity: 1;
    }

    50% {
        left: 60vw;
        bottom: 12rem;
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        left: 104vw;
        bottom: 7rem;
        opacity: 0.7;
    }
}

/* Kapky krve po stranách hlavního panelu */
.halloween-blood-side {
    display: none;
}

body.theme-halloween .halloween-blood-side {
    display: block;
    font-size: 1.2em !important;
    filter: drop-shadow(0 2px 2px #a80000cc);
}

.blood-drip-left,
.blood-drip-right {
    position: absolute;
    top: 0;
    font-size: 1.3em;
    z-index: 1001;
    animation: blood-side-drip 14s infinite linear;
}

.blood-drip-left {
    left: -0.7em;
    top: 0.05em;
}

.blood-drip-right {
    right: -0.7em;
}

@keyframes blood-side-drip {
    0% {
        opacity: 0;
        transform: translateY(-1em) scaleY(0.7);
    }

    10% {
        opacity: 1;
    }

    40% {
        opacity: 1;
        transform: translateY(1.5em) scaleY(1.1);
    }

    90% {
        opacity: 1;
        transform: translateY(2.5em) scaleY(1.2);
    }

    100% {
        opacity: 0;
        transform: translateY(-1em) scaleY(0.7);
    }
}

/* Strašidelný měsíc na obloze */
/* Strašidelný měsíc v zatmění */
.halloween-moon {
    display: none;
}

body.theme-halloween .halloween-moon {
    display: block;
    position: fixed;
    top: 0.7rem;
    left: 4vw;
    z-index: 1999;
    font-size: 4.2rem;
    filter: drop-shadow(0 0 16px #fff6) drop-shadow(0 0 8px #fffa);
    pointer-events: none;
    user-select: none;
    animation: moon-glow 14s infinite alternate ease-in-out;
}

@keyframes moon-glow {
    0% {
        filter: drop-shadow(0 0 32px #fff6) drop-shadow(0 0 12px #fffa);
    }

    100% {
        filter: drop-shadow(0 0 64px #fff9) drop-shadow(0 0 24px #fff7);
    }
}

/* Halloween dekorace kolem nadpisu */
.halloween-deco {
    display: none;
}

body.theme-halloween .halloween-deco {
    display: block;
}

/* Menší dekorace a pomalejší animace */
.deco-skull {
    position: absolute;
    left: -2.2em;
    top: 0.1em;
    font-size: 1.2em;
    animation: swing 7s infinite ease-in-out;
    transform-origin: 60% 0%;
}

.deco-knife {
    position: absolute;
    right: -1.5em;
    top: 0.2em;
    font-size: 1.2em;
    animation: knife-fall 8s infinite cubic-bezier(.7, 0, .3, 1);
}

.deco-blood {
    position: absolute;
    left: 50%;
    bottom: -1.2em;
    font-size: 1em;
    transform: translateX(-50%);
    animation: blood-drip 6s infinite linear;
}

.deco-hanged {
    position: absolute;
    right: -3em;
    bottom: -1.2em;
    font-size: 1.2em;
    animation: hanged-swing 10s infinite ease-in-out;
    transform-origin: 50% 0%;
}

@keyframes swing {
    0% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(10deg);
    }

    100% {
        transform: rotate(-10deg);
    }
}

@keyframes knife-fall {
    0% {
        transform: translateY(-1em) rotate(-30deg);
        opacity: 0.7;
    }

    60% {
        transform: translateY(0.2em) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(-1em) rotate(-30deg);
        opacity: 0.7;
    }
}

@keyframes blood-drip {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-0.5em) scaleY(0.7);
    }

    30% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scaleY(1);
    }

    80% {
        opacity: 1;
        transform: translateX(-50%) translateY(0.5em) scaleY(1.2);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-0.5em) scaleY(0.7);
    }
}

@keyframes hanged-swing {
    0% {
        transform: rotate(-8deg);
    }

    50% {
        transform: rotate(8deg);
    }

    100% {
        transform: rotate(-8deg);
    }
}

/* === Halloween téma === */
body.theme-halloween {
    background: linear-gradient(160deg, #1a1a1a 0%, #ff7518 100%) !important;
    color: #fffbe7;
}

body.theme-halloween .card {
    background-color: rgba(40, 16, 0, 0.85);
    box-shadow: 0 0 40px 0 #ff7518, 0 0 0 0 #000;
}

body.theme-halloween h1 {
    color: #ff7518 !important;
    font-family: 'Mouse Memoirs', 'Inter', sans-serif !important;
    text-shadow: none;
    animation: none;
}

body.theme-halloween .amp {
    color: #fffbe7 !important;
}

@keyframes shake {
    0% {
        transform: rotate(-1deg);
    }

    100% {
        transform: rotate(1deg);
    }
}

body.theme-halloween .btn {
    background-color: #ff7518 !important;
    color: #1a1a1a !important;
    box-shadow: 0 4px 15px -5px #ff7518;
}

body.theme-halloween .btn:hover:not(:disabled) {
    background-color: #ffae42 !important;
}

body.theme-halloween .switcher-track button.active {
    background-color: #ff7518 !important;
    color: #1a1a1a !important;
}

/* --- Dekorace: dýně v rohu --- */
#halloween-corner {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    z-index: 150; /* OPRAVENO: Musí být POD hamburger menu (z-index: 200) */
    font-size: 2.2rem;
    cursor: pointer;
    transition: transform 0.2s;
}

@media (max-width: 640px) {
    #halloween-corner {
        top: 0;
        font-size: 2rem;
    }
}

#halloween-corner:hover {
    transform: scale(1.15) rotate(-8deg);
}

.amp {
    color: #3b82f6;
    font-family: 'Inter', sans-serif;
    font-size: 1em;
    vertical-align: middle;
}

@media (max-width: 640px) {
    .animate-slide-in-right {
        animation: slide-in-right 0.25s cubic-bezier(.4, 2, .6, 1);
    }
}

@keyframes slide-in-right {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- Styly s atmosférou kina pro poutavý vzhled --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Nová animace pro pulzující nadpis --- */
@keyframes pulse-white {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 0 0 12px rgba(255, 255, 255, 0.3);
    }

    50% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 25px rgba(255, 255, 255, 0.5);
    }
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(170deg, #1e1b4b 0%, #020617 100%);
    color: #d1d5db;
    /* Světle šedý text pro lepší čitelnost */
    min-height: 100vh;
}

.container {
    animation: fadeIn 0.8s ease-out forwards;
}

.card {
    background-color: rgba(30, 41, 59, 0.75);
    /* Původní tmavě modrá s průhledností */
    border-radius: 1.5rem;
    padding: 2rem;
    /* ZMĚNA: Použijeme vnitřní stín pro efekt ztracení okrajů */
    box-shadow: inset 0 0 70px 0px rgba(0, 0, 0, 0.5);
    border: none;
    /* Odebrání původního okraje */
    backdrop-filter: blur(10px);
    position: relative;
    /* Nutné pro nový okraj */
}

/* --- ODSTRANĚNO: Efektní okraj již není potřeba --- */
/* .card::before { ... } */


/* --- NOVÉ: Menší padding na mobilu pro lepší využití místa --- */
@media (max-width: 640px) {
    .card {
        padding: 1rem;
        /* margin-top: -4.7rem !important;  pouze pro Halloween téma */
    }
}

#user-input {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
    padding-right: 2.5rem;
    /* Space for the clear button */
}

#user-input::placeholder {
    color: #64748b;
}

#user-input:focus {
    background-color: #0f172a;
    border-color: #3b82f6;
}

/* Zajisti, že tlačítka jsou plně klikací včetně paddingu */
/* Zajisti, že tlačítka jsou plně klikací a nad ostatními prvky */
.btn {
    display: inline-block;
    position: relative;
    z-index: 10;
    background-color: #3b82f6;
    /* Jasnější modrá pro kontrast */
    color: white;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 15px -5px rgba(59, 130, 246, 0.6);
}

.btn:hover:not(:disabled) {
    background-color: #60a5fa;
    transform: scale(1.05);
    box-shadow: 0 6px 20px -5px rgba(96, 165, 250, 0.7);
}

.btn:disabled {
    background-color: #334155;
    cursor: not-allowed;
    opacity: 0.6;
}

.action-row-btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.random-btn {
    background-color: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
}

.random-btn:hover:not(:disabled) {
    background-color: #334155;
    color: #e2e8f0;
    border-color: #475569;
}

/* --- NOVÉ: Vylepšená ikonka pro náhodný tip --- */
#random-tip-icon-btn svg {
    transition: transform 0.2s ease-in-out;
}

#random-tip-icon-btn:hover svg {
    transform: rotate(20deg) scale(1.1);
}

/* Moved from inline styles for better maintainability */
.movie-night-btn-style {
    background-color: #8b5cf6;
}

.movie-night-btn-style:hover:not(:disabled) {
    background-color: #a78bfa;
}

.trivia-btn-main-style {
    background-color: #f59e0b;
}

.trivia-btn-main-style:hover:not(:disabled) {
    background-color: #fbbf24;
}

/* Styl pro tlačítka žebříčků */
.rankings-btn {
    background-color: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.rankings-btn.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.rankings-btn:hover:not(.active) {
    background-color: #334155;
}

/* === NOVÉ: Styly pro filter tlačítek Watchlistu === */
.filter-btn {
    background-color: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: bold;
    transition: all 0.2s ease;
}

.filter-btn.active {
    background-color: #ec4899;
    /* Růžová pro Watchlist */
    color: white;
    border-color: #ec4899;
}

.filter-btn:hover:not(.active) {
    background-color: #334155;
}

/* === KONEC NOVÝCH STYLŮ === */


/* Vylepšená animace pro sekci žebříčků */
#rankings-options {
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.5s ease;
    transform: translateY(-10px);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#rankings-options.show-rankings {
    transform: translateY(0);
    max-height: 500px;
    opacity: 1;
    margin-top: 1rem;
}

/* --- VYLEPŠENÉ STYLY PRO KARTY FILMŮ (GRID) --- */
#item-list {
    display: grid;
    /* Použijeme auto-fill pro responzivní počet sloupců */
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.25rem;
    /* Zmenšená mezera na desktopu */
}

@media (max-width: 640px) {
    #item-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
        /* Minimalizovaná mezera na mobilu */
    }
}

.item-card {
    background-color: transparent;
    /* Pozadí bude tvořit plakát */
    border-radius: 0.5rem;
    overflow: visible;
    /* Povolí "vyskakovací" efekt */
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
    /* Pro animaci */
}

.item-card:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    z-index: 20;
}

.item-card .poster-container {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    background-color: #1e293b;
    /* Fallback color */
    border-radius: 0.5rem;
    overflow: hidden;
}

.item-card .poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.item-card .card-info {
    position: relative;
    /* PŘIDÁNO: Nutné pro pozicování hodnocení */
    padding: 0.75rem;
    padding-top: 20px;
    /* PŘIDÁNO: Vytvoří místo pro přesahující hodnocení */
    background-color: #1e293b;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.item-card .card-title {
    font-weight: bold;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.item-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* --- NOVÉ STYLY PRO DETAILNÍ INFORMACE NA KARTĚ --- */
.card-extra-details {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1rem;
    /* Zajistí stabilitu layoutu při načítání */
}

.card-providers {
    margin-top: 0.35rem;
    display: flex;
    gap: 0.25rem;
    min-height: 1rem;
}

.card-providers img {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
}

.item-card .watchlist-btn-overlay {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: rgba(30, 41, 59, 0.7);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s, background-color 0.2s ease, transform 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.item-card:hover .watchlist-btn-overlay {
    opacity: 1;
    transform: scale(1);
}

.item-card .watchlist-btn-overlay:hover {
    background-color: rgba(51, 65, 85, 0.9);
}

/* --- NOVÉ: Styly pro tlačítko přehrání traileru na kartě --- */
.trailer-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(30, 41, 59, 0.7);
    border-radius: 50%;
    width: 56px;
    /* Větší pro snadnější kliknutí */
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s, transform 0.3s ease;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    cursor: pointer;
    z-index: 10;
}

.item-card:hover .trailer-play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.trailer-play-overlay:hover {
    background-color: rgba(59, 130, 246, 0.8);
}

.trailer-iframe-on-card {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0.5rem;
    /* Zachová zaoblení kontejneru */
}

/* --- Konec nových stylů --- */

.item-card .watchlist-btn {
    padding: 0;
}

/* --- NOVÉ STYLY PRO HODNOCENÍ NA PLAKÁTU --- */
.rating-circle {
    position: absolute;
    top: -20px;
    /* ZMĚNA: Pozicuje se od horního okraje card-info */
    left: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    background-image: conic-gradient(var(--rating-color, #64748b) calc(var(--percentage, 0) * 1%),
            #334155 0);
    padding: 3px;
}

.rating-value {
    width: 100%;
    height: 100%;
    background-color: #0f172a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    color: white;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.rating-value sup {
    font-size: 0.5rem;
    font-weight: bold;
    margin-left: 1px;
}

/* --- Upravený styl pro nadpis h1 --- */
h1 {
    font-family: 'Mouse Memoirs', 'Inter', sans-serif;
    /* Nové písmo s fallbackem */
    color: #ffffff;
    /* animation: pulse-white 15s ease-in-out infinite; */
    letter-spacing: 0.06em;
}

h2 {
    color: #f1f5f9;
}

.message-box {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    background-color: #16a34a;
    color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    z-index: 99999 !important;
}

.message-box.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.pagination-btn {
    background-color: #334155;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: bold;
    transition: background-color 0.3s ease-in-out;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #475569;
}

.pagination-btn:disabled {
    background-color: #1e293b;
    color: #64748b;
    cursor: not-allowed;
}

.read-more-btn {
    color: #f472b6;
    /* Změněno na růžovou pro odlišení */
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.2s ease;
    display: inline-block;
    margin-left: 4px;
}

.read-more-btn:hover {
    color: #fb7185;
    /* Světlejší růžová */
    text-decoration: underline;
}

.action-btn {
    background-color: transparent;
    border: 1px solid;
    border-radius: 9999px;
    padding: 0.3rem 0.8rem;
    font-weight: bold;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.action-btn:disabled {
    border-color: #475569;
    color: #475569;
    cursor: not-allowed;
    opacity: 0.5;
}

.action-btn:disabled:hover {
    background-color: transparent;
}

/* === NOVÉ: Styl pro Admin tlačítko === */
.force-refresh-btn {
    border-color: #ef4444;
    /* Červená barva */
    color: #ef4444;
}

.force-refresh-btn:hover:not(:disabled) {
    background-color: #ef4444;
    color: white;
}

.trailer-btn {
    border-color: #3b82f6;
    color: #3b82f6;
}

.trailer-btn:hover:not(:disabled) {
    background-color: #3b82f6;
    color: white;
}

.trailer-btn-disabled {
    border-color: #475569;
    color: #475569;
    cursor: not-allowed;
}

.ai-review-btn {
    border-color: #a78bfa;
    color: #a78bfa;
}

.ai-review-btn:hover:not(:disabled) {
    background-color: #a78bfa;
    color: white;
}

.news-btn {
    border-color: #22d3ee;
    color: #22d3ee;
}

.news-btn:hover:not(:disabled) {
    background-color: #22d3ee;
    color: white;
}

.trivia-btn {
    border-color: #facc15;
    color: #facc15;
}

.trivia-btn:hover:not(:disabled) {
    background-color: #facc15;
    color: white;
}

.next-reco-btn {
    border-color: #06b6d4;
    color: #06b6d4;
}

.next-reco-btn:hover:not(:disabled) {
    background-color: #06b6d4;
    color: white;
}

.reco-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.reco-item:hover {
    background-color: rgba(71, 85, 105, 0.4);
}

/* === NOVÝ STYL PRO SKROLOVACÍ LIŠTU PŘEPÍNAČE === */
.switcher-track {
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.switcher-track::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, and Opera */
}

/* === NOVÉ STYLY PRO FILTROVACÍ MODAL === */
#filter-modal .modal-content {
    max-height: 90vh;
}

.genre-btn {
    background-color: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.genre-btn:hover:not(.active) {
    background-color: #334155;
    color: white;
}

.genre-btn.active {
    background-color: #0ea5e9;
    /* Tyrkysová pro filtry */
    color: white;
    border-color: #0ea5e9;
}

/* === KONEC NOVÝCH STYLŮ === */

.person-card {
    background-color: #1e293b;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #334155;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    cursor: pointer;
    text-align: center;
}

.person-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: #3b82f6;
}

.modal {
    transition: opacity 0.3s ease;
}

.modal-content {
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #1e293b;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

#movie-night-modal .modal-content {
    max-height: 70vh;
}

/* UPRAVENO: Zvětšená výška pro detaily filmu na PC */
#item-detail-modal .modal-content {
    font-size: 0.9rem;
    max-height: 80vh;
}

#item-detail-modal .modal-content h3 {
    font-size: 1.75rem;
}

#item-detail-modal .modal-content h4 {
    font-size: 1.1rem;
}

#item-detail-modal .modal-content h5 {
    font-size: 1rem;
}

#item-detail-modal .modal-content p {
    font-size: 0.85rem;
    line-height: 1.4;
}

#item-detail-modal .modal-content ul li {
    font-size: 0.8rem;
}

#item-detail-modal .modal-content .text-sm {
    font-size: 0.75rem;
}

#item-detail-modal .modal-content .text-xs {
    font-size: 0.7rem;
}

/* Zmenšené fotky herců v detailech */
#item-detail-modal .cast-container>div {
    width: 5rem;
}

#item-detail-modal .cast-container img {
    width: 4rem;
    height: 4rem;
}

/* Mobilní optimalizace pro detaily filmu */
@media (max-width: 640px) {
    #item-detail-modal .modal-content {
        font-size: 0.8rem;
    }

    #item-detail-modal .modal-content h3 {
        font-size: 1.5rem;
    }

    #item-detail-modal .modal-content h4 {
        font-size: 1rem;
    }

    #item-detail-modal .modal-content p {
        font-size: 0.8rem;
    }

    #item-detail-modal .cast-container>div {
        width: 4rem;
    }

    #item-detail-modal .cast-container img {
        width: 3rem;
        height: 3rem;
    }
}

.aspect-ratio-16-9 {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
}

.aspect-ratio-16-9 iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.review-content,
.web-content,
.reco-content {
    background-color: #334155;
    padding: 1rem;
    border-radius: 0.5rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    animation: fadeIn 0.5s ease-out;
}

.review-content {
    border-left: 4px solid #a78bfa;
}

.web-content {
    border-left: 4px solid #22d3ee;
}

.reco-content {
    border-left: 4px solid #06b6d4;
}

.cast-container {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
}

/* --- UPRAVENO: Nový styl pro našeptávač s obrázky --- */
.suggestion-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* mezera mezi obrázkem a textem */
}

.suggestion-item:hover {
    background-color: #334155;
}

/* --- UPRAVENO: Nový styl tlačítek pro lepší splynutí --- */
.search-type-btn {
    color: #cbd5e1;
    background: none;
    border: none;
    box-shadow: none;
    font-size: 0.97rem;
    font-weight: 600;
    padding: 0.32rem 0.7rem;
    margin: 0 0.05em;
    border-radius: 0.5em;
    transition: color 0.18s;
    outline: none;
    cursor: pointer;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.5;
}

.search-type-btn * {
    vertical-align: middle !important;
}

.search-type-btn:hover:not(.active),
.search-type-btn:focus-visible:not(.active) {
    color: #38bdf8;
    background: none;
    text-decoration: none;
}

.search-type-btn.active {
    color: #38bdf8;
    font-weight: 700;
    background: none;
    border: none;
    box-shadow: none;
}

/* --- Styly pro Kvíz "Milionář" --- */
#trivia-modal .modal-content {
    max-height: 80vh;
}

#trivia-question {
    min-height: 84px;
}

/* NOVÉ: Menší písmo pro otázky na mobilu */
@media (max-width: 640px) {
    #trivia-question {
        font-size: 1.25rem;
        /* text-xl místo text-2xl na mobilu */
        line-height: 1.75rem;
    }
}

#trivia-feedback {
    min-height: 24px;
    margin-top: 1rem;
}

.trivia-answer-btn {
    background-color: #1e293b;
    border: 2px solid #334155;
    color: #e2e8f0;
    width: 100%;
    text-align: left;
    padding: 1rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    font-weight: bold;
    position: relative;
}

.trivia-answer-btn .audience-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background-color: rgba(59, 130, 246, 0.5);
    width: 0;
    transition: width 0.5s ease-out;
    border-radius: 0.5rem;
}

.trivia-answer-btn .answer-text {
    position: relative;
    z-index: 1;
}

.trivia-answer-btn:not(:disabled):hover {
    background-color: #334155;
    border-color: #60a5fa;
}

.trivia-answer-btn.selected {
    background-color: #f59e0b;
    border-color: #facc15;
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

.trivia-answer-btn.correct {
    background-color: #16a34a;
    border-color: #22c55e;
    color: white;
    animation: none;
}

.trivia-answer-btn.incorrect {
    background-color: #dc2626;
    border-color: #ef4444;
    color: white;
    animation: none;
}

.trivia-answer-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#trivia-prize-ladder {
    text-align: center;
}

.prize-level {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin: 0.1rem auto;
    transition: all 0.3s ease;
    color: #64748b;
}

.prize-level.current {
    background-color: #f59e0b;
    color: #1e293b;
    font-weight: bold;
    transform: scale(1.1);
}

.prize-level.guarantee {
    font-weight: bold;
    color: #e2e8f0;
    border: 1px solid #475569;
}


/* --- Styly pro Chatbota --- */
#chat-toggle-btn {
    position: fixed;
    bottom: 1.5rem;
    /* ZMĚNA: Posunuto níže a více do rohu */
    right: 1.5rem;
    /* ZMĚNA: Posunuto níže a více do rohu */
    background-color: #3b82f6;
    color: white;
    width: 48px;
    /* ZMĚNA: Zmenšeno z 60px na 48px */
    height: 48px;
    /* ZMĚNA: Zmenšeno z 60px na 48px */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
    transition: transform 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
}

/* NOVÉ: Scroll-aware chování pro chat kolečko */
#chat-toggle-btn.hidden-on-scroll {
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

#chat-toggle-btn.visible-on-scroll {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

#chat-toggle-btn:hover {
    transform: scale(1.1);
    background-color: #60a5fa;
}

#chat-widget {
    position: fixed;
    bottom: 6rem;
    /* ZMĚNA: Upraveno pro novou pozici tlačítka */
    right: 1.5rem;
    /* ZMĚNA: Upraveno pro novou pozici tlačítka */
    width: 90%;
    max-width: 400px;
    height: 500px;
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    z-index: 999;
}

/* NOVÉ: Mobilní verze - stejná vzdálenost z obou stran */
@media (max-width: 768px) {
    #chat-widget {
        left: 1.5rem;
        right: 1.5rem;
        width: auto;
        /* Nechá prohlížeč vypočítat šířku automaticky */
        transform-origin: bottom center;
        /* Změna origin pro lepší animaci */
    }
}

#chat-widget.hidden {
    transform: scale(0);
    opacity: 0;
}

#chat-header {
    background-color: #1e293b;
    padding: 1rem;
    font-weight: bold;
    text-align: center;
    color: white;
    border-bottom: 1px solid #334155;
    position: relative;
    /* NOVÉ: Pro pozicování křížku */
}

/* NOVÉ: Styl pro křížek v chat headeru */
#chat-close-btn {
    border-radius: 50%;
    transition: all 0.2s ease;
}

#chat-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%) scale(1.1);
}

#chat-messages {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-message,
.bot-message {
    padding: 0.45rem 0.75rem;
    border-radius: 0.7rem;
    max-width: 62%;
    word-wrap: break-word;
}

.user-message {
    background-color: #3b82f6;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0.25rem;
}

.bot-message {
    background-color: #334155;
    color: #e2e8f0;
    align-self: flex-start;
    border-bottom-left-radius: 0.25rem;
}

/* --- NOVÉ: Styl pro kartu s návrhem v chatu --- */
.chat-suggestion-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* 12px */
    width: 100%;
    text-align: left;
    padding: 0.5rem;
    /* 8px */
    background-color: #475569;
    /* slate-600 */
    border-radius: 0.5rem;
    /* rounded-lg */
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.chat-suggestion-card:hover {
    background-color: #525f75;
    /* O něco světlejší pro hover efekt */
}

.chat-suggestion-card img {
    width: 48px;
    /* w-12 */
    height: 72px;
    /* cca 2:3 poměr stran */
    object-fit: cover;
    border-radius: 0.25rem;
    /* rounded-md */
    flex-shrink: 0;
    background-color: #1e293b;
    /* Fallback barva */
}

.chat-suggestion-card .info {
    flex-grow: 1;
    min-width: 0;
    /* Zabrání přetékání textu */
}

.chat-suggestion-card .info strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}


.thinking-indicator {
    align-self: flex-start;
    display: flex;
    gap: 4px;
}

.thinking-indicator span {
    width: 8px;
    height: 8px;
    background-color: #475569;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.thinking-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.thinking-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

/* Styly pro Watchlist tlačítko */
.watchlist-btn .icon-filled {
    display: none;
}

.watchlist-btn.in-watchlist .icon-outline {
    display: none;
}

.watchlist-btn.in-watchlist .icon-filled {
    display: inline-block;
}

.watchlist-btn.in-watchlist {
    color: #ec4899;
}

/* --- NOVÉ A VYLEPŠENÉ: Styly pro přihlašovací systém a uživatelské menu --- */

.auth-btn {
    background-color: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    /* Zmenšený padding */
    font-size: 0.875rem;
    /* Menší písmo */
    border-radius: 9999px;
    color: #d1d5db;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.auth-btn:hover {
    background-color: rgba(51, 65, 85, 0.8);
    color: white;
}

/* Třída pro skrytí auth panelu při otevření modalů - respektuje responzivní design */
.auth-panel-hidden {
    display: none !important;
}

/* Na mobilu zůstane skrytý podle původního CSS (hidden sm:flex) */
@media (max-width: 639px) {
    .auth-panel-hidden {
        display: none !important;
        /* Redundantní, ale jistota */
    }
}

.user-menu-popover {
    background-color: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.auth-modal-content {
    background-color: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #d1d5db;
}

.auth-input {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
    border-radius: 0.5rem;
    padding: 0.75rem;
    width: 100%;
}

.auth-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.auth-tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    color: #94a3b8;
    font-weight: bold;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.auth-tab-btn.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}

.auth-error {
    color: #f87171;
    font-size: 0.875rem;
    min-height: 1.25rem;
    text-align: center;
}

#auth-modal {
    align-items: flex-start;
    padding-top: 10vh;
}

.mobile-auth-btn {
    background-color: #4f46e5;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.mobile-auth-btn:hover {
    background-color: #6366f1;
}

/* --- NOVÉ: Styly pro systém recenzí --- */
#reviews-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

#reviews-list::-webkit-scrollbar {
    width: 6px;
}

#reviews-list::-webkit-scrollbar-track {
    background: #1e293b;
}

#reviews-list::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

/* --- NOVÉ: Styly pro seznam konverzací --- */
#conversations-list {
    max-height: calc(100vh - 300px);
    /* Dynamická výška podle viewport */
    overflow-y: auto;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: #475569 #1e293b;
    /* Firefox */
}

/* Mobilní verze - menší výška kvůli tabům */
@media (max-width: 768px) {
    #conversations-list {
        max-height: calc(100vh - 400px);
    }
}

#conversations-list::-webkit-scrollbar {
    width: 6px;
}

#conversations-list::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 3px;
}

#conversations-list::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
    transition: background 0.2s ease;
}

#conversations-list::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* --- NOVÉ: Styly pro chat zprávy oblast --- */
#chat-messages-area {
    /* Zajistí správné scrollování pouze oblasti zpráv */
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: #475569 #1e293b;
    /* Firefox */
}

#chat-messages-area::-webkit-scrollbar {
    width: 6px;
}

#chat-messages-area::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 3px;
}

#chat-messages-area::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
    transition: background 0.2s ease;
}

#chat-messages-area::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.review-card {
    background-color: rgba(15, 23, 42, 0.5);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1em;
}

/* --- UPRAVENO: Přidány specifické třídy pro barvy --- */
.review-card.male {
    border-left: 3px solid #60a5fa;
    /* Modrá barva */
}

.review-card.female {
    border-left: 3px solid #ec4899;
    /* Růžová barva */
}

.review-card.neutral {
    border-left: 3px solid #64748b;
    /* Neutrální šedá barva */
}

/* === NOVÉ STYLY PRO HVĚZDIČKY === */
.star-rating-display {
    color: #f59e0b;
    /* Oranžovo-žlutá barva pro hvězdy */
}

#review-rating-input .star:hover,
#review-rating-input .star.selected {
    color: #f59e0b;
}

/* === STYLY PRO EXPERTNÍ HODNOCENÍ === */
.expert-stars .star:hover,
.expert-stars .star.selected {
    color: #f59e0b;
}

.expert-category {
    transition: all 0.2s ease;
}

.expert-category:hover {
    background-color: rgba(71, 85, 105, 0.1);
    border-radius: 0.375rem;
    padding: 0.25rem;
    margin: -0.25rem;
}

#expert-toggle-btn {
    border: 1px solid #f59e0b;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background-color: rgba(245, 158, 11, 0.1);
}

#expert-toggle-btn:hover {
    background-color: rgba(245, 158, 11, 0.2);
}

/* === KONEC NOVÝCH STYLŮ PRO HVĚZDIČKY === */

/* --- NOVÉ: Scroll-aware hamburger menu styly --- */
.hamburger-menu-btn {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.hamburger-menu-btn.hidden-on-scroll {
    transform: translateY(-100px);
    opacity: 0;
    pointer-events: none;
}

.hamburger-menu-btn.visible-on-scroll {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* --- KONEC scroll-aware stylů --- */

.delete-review-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s ease;
}

.delete-review-btn:hover {
    color: #ef4444;
}

/* --- NOVÉ STYLY PRO KARUSEL --- */
#carousel-section {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1.5rem;
}

.carousel-container {
    position: relative;
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.75rem;
    /* Zmenšená mezera */
    padding: 1rem 0;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.carousel-track::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, and Opera */
}

.carousel-card {
    flex: 0 0 150px;
    /* Šířka karty */
    width: 150px;
    /* OPRAVA: Pevně nastaví šířku, aby se neroztahovala */
    scroll-snap-align: start;
    border-radius: 0.75rem;
    overflow: visible;
    /* ZMĚNA: Povolí přesah hodnocení */
    background-color: #1e293b;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.carousel-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
}

.carousel-card img {
    width: 100%;
    height: 225px;
    /* Výška obrázku */
    object-fit: cover;
    border-top-left-radius: 0.75rem;
    /* Přidáno zaoblení */
    border-top-right-radius: 0.75rem;
    /* Přidáno zaoblení */
}

.carousel-card-content {
    padding: 0.75rem;
    position: relative;
    /* PŘIDÁNO: Nutné pro pozicování hodnocení */
    padding-top: 20px;
    /* PŘIDÁNO: Vytvoří místo pro přesahující hodnocení */
}

.carousel-card-title {
    color: #e2e8f0;
    font-weight: bold;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(30, 41, 59, 0.8);
    color: white;
    border: 1px solid #475569;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
}

.carousel-nav-btn:hover {
    background-color: #334155;
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

#carousel-prev-btn {
    left: -20px;
}

#carousel-next-btn {
    right: -20px;
}

@media (max-width: 640px) {
    #carousel-prev-btn {
        left: 5px;
    }

    #carousel-next-btn {
        right: 5px;
    }
}

/* Zajistí, že tlačítko a emotikona zůstanou na místě při animaci */
#random-tip-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1;
    height: 2.2em;
    width: 2.2em;
    padding: 0;
    font-size: 1.25rem;
    background: none;
    border: none;
}

#random-tip-icon-btn span {
    display: inline-block;
    width: 1em;
    height: 1em;
    line-height: 1em;
    text-align: center;
    vertical-align: middle;
    transform-origin: 50% 50% !important;
}

#random-tip-icon-btn span.animate-dice {
    animation: dice-spin 0.5s cubic-bezier(.4, 2, .6, 1) !important;
}

@keyframes dice-spin {
    0% {
        transform: rotate(0deg);
    }

    80% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes dice-spin {
    0% {
        transform: rotate(0deg);
    }

    80% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* --- NOVÉ: Mobile touch optimalizace --- */
@media (max-width: 768px) {

    /* Zlepšení touch targets na mobilu */
    button,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        /* Apple doporučuje min 44px pro touch */
        min-width: 44px;
        touch-action: manipulation;
        /* Zamezí zoom při double-tap */
    }

    /* Specifické úpravy pro chat a messaging */
    #chat-input,
    #chat-message-input {
        min-height: 48px;
        touch-action: manipulation;
        -webkit-user-select: text;
        user-select: text;
        -webkit-tap-highlight-color: transparent;
    }

    /* Zabránění konfliktů s browser UI */
    .messaging-panel,
    .chat-widget {
        -webkit-user-select: none;
        user-select: none;
    }

    /* Fix pro iOS safe areas */
    #messaging-panel {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}

/* Messaging panel styling pro mobil */
body.messaging-open {
    overflow: hidden !important;
}

/* Tab styling pro mobilní verzi */
#tab-conversations.active {
    background-color: #2563eb !important;
    color: white !important;
}

#tab-chat.active {
    background-color: #2563eb !important;
    color: white !important;
}

/* Mobile panel visibility */
@media (max-width: 768px) {
    #conversations-panel.mobile-hidden {
        display: none !important;
    }

    #chat-panel.mobile-hidden {
        display: none !important;
    }

    #chat-panel.mobile-visible {
        display: flex !important;
    }

    /* Fix pro chat input na mobilu */
    #chat-message-input {
        touch-action: manipulation;
        -webkit-user-select: text;
        user-select: text;
        -webkit-tap-highlight-color: transparent;
        width: 100% !important;
        min-width: 0;
        position: relative;
        z-index: 1;
    }
}

/* === Animace pro tagline === */
@keyframes tagline-fade-in {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated-tagline {
    animation: tagline-fade-in 1.2s ease-out 0.3s forwards;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
}

/* === Animace pro klapku === */
@keyframes clapper-clap {
    0%, 100% {
        transform: rotate(5deg);
    }
    25% {
        transform: rotate(-15deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

.film-clapper {
    display: inline-block;
    margin: 0 0.15em;
    transform: rotate(5deg);
    animation: clapper-clap 0.6s ease-in-out;
    animation-play-state: paused;
}

.film-clapper.clapping {
    animation-play-state: running;
}

/* Sem budou přesunuty všechny vlastní styly z index.html */
