/* Nastavení plynulého scrollování a fontu */
body {
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease, filter 0.3s ease;
}

/* Výchozí normální režim (modrý, bez filtrů) */
body:not(.retro-mode):not(.matrix-mode) {
    filter: none !important;
}

/* Retro Light mode - světlý sépiový styl */
body.retro-mode.light-mode {
    background-color: #f5f0e8 !important;
    color: #4a3f2e !important;
    filter: sepia(0.15) contrast(1.05);
    transition: all 0.3s ease;
}

body.retro-mode.light-mode .bg-ai-dark {
    background-color: #faf7f2 !important;
}

body.retro-mode.light-mode .bg-ai-secondary {
    background-color: #ebe6dd !important;
}

body.retro-mode.light-mode .text-gray-100,
body.retro-mode.light-mode .text-gray-300,
body.retro-mode.light-mode .text-gray-400 {
    color: #6b5d4a !important;
}

body.retro-mode.light-mode .text-white {
    color: #4a3f2e !important;
}

body.retro-mode.light-mode .text-ai-primary {
    color: #a37c4c !important;
}

body.retro-mode.light-mode .border-gray-700,
body.retro-mode.light-mode .border-ai-primary {
    border-color: #c9b89a !important;
}

body.retro-mode.light-mode header {
    background-color: rgba(250, 247, 242, 0.95) !important;
}

body.retro-mode.light-mode #mobile-menu {
    background-color: rgba(235, 230, 221, 0.95) !important;
}

body.retro-mode.light-mode footer {
    background-color: #faf7f2 !important;
    border-color: #e0d5c3 !important;
}

body.retro-mode.light-mode input,
body.retro-mode.light-mode textarea {
    background-color: #faf7f2 !important;
    color: #4a3f2e !important;
    border-color: #c9b89a !important;
}

body.retro-mode.light-mode input::placeholder,
body.retro-mode.light-mode textarea::placeholder {
    color: #9d8b73 !important;
}

body.retro-mode.light-mode .cta-gradient {
    background-image: linear-gradient(to right, #a37c4c 0%, #8b6844 100%) !important;
}

/* ============================================
   EASTER EGG REŽIMY
   ============================================ */

/* Retro režim - stará fotografie (sépiové tóny) */
body.retro-mode {
    background-color: #2a2520 !important;
    color: #d4c5b0 !important;
    filter: sepia(0.3) contrast(1.1);
    transition: all 1s ease-in-out;
}

body.retro-mode .bg-ai-dark {
    background-color: #3a3530 !important;
}

body.retro-mode .bg-ai-secondary {
    background-color: #2a2520 !important;
}

body.retro-mode .text-gray-100,
body.retro-mode .text-gray-300,
body.retro-mode .text-gray-400,
body.retro-mode .text-white {
    color: #d4c5b0 !important;
}

body.retro-mode .text-ai-primary {
    color: #b8956f !important;
}

body.retro-mode .border-gray-700,
body.retro-mode .border-ai-primary {
    border-color: #5a4f43 !important;
}

body.retro-mode header {
    background-color: rgba(42, 37, 32, 0.95) !important;
}

body.retro-mode .cta-gradient {
    background-image: linear-gradient(to right, #8b7355 0%, #6b5846 100%) !important;
}

/* Matrix režim - AI technologie (zelené tóny) - tmavá verze */
body.matrix-mode {
    background-color: #0d1b0d !important;
    color: #00ff41 !important;
    transition: all 1s ease-in-out;
}

body.matrix-mode .bg-ai-dark {
    background-color: #0a1a0a !important;
}

body.matrix-mode .bg-ai-secondary {
    background-color: #152815 !important;
}

body.matrix-mode .text-gray-100,
body.matrix-mode .text-gray-300,
body.matrix-mode .text-gray-400,
body.matrix-mode .text-white {
    color: #00ff41 !important;
}

body.matrix-mode .text-ai-primary {
    color: #39ff14 !important;
}

body.matrix-mode .border-gray-700,
body.matrix-mode .border-ai-primary {
    border-color: #1a4d1a !important;
}

body.matrix-mode header {
    background-color: rgba(13, 27, 13, 0.95) !important;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

body.matrix-mode .cta-gradient {
    background-image: linear-gradient(to right, #00ff41 0%, #00cc33 100%) !important;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.5);
}

body.matrix-mode input,
body.matrix-mode textarea {
    background-color: #0a1a0a !important;
    color: #00ff41 !important;
    border-color: #1a4d1a !important;
}

body.matrix-mode input::placeholder,
body.matrix-mode textarea::placeholder {
    color: #1a4d1a !important;
}

/* Animace "glitch" pro přechod */
@keyframes glitch {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0);
    }
}

body.transitioning {
    animation: glitch 0.3s ease-in-out;
}

/* Speciální efekt pro matrix režim */
body.matrix-mode::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(0deg, transparent 0%, rgba(0, 255, 65, 0.03) 100%);
    pointer-events: none;
    z-index: 1;
}

body.matrix-mode > * {
    position: relative;
    z-index: 2;
}

/* Gradient pro CTA tlačítko */
.cta-gradient {
    background-image: linear-gradient(to right, #3b82f6 0%, #1d4ed8 100%);
    transition: all 0.3s ease;
}

.cta-gradient:hover {
    box-shadow: 0 8px 25px 0 rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
}

.cta-gradient:active {
    transform: translateY(0);
}

/* Styl pro obrázky, které lze kliknout */
#promeny img {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#promeny img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* Responzivní optimalizace pro mobilní zařízení */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    /* Na mobilech menší hover efekt */
    #promeny img:active {
        transform: scale(1.02);
    }
}

/* Vylepšení animací při načtení */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Animace pro gradient pozadí */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Smooth transitions pro karty */
section > div > div > div {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Vylepšení focusu pro přístupnost */
input:focus, textarea:focus, button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Loading animace pro obrázky */
img {
    transition: opacity 0.3s ease;
}

/* Modal styly pro lepší centrování a zoom */
#image-modal {
    backdrop-filter: blur(4px);
    padding: 2rem 1rem;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#image-modal.hidden {
    display: none !important;
}

/* Content wrapper */
#modal-content-wrapper {
    /* Rozměry se řídí obsahem */
}

#modal-image-content {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#modal-image-content.cursor-zoom-in {
    cursor: zoom-in;
}

#modal-image-content.cursor-zoom-out {
    cursor: zoom-out;
}

/* Plynulý přechod při zoomu */
#modal-image-content {
    transition: transform 0.3s ease;
}

/* Comparison slider styly */
#comparison-container {
    user-select: none;
    -webkit-user-select: none;
    display: inline-block;
}

#comparison-images-wrapper {
    display: block;
    position: relative;
    /* Rozměry se nastaví dynamicky v JS */
}

#comparison-before,
#comparison-after {
    pointer-events: none;
    display: block;
}

/* After obrázek určuje velikost - max rozměry se nastaví dynamicky v JS */
#comparison-after {
    display: block;
    width: auto;
    height: auto;
}

/* Before wrapper musí přesně kopírovat rozměry */
#comparison-before-wrapper {
    pointer-events: none;
}

#comparison-before {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Mobile optimalizace pro comparison */
@media (max-width: 640px) {
    #comparison-container {
        border-width: 2px; /* Tenčí border na mobilu */
        padding: 0.25rem; /* Menší padding */
    }

    /* Menší labely na mobilu */
    #comparison-container .absolute.top-4 {
        top: 0.5rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    #modal-content-wrapper {
        padding: 0.5rem;
    }

    #image-modal {
        padding: 1rem 0.5rem;
    }
}

#comparison-slider {
    transition: opacity 0.2s ease;
}

#comparison-slider:hover {
    opacity: 0.9;
}

#comparison-slider:active {
    cursor: grabbing !important;
}

/* Animace pro slider handle */
#comparison-slider > div {
    transition: transform 0.2s ease;
}

#comparison-slider:hover > div {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Optimalizace pro dotykové displeje */
@media (hover: none) {
    .cta-gradient:hover {
        transform: none;
    }

    #promeny img:hover {
        transform: none;
    }
}

/* Zajištění čitelnosti na menších zařízeních */
@media (max-width: 375px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }
}
