﻿:root {
    --bg: #06060f;
    --surface: #0c0c14;
    --surface2: #12121c;
    --pink: #ff2d78;
    --pink-light: #ff6eb4;
    --pink-dim: #c41e5a;
    --pink-glow: rgba(255, 45, 120, 0.15);
    --pink-border: rgba(255, 45, 120, 0.35);
    --text: #f0f0f5;
    --muted: #8a8a9a;
    --border: rgba(255, 255, 255, 0.08);
    --shell-max: 480px;
    --content-pad: 0.65rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 55% 35% at 50% 0%, rgba(255, 45, 120, 0.1) 0%, transparent 55%),
        radial-gradient(ellipse 45% 30% at 100% 100%, rgba(255, 45, 120, 0.06) 0%, transparent 50%),
        var(--bg);
}

/* App shell — mobilde tam genişlik, desktop'ta geniş kart */
.app-shell {
    width: 100%;
    max-width: var(--shell-max);
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    position: relative;
}

/* ===== HEADER ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(12, 12, 20, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem var(--content-pad);
    gap: 0.75rem;
    min-height: 52px;
}

.header-brand-wrap {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
}

.header-brand {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: #ffb8dc;
    text-shadow: 0 0 22px rgba(255, 140, 200, 0.45);
    -webkit-font-smoothing: antialiased;
}

.header-logo {
    max-height: var(--header-logo-height, 46px);
    height: auto;
    width: auto;
    max-width: min(220px, 55vw);
    object-fit: contain;
    display: block;
}

.header-tg {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--pink-border);
    background: var(--pink-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pink-light);
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.header-tg svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.header-tg:hover {
    background: rgba(255, 45, 120, 0.25);
    box-shadow: 0 0 16px var(--pink-glow);
}

.header-tg:active { transform: scale(0.95); }

.header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.header-gift {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--pink-border);
    background: rgba(255, 110, 180, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    padding: 0;
}

.header-gift img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.header-gift:hover {
    background: rgba(255, 110, 180, 0.18);
    box-shadow: 0 0 14px var(--pink-glow);
}

.header-gift:active { transform: scale(0.95); }

.header-gift-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--pink);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

body.modal-open { overflow: hidden; }

.site-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.site-modal[hidden] { display: none !important; }

.site-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
}

.site-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 360px;
    max-height: 85vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #14141f 0%, #0a0a12 100%);
    border: 1px solid rgba(255, 110, 180, 0.25);
    border-radius: 20px;
    padding: 1.25rem 1.1rem 1.1rem;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 45, 120, 0.12);
    animation: modalIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-modal-panel-win {
    text-align: center;
    padding: 1.35rem 1.15rem 1.2rem;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.site-modal-close {
    position: absolute;
    top: 0.65rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.site-modal-close:hover {
    background: rgba(255, 110, 180, 0.15);
    color: var(--text);
}

.site-modal-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    padding-right: 2rem;
}

.site-modal-sub {
    font-size: 0.72rem;
    color: var(--muted);
    margin-bottom: 1rem;
    line-height: 1.45;
}

.inventory-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.inventory-empty {
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
    padding: 1.5rem 0;
}

.inventory-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.65rem 0.75rem;
    transition: border-color 0.2s;
}

.inventory-item:hover {
    border-color: rgba(255, 110, 180, 0.35);
}

.inventory-item-logo {
    flex: 0 0 52px;
    width: 52px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inventory-item-logo img {
    max-width: 100%;
    max-height: 48px;
    object-fit: contain;
}

.inventory-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.inventory-item-body strong {
    font-size: 0.78rem;
    font-weight: 700;
}

.inventory-item-body span {
    font-size: 0.68rem;
    color: var(--muted);
}

.inventory-item-body small {
    font-size: 0.62rem;
    color: var(--pink-light);
}

.inventory-item-go {
    flex: 0 0 auto;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--pink-light);
}

.win-modal-badge {
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffd4ec;
    background: rgba(255, 110, 180, 0.15);
    border: 1px solid rgba(255, 110, 180, 0.35);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    margin-bottom: 1rem;
}

.win-modal-card {
    margin-bottom: 1rem;
}

.win-modal-logo img {
    max-width: 88px;
    max-height: 88px;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(255, 110, 180, 0.35));
    margin-bottom: 0.65rem;
}

.win-modal-empty {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.win-modal-prize {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.win-modal-sub {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.4;
}

.win-modal-hint {
    font-size: 0.68rem;
    color: var(--muted);
    line-height: 1.45;
    margin-top: 0.65rem;
    max-width: 16rem;
    margin-left: auto;
    margin-right: auto;
}

.win-modal-go {
    width: 100%;
    max-width: 220px;
}

.surprise-cooldown-hint {
    text-align: center;
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: 0.45rem;
    min-height: 1.1rem;
}

.surprise-cooldown-hint.is-wait {
    color: var(--pink-light);
}

/* ===== TICKER ===== */
.ticker-wrap {
    overflow: hidden;
    background: linear-gradient(90deg, var(--surface2), var(--surface));
    border-bottom: 1px solid var(--border);
    width: 100%;
    position: relative;
}

.ticker-marquee {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 2.5rem;
    padding: 0.55rem 0;
    white-space: nowrap;
    will-change: transform;
    animation: tickerMarquee 25s linear infinite;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pink-light);
}

.ticker-item::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--pink);
    flex-shrink: 0;
}

@keyframes tickerMarquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .ticker-marquee { animation: none; }
}

/* ===== MAIN ===== */
.main-content {
    padding: var(--content-pad);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* ===== SLIDER ===== */
.slider-section { margin-bottom: 0.25rem; }

.slider {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--pink-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.slider-track {
    display: flex;
    transition: transform 0.4s ease;
    will-change: transform;
}

.slider-slide {
    flex: 0 0 100%;
    display: block;
    text-decoration: none;
}

.slider-slide img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    display: block;
}

.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.slider-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}

.slider-dot.active {
    background: var(--pink);
    transform: scale(1.25);
}

/* ===== YATAY KARTLAR ===== */
.card-rows {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.card-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.5rem 0.65rem;
    min-height: 62px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.card-row:hover {
    border-color: var(--pink-border);
    background: rgba(255, 45, 120, 0.06);
    box-shadow: 0 0 20px var(--pink-glow);
    transform: translateY(-1px);
}

.card-row:active {
    transform: translateY(0);
}

.card-row-logo {
    flex: 0 0 68px;
    width: 68px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
}

.card-row-logo img {
    max-width: 100%;
    max-height: 56px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.card-row-title {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    color: var(--text);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-row-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0 0.25rem;
}

.card-row-sub {
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    color: var(--muted);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    width: 100%;
}

.card-row-btn {
    flex: 0 0 auto;
    background: rgba(255, 110, 180, 0.1);
    color: rgba(255, 184, 220, 0.95);
    border: 1px solid rgba(255, 110, 180, 0.22);
    font-size: 0.62rem;
    font-weight: 600;
    padding: 0.38rem 0.55rem;
    border-radius: 8px;
    letter-spacing: 0.02em;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: none;
}

/* ===== GRID BÖLÜMÜ ===== */
.grid-section {
    margin-top: 0.25rem;
}

.grid-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    padding: 0 0.15rem;
}

.grid-section-title {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--text);
    text-transform: uppercase;
}

.grid-section-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted);
    background: var(--pink-glow);
    border: 1px solid var(--pink-border);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
}

.num-pink {
    color: var(--pink-light);
    font-weight: 800;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.card-grid-item {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.6rem 0.45rem 0.7rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.3rem;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.card-grid-item:hover {
    border-color: var(--pink-border);
    box-shadow: 0 0 20px var(--pink-glow);
    transform: translateY(-2px);
}

.card-grid-logo {
    width: 100%;
    aspect-ratio: 1;
    max-height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--pink-border);
    box-shadow: 0 0 14px var(--pink-glow);
    padding: 0.4rem;
}

.card-grid-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.card-grid-name {
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    width: 100%;
}

.card-grid-sub {
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.card-grid-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
}

/* ===== ALT NAVBAR ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--shell-max);
    display: flex;
    background: rgba(12, 12, 20, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    padding: 0.4rem 0 calc(0.4rem + env(safe-area-inset-bottom, 0px));
    z-index: 200;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 600;
    padding: 0.3rem 0;
    transition: color 0.2s;
}

.nav-icon-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.nav-icon-muted {
    filter: grayscale(1) brightness(0.92);
    opacity: 0.72;
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--pink-light);
}

/* ===== ÇOK KÜÇÜK MOBİL ===== */
@media (max-width: 360px) {
    :root { --content-pad: 0.5rem; }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .card-row-title { font-size: 0.72rem; }
}

/* ===== TABLET (481px+) ===== */
@media (min-width: 481px) {
    :root {
        --shell-max: 640px;
        --content-pad: 1rem;
    }

    .header-brand { font-size: 1.35rem; }
    .header-tg { width: 44px; height: 44px; }

    .ticker-item { font-size: 0.8rem; }
    .ticker-marquee { padding: 0.6rem 0; }

    .main-content { gap: 0.85rem; }

    .slider-slide img { aspect-ratio: 16 / 6; }

    .card-row {
        min-height: 68px;
        padding: 0.55rem 0.85rem;
        border-radius: 12px;
    }

    .card-row-logo {
        flex: 0 0 76px;
        width: 76px;
        height: 62px;
    }

    .card-row-logo img {
        max-height: 62px;
    }

    .card-row-title { font-size: 0.9rem; }
    .card-row-sub { font-size: 0.75rem; }
    .card-row-btn { font-size: 0.72rem; padding: 0.42rem 0.7rem; }

    .grid-section-title { font-size: 0.95rem; }
    .card-grid { gap: 0.65rem; }
    .card-grid-logo { max-height: 88px; }
    .card-grid-name { font-size: 0.78rem; }
    .card-grid-badge { font-size: 0.82rem; }

    .bottom-nav-item { font-size: 0.68rem; }
    .nav-icon-img { width: 28px; height: 28px; }
    .bottom-nav-item svg { width: 24px; height: 24px; }
}

/* ===== DESKTOP (769px+) ===== */
@media (min-width: 769px) {
    :root {
        --shell-max: 960px;
        --content-pad: 1.25rem;
    }

    body {
        padding: 1.5rem 1rem 0;
    }

    .app-shell {
        min-height: calc(100vh - 3rem);
        border-radius: 20px 20px 0 0;
        box-shadow:
            0 0 0 1px var(--border),
            0 24px 80px rgba(0, 0, 0, 0.55),
            0 0 60px rgba(255, 45, 120, 0.08);
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    }

    .site-header {
        border-radius: 20px 20px 0 0;
    }

    .header-inner {
        padding: 0.85rem 1.25rem;
        min-height: 60px;
    }

    .header-brand { font-size: 1.5rem; }

    .ticker-item { font-size: 0.85rem; }

    /* Yatay kartlar: 2 sütun grid desktop'ta daha fazla görünür */
    .card-rows {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.65rem;
    }

    .card-row {
        min-height: 72px;
    }

    .card-row-logo {
        flex: 0 0 84px;
        width: 84px;
        height: 66px;
    }

    .card-row-logo img {
        max-height: 66px;
    }

    .card-row-title { font-size: 0.88rem; }
    .card-row-sub { font-size: 0.78rem; }

    /* Sponsor grid: 4 sütun */
    .card-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }

    .card-grid-item {
        padding: 0.75rem 0.55rem 0.85rem;
        border-radius: 14px;
    }

    .card-grid-logo {
        max-height: 96px;
        border-radius: 12px;
    }

    .card-grid-name { font-size: 0.82rem; }
    .card-grid-sub { font-size: 0.65rem; }
    .card-grid-badge { font-size: 0.88rem; }

    .bottom-nav {
        border-radius: 0 0 0 0;
        max-width: var(--shell-max);
        padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom, 0px));
    }

    .bottom-nav-item {
        font-size: 0.72rem;
        gap: 0.25rem;
    }
}

/* ===== GENİŞ DESKTOP (1100px+) ===== */
@media (min-width: 1100px) {
    :root { --shell-max: 1080px; }

    .card-rows {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .card-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.85rem;
    }

    .card-grid-logo { max-height: 100px; }
}
