:root {
    --black: #020202;
    --black-soft: #0b0907;
    --surface: #15100b;
    --ivory: #fff7e6;
    --gold-pale: #ffe7a5;
    --gold: #dca33e;
    --gold-deep: #714409;
    --amber: #ff9f1a;
    --text: #f8edda;
    --muted: #b9a98e;
    --border: rgba(220, 163, 62, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: var(--black);
    font-family: "Segoe UI", Arial, sans-serif;
}

a {
    color: inherit;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.5rem;
    background: #0c0a08;
    border-bottom: 1px solid var(--border);
}

.topbar a {
    text-decoration: none;
}

.topbar nav a {
    margin-left: 1rem;
}

.brand {
    color: var(--gold-pale) !important;
    font-weight: 700;
}

.container {
    width: 100%;
    max-width: 1100px;
    min-height: calc(100vh - 118px);
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.footer {
    padding: 1rem;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
}

/* Ana operasyon ekranı */
.operation-home {
    min-width: 320px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 54%, rgba(162, 89, 8, 0.2) 0, rgba(32, 17, 4, 0.08) 36%, transparent 64%),
        linear-gradient(180deg, #050403 0%, #000 55%, #050301 100%);
}

.operation-main {
    width: 100%;
    min-height: 100svh;
}

.operation-hub {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    min-height: 100svh;
    padding: clamp(1rem, 2.2vh, 1.6rem) clamp(1rem, 2.2vw, 2.4rem) clamp(0.8rem, 1.8vh, 1.4rem);
    overflow: hidden;
}

.operation-hub::before,
.operation-hub::after {
    position: absolute;
    z-index: -1;
    width: 38vw;
    height: 38vw;
    content: "";
    border: 1px solid rgba(220, 163, 62, 0.08);
    transform: rotate(45deg);
    pointer-events: none;
}

.operation-hub::before {
    top: -29vw;
    left: -20vw;
}

.operation-hub::after {
    right: -20vw;
    bottom: -29vw;
}

.hub-heading {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.8rem, 1.8vw, 1.8rem);
    width: min(100%, 1540px);
    margin: 0 auto clamp(0.7rem, 1.5vh, 1.2rem);
    text-align: center;
}

.hub-heading h1 {
    max-width: 1200px;
    margin: 0;
    color: var(--gold-pale);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 2.2vw, 2.65rem);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: clamp(0.08em, 0.25vw, 0.18em);
    text-wrap: balance;
    text-shadow:
        0 1px 0 #fff4c8,
        0 0 14px rgba(255, 175, 46, 0.52),
        0 4px 18px rgba(0, 0, 0, 0.95);
    text-transform: uppercase;
}

.heading-ornament {
    flex: 1 1 80px;
    max-width: 170px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    box-shadow: 0 0 8px rgba(255, 164, 31, 0.5);
}

.operation-stage {
    position: relative;
    display: grid;
    grid-template-columns: clamp(188px, 16vw, 258px) minmax(520px, 1fr) clamp(188px, 16vw, 258px);
    grid-template-rows: repeat(3, minmax(88px, 1fr)) minmax(78px, 0.7fr);
    gap: clamp(0.8rem, 1.6vw, 1.6rem);
    align-items: center;
    width: min(100%, 1660px);
    height: calc(100svh - clamp(95px, 13vh, 145px));
    min-height: 570px;
    max-height: 900px;
    margin: 0 auto;
}

.store-visual {
    position: relative;
    z-index: 2;
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    filter: drop-shadow(0 26px 34px rgba(0, 0, 0, 0.95));
}

.store-visual::before {
    position: absolute;
    right: 8%;
    bottom: -2%;
    left: 8%;
    z-index: -1;
    height: 18%;
    content: "";
    background: radial-gradient(ellipse, rgba(255, 150, 18, 0.34), transparent 68%);
    filter: blur(16px);
}

.store-frame {
    position: relative;
    padding: 1px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 240, 181, 0.95), rgba(145, 82, 7, 0.18) 38%, rgba(246, 172, 51, 0.92));
    border-radius: 18px;
    box-shadow:
        0 0 0 1px rgba(255, 186, 66, 0.18),
        0 0 35px rgba(238, 133, 13, 0.28),
        inset 0 0 28px rgba(255, 181, 52, 0.12);
}

.store-frame::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 24%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.14), transparent 38%);
    border-radius: inherit;
    pointer-events: none;
}

.store-frame img {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100svh - 235px);
    object-fit: contain;
    border-radius: 17px;
}

.luxury-nav-button {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.72rem;
    align-items: center;
    width: 100%;
    min-height: 84px;
    padding: 0.9rem 1rem;
    overflow: hidden;
    color: var(--ivory);
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.2), transparent 22%, transparent 68%, rgba(255, 185, 65, 0.12)),
        linear-gradient(180deg, #5c401b 0%, #2b1a0a 42%, #100b07 72%, #050403 100%);
    border: 1px solid #d39a36;
    border-radius: 17px;
    box-shadow:
        inset 0 1px 0 rgba(255, 246, 200, 0.8),
        inset 0 -10px 18px rgba(0, 0, 0, 0.62),
        0 5px 0 #5f3908,
        0 9px 0 #1a0e02,
        0 18px 30px rgba(0, 0, 0, 0.72),
        0 0 22px rgba(237, 150, 29, 0.13);
    font-weight: 750;
    text-decoration: none;
    transform: translateY(0);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.luxury-nav-button::before {
    position: absolute;
    top: -80%;
    bottom: -80%;
    left: -52%;
    width: 34%;
    content: "";
    background: linear-gradient(90deg, transparent, rgba(255, 249, 214, 0.62), transparent);
    transform: skewX(-22deg);
    transition: left 520ms ease;
    pointer-events: none;
}

.luxury-nav-button::after {
    position: absolute;
    inset: 4px;
    content: "";
    border: 1px solid rgba(255, 221, 143, 0.2);
    border-radius: 12px;
    pointer-events: none;
}

.luxury-nav-button:hover {
    color: #fff9e9;
    border-color: #ffd277;
    filter: brightness(1.15) saturate(1.1);
    box-shadow:
        inset 0 1px 0 #fff7cf,
        inset 0 -9px 16px rgba(0, 0, 0, 0.5),
        0 6px 0 #75490e,
        0 10px 0 #1a0e02,
        0 22px 38px rgba(0, 0, 0, 0.78),
        0 0 30px rgba(255, 170, 35, 0.35);
    transform: translateY(-4px) scale(1.018);
}

.luxury-nav-button:hover::before {
    left: 122%;
}

.luxury-nav-button:active,
.luxury-nav-button.is-clicked {
    filter: brightness(1.28);
    box-shadow:
        inset 0 7px 14px rgba(0, 0, 0, 0.62),
        inset 0 -1px 0 rgba(255, 240, 188, 0.45),
        0 2px 0 #4e2d05,
        0 5px 16px rgba(0, 0, 0, 0.78),
        0 0 38px rgba(255, 171, 37, 0.48);
    transform: translateY(6px) scale(0.975);
}

.luxury-nav-button:focus-visible,
.back-home-button:focus-visible {
    outline: 3px solid #fff1b7;
    outline-offset: 5px;
}

.button-number {
    color: var(--gold-pale);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    opacity: 0.8;
}

.button-title {
    font-size: clamp(0.82rem, 1.04vw, 1.02rem);
    line-height: 1.18;
    letter-spacing: 0.055em;
    text-align: center;
    text-shadow: 0 2px 4px #000, 0 0 10px rgba(255, 202, 102, 0.22);
    text-transform: uppercase;
}

.button-arrow {
    color: var(--gold-pale);
    font-family: Georgia, serif;
    font-size: 1.65rem;
    line-height: 1;
    text-shadow: 0 0 9px rgba(255, 176, 45, 0.65);
}

.position-left-top,
.position-left-middle,
.position-left-bottom {
    grid-column: 1;
    justify-self: end;
}

.position-right-top,
.position-right-middle,
.position-right-bottom {
    grid-column: 3;
    justify-self: start;
}

.position-left-top,
.position-right-top {
    grid-row: 1;
}

.position-left-middle,
.position-right-middle {
    grid-row: 2;
}

.position-left-bottom,
.position-right-bottom {
    grid-row: 3;
}

.position-manager {
    grid-column: 2;
    grid-row: 4;
    justify-self: center;
    width: min(100%, 330px);
}

/* Hazırlık ekranı */
.preparing-page {
    background:
        radial-gradient(circle at 50% 48%, rgba(153, 87, 12, 0.22), transparent 38%),
        #030201;
}

.preparing-main {
    width: 100%;
    min-height: 100svh;
}

.preparing-shell {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 100svh;
    padding: 7rem 2rem 3rem;
    overflow: hidden;
}

.back-home-button {
    position: absolute;
    top: clamp(1.2rem, 3vw, 2.4rem);
    left: clamp(1.2rem, 3vw, 2.8rem);
    display: inline-flex;
    gap: 0.65rem;
    align-items: center;
    min-height: 48px;
    padding: 0.7rem 1.1rem;
    color: var(--gold-pale);
    background: linear-gradient(180deg, #3e2a11, #0c0804);
    border: 1px solid #b9812c;
    border-radius: 12px;
    box-shadow: inset 0 1px rgba(255, 244, 197, 0.55), 0 4px 0 #4c2c05, 0 12px 25px rgba(0, 0, 0, 0.55);
    font-weight: 700;
    text-decoration: none;
    transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.back-home-button:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}

.back-home-button:active,
.back-home-button.is-clicked {
    box-shadow: inset 0 5px 12px rgba(0, 0, 0, 0.65), 0 1px 0 #4c2c05;
    transform: translateY(4px) scale(0.98);
}

.preparing-card {
    width: min(92vw, 680px);
    padding: clamp(2.2rem, 6vw, 4.5rem);
    text-align: center;
    background: linear-gradient(145deg, rgba(56, 37, 15, 0.76), rgba(5, 4, 3, 0.96) 62%);
    border: 1px solid rgba(227, 169, 64, 0.55);
    border-radius: 24px;
    box-shadow: inset 0 1px rgba(255, 241, 190, 0.32), 0 28px 70px rgba(0, 0, 0, 0.75), 0 0 46px rgba(218, 133, 19, 0.12);
}

.preparing-emblem {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    margin: 0 auto 1.8rem;
    color: var(--gold-pale);
    border: 1px solid var(--gold);
    transform: rotate(45deg);
    font-family: Georgia, serif;
    font-size: 1.12rem;
    letter-spacing: 0.09em;
    box-shadow: inset 0 0 18px rgba(255, 167, 32, 0.14), 0 0 25px rgba(255, 167, 32, 0.18);
}

.preparing-emblem span {
    transform: rotate(-45deg);
}

.preparing-card p {
    margin: 0 0 0.8rem;
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.preparing-card h1 {
    margin: 0;
    color: var(--ivory);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 5vw, 3.7rem);
    font-weight: 500;
    line-height: 1.08;
    text-shadow: 0 0 18px rgba(255, 184, 61, 0.18);
}

.preparing-line {
    display: block;
    width: 150px;
    height: 1px;
    margin: 2rem auto 0;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

@media (max-width: 1180px) {
    .operation-stage {
        grid-template-columns: 185px minmax(480px, 1fr) 185px;
        gap: 0.8rem;
    }

    .luxury-nav-button {
        min-height: 76px;
        padding: 0.72rem 0.65rem;
    }

    .button-title {
        font-size: 0.77rem;
    }
}

@media (max-width: 880px) {
    .operation-home {
        overflow: auto;
    }

    .operation-hub {
        overflow: visible;
    }

    .operation-stage {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
        height: auto;
        min-height: 0;
        max-height: none;
        padding-bottom: 2rem;
    }

    .store-visual {
        grid-column: 1 / -1;
        grid-row: auto;
        width: min(100%, 720px);
        margin-bottom: 1.6rem;
    }

    .luxury-nav-button,
    .position-left-top,
    .position-left-middle,
    .position-left-bottom,
    .position-right-top,
    .position-right-middle,
    .position-right-bottom,
    .position-manager {
        grid-column: auto;
        grid-row: auto;
        justify-self: stretch;
        width: 100%;
    }

    .position-manager {
        grid-column: 1 / -1;
        justify-self: center;
        width: min(100%, 340px);
    }
}

@media (max-height: 760px) and (min-width: 881px) {
    .operation-hub {
        padding-top: 0.7rem;
    }

    .operation-stage {
        min-height: 525px;
    }

    .luxury-nav-button {
        min-height: 72px;
    }

    .store-frame img {
        max-height: calc(100svh - 205px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
