html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    overscroll-behavior: none;
    background: #000000;
    color: #ffffff;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.tv-root {
    width: 100vw;
    height: 100vh;
    background: #ffffff;
}

.tv-canvas {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: #000000;
}

.tv-boot {
    position: absolute;
    inset: 0;
    background: #ffffff;
    z-index: 50;
    opacity: 1;
    pointer-events: none;
}

.tv-root.is-started .tv-boot {
    animation: tvBootFade 900ms ease-out forwards;
}

@keyframes tvBootFade {
    from { opacity: 1; }
    to { opacity: 0; }
}

.tv-slide {
    --row-h: 70px;

    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

.tv-slide.is-compact {
    --row-h: 56px;
}

.tv-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 20;
}

.tv-slide.is-exiting {
    z-index: 30;
}

.tv-slide.is-entering {
    z-index: 40;
}

.tv-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 75% 50%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.05) 30%, rgba(0, 0, 0, 0.15) 100%),
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.05) 70%, rgba(0, 0, 0, 0.18) 100%);
    z-index: 15;
    pointer-events: none;
}

.tv-blur-layer {
    position: absolute;
    inset: 0;
    background-image: var(--blurred-image, none);
    background-size: cover;
    background-position: center;
    filter: blur(50px) brightness(1.2);
    z-index: 0;
    pointer-events: none;
}

.tv-panel {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 50% !important;
    will-change: transform, opacity;
    z-index: 3;
}

.tv-photo {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 2200ms ease;
    will-change: opacity;
    z-index: 2;
    filter: saturate(1.05) contrast(1.03);
    background: transparent;
}

.tv-video {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 2200ms ease;
    will-change: opacity;
    z-index: 2;
    background: transparent;
}


.tv-panel--left {
    left: 0;
    background:
        radial-gradient(1400px 900px at 20% 30%, rgba(59, 130, 246, 0.15), transparent 50%),
        radial-gradient(1000px 700px at 75% 70%, rgba(147, 51, 234, 0.10), transparent 60%),
        linear-gradient(135deg, #1a2a4a 0%, #2a3a5a 25%, #3a4a6a 50%, #4a5a7a 75%, #5a6a8a 100%);
    transform: translateX(0%);
    position: relative;
    opacity: 0;
}

.tv-panel--left::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.03) 100%);
    backdrop-filter: blur(2px);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
}

.tv-panel-intersection {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 80px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.08) 50%, rgba(0, 0, 0, 0) 100%);
    backdrop-filter: blur(8px);
    z-index: 4;
    pointer-events: none;
    opacity: 0.6;
}

.tv-panel--right {
    right: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    transform: translateX(0%);
    background: rgba(0,0,0,0) !important;
    position: relative;
    overflow: hidden;
    opacity: 0;
}


.tv-photo {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 2800ms ease;
    will-change: opacity;
    z-index: 5;
    filter: saturate(1.05) contrast(1.03);
    background: transparent;
}

/* Sol panelde resim olmayacak */
.tv-panel--left .tv-photo {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.tv-photo-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transform: scale(1.06);
    will-change: transform;
}

.tv-photo.is-visible {
    opacity: 1;
}

@keyframes photoSlowZoom {
    from { transform: scale(1.06); }
    to { transform: scale(1.16); }
}

.tv-photo.is-visible .tv-photo-img {
    animation: photoSlowZoom 300s linear both;
}

.tv-photo[data-kind="portrait"] .tv-photo-img {
    object-position: center 30%;
}

.tv-photo[data-kind="landscape"] .tv-photo-img {
    object-position: center;
}

.tv-photo[data-kind="square"] .tv-photo-img {
    object-position: center;
}

.tv-logo-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.72);
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: rgba(255,255,255,0.95);
    display: grid;
    place-items: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
    opacity: 0;
    will-change: transform, opacity;
    z-index: 25;
}

.tv-logo-center img {
    width: 190px;
    height: 190px;
    object-fit: contain;
    display: block;
}

.tv-top {
    position: absolute;
    left: 72px;
    right: 72px;
    top: 48px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    z-index: 25;
    pointer-events: none;
}

.tv-top-title {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 10px 16px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #d8d8d8;
    max-width: 720px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.tv-top-page {
    justify-self: end;
    font-size: 20px;
    opacity: 0.9;
    letter-spacing: 1px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(0,0,0,0.30);
    border: 1px solid rgba(255,255,255,0.10);
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.tv-list {
    position: absolute;
    left: 84px;
    right: 40px;
    top: 152px;
    bottom: 116px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 25;
}

.tv-slide.is-compact .tv-list {
    gap: 6px;
}

.tv-slide.is-compact .tv-name {
    font-size: 32px;
}

.tv-slide.is-compact .tv-price {
    font-size: 38px;
}

.tv-slide.is-compact .tv-allergens {
    font-size: 0.7em;
}

.tv-row {
    display: grid;
    grid-template-columns: 1fr 260px;
    align-items: center;
    gap: 28px;
    height: auto;
    min-height: var(--row-h);
    padding: 12px 0;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    will-change: transform, opacity;
    position: relative;
    z-index: 0;
}

.tv-row-left {
    max-width: 980px;
}

.tv-name {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: 0.2px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.35);
    line-height: 1.2;
    color: #e8e8e8;
}

.tv-row:nth-child(even) .tv-name {
    color: #d8d8d8;
}

.tv-desc {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    opacity: 0.7;
    margin-top: 4px;
    color: #a0a0a0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.tv-slide.is-compact .tv-desc {
    font-size: 12px;
    opacity: 0.6;
}

.tv-row-right {
    justify-self: end;
    max-width: 260px;
    overflow: visible;
    padding-right: 40px;
}

.tv-price {
    font-size: 46px;
    font-weight: 950;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    line-height: 1.1;
    padding-right: 30px;
    color: #f0f0f0;
}

.tv-row:nth-child(even) .tv-price {
    color: #e8e8e8;
}



.tv-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 20px;
    width: 100%;
    font-size: 20px;
    letter-spacing: 0.5px;
    z-index: 50;
    pointer-events: none;
    text-align: center;
    padding: 0 40px;
}

.tv-allergens-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.tv-legend-title {
    font-weight: 900;
    font-size: 24px;
    margin-bottom: 8px;
    text-shadow:
        0 1px 3px rgba(0,0,0,0.3),
        0 2px 6px rgba(0,0,0,0.2);
    color: #e8e8e8;
}

.tv-legend-items {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #d8d8d8;
    line-height: 1.4;
    text-shadow:
        0 1px 3px rgba(0,0,0,0.25);
}

.tv-legend-items span:not(:last-child)::after {
    content: ",";
    margin-left: 12px;
    font-weight: 400;
}

.tv-allergens {
    font-size: 0.8em;
    opacity: 0.8;
    margin-left: 8px;
    color: #d8d8d8;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Stable end state when active (animations can override) */
.tv-slide.is-active .tv-panel--left {
    opacity: 1;
}

.tv-slide.is-active .tv-panel--right {
    opacity: 1;
}

.tv-slide.is-active .tv-logo-center {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.tv-slide.is-active .tv-row {
    opacity: 1;
    transform: translateY(0);
}

/* Animations */
.tv-slide.is-entering .tv-panel--left {
    animation: fadeInLeft 1000ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.tv-slide.is-entering .tv-panel--right {
    animation: fadeInRight 1000ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.tv-slide.is-exiting .tv-panel--left {
    animation: fadeOutLeft 900ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.tv-slide.is-exiting .tv-panel--right {
    animation: fadeOutRight 900ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.tv-slide.is-entering .tv-panel--left::after {
    animation: blurIn 1000ms ease-in-out 200ms forwards;
}

.tv-slide.is-exiting .tv-panel--left::after {
    animation: blurOut 900ms ease-in forwards;
}

.tv-slide.is-entering .tv-logo-center {
    animation: logoIn 1500ms cubic-bezier(0.18, 1, 0.28, 1) 325ms forwards;
}

.tv-slide.is-entering .tv-row {
    animation: rowIn 1000ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.tv-slide.is-exiting .tv-row {
    animation: rowOut 1000ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: var(--outDelay, 0ms);
}

.tv-slide.is-exiting .tv-logo-center {
    animation: fadeOut 800ms ease-in forwards;
}

.tv-slide.is-exiting .tv-panel--left {
    animation: panelOutLeft 900ms cubic-bezier(0.18, 1, 0.28, 1) forwards;
}

.tv-slide.is-exiting .tv-top {
    opacity: 0;
    transition: opacity 550ms ease;
}

@keyframes fadeInLeft {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOutLeft {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fadeInRight {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOutRight {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes blurIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes blurOut {
    from { opacity: 1; }
    to { opacity: 0; }
}



@keyframes logoIn {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.55); }
    55% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes rowIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes rowOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(40px) scale(0.95); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .tv-root.is-started .tv-boot { animation: none; opacity: 0; }
    .tv-slide.is-entering .tv-panel--left,
    .tv-slide.is-entering .tv-panel--right,
    .tv-slide.is-entering .tv-logo-center,
    .tv-slide.is-entering .tv-row,
    .tv-slide.is-exiting .tv-row,
    .tv-slide.is-exiting .tv-logo-center,
    .tv-slide.is-exiting .tv-panel--left {
        animation: none !important;
    }
    .tv-panel--left,
    .tv-panel--right { transform: translateX(0); }
    .tv-logo-center { opacity: 1; transform: translate(-50%, -50%); }
    .tv-slide.is-entering .tv-row { opacity: 1 !important; transform: none !important; }
    .tv-row { opacity: 1; transform: none; }
}
