/* ==========================================================================
   HuhuBet Spin – hero bileşeni
   Tüm kurallar .spin-hero altında izole edilmiştir; site genelini etkilemez.
   Kaynak: /spinhuhu (görseller, fontlar, anime.js)
   ========================================================================== */

@font-face {
    font-family: "Termina";
    src: url("../spinhuhu/fonts/Termina-Bold.otf");
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Termina";
    src: url("../spinhuhu/fonts/Termina-Regular.otf");
    font-weight: 400;
    font-display: swap;
}

.spin-hero {
    position: relative;
    isolation: isolate;
    max-width: 1100px;
    margin: var(--spacing-lg) auto 0;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--color-card-border);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    background: #1c0233 url("../spinhuhu/images/main-bg.jpg") no-repeat center center / cover;
    font-family: "Termina", var(--font-display);
    /* Tüm iç ölçüler bu em birimine göre ölçeklenir */
    font-size: 9px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.spin-hero *,
.spin-hero *::before,
.spin-hero *::after {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.spin-hero__inner {
    position: relative;
    z-index: 2;
    padding: 2.4rem 1.5rem 2.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Üst bar: logo + giriş --- */
.spin-hero__top {
    width: 100%;
    max-width: 880px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.spin-hero__logo img {
    height: 38px;
    width: auto;
    display: block;
}

.spin-hero__signin {
    text-decoration: none;
    padding: 11px 22px;
    border-radius: 45px;
    background: #5e248f;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
    color: #fff;
    font-family: "Termina", var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.spin-hero__signin:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.7);
}

/* --- Slot makinesi --- */
.spin-hero__machine {
    position: relative;
    z-index: 3;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slot-logo {
    text-align: center;
    margin-bottom: -11em;
    position: relative;
    z-index: 9;
    pointer-events: none;
}

.slot-logo img {
    width: 30em;
}

.slot-wrap {
    width: 77.5em;
    height: 51.375em;
    max-width: 100%;
    background: url("../spinhuhu/images/slot_bg.png") no-repeat center / contain;
    margin: 0 auto;
    padding: 4.25em 2.9em 3.4375em 2.5em;
    position: relative;
}

.slot-container {
    width: 100%;
    height: 100%;
    border-radius: 1.875em;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    position: relative;
}

.slot-container__item {
    flex: 1;
    margin: 0 0.312em;
    background-position: center top;
    background-repeat: repeat-y;
    height: 100%;
    background-size: 11.1875em;
}

.slot-container__item--1 { background-image: url("../spinhuhu/images/slot_col_1.png"); }
.slot-container__item--2 { background-image: url("../spinhuhu/images/slot_col_2.png"); }
.slot-container__item--3 { background-image: url("../spinhuhu/images/slot_col_3.png"); }
.slot-container__item--4 { background-image: url("../spinhuhu/images/slot_col_4.png"); }
.slot-container__item--5 { background-image: url("../spinhuhu/images/slot_col_5.png"); }
.slot-container__item--6 { background-image: url("../spinhuhu/images/slot_col_6.png"); }

.slot-container__win-line {
    position: absolute;
    top: 48%;
    left: 0;
    width: 100%;
    height: 10.1875em;
    margin-top: -3.4375em;
    transform: translateY(-50%);
    box-shadow: 0 0 1.5625em 0 gold inset;
    display: none;
    opacity: 0;
    animation: spin-hero-blink 0.5s infinite ease alternate;
    animation-delay: 1s;
}

.spin-hero.show-result .slot-container__win-line {
    display: block;
    opacity: 1;
}

/* --- Spin butonu --- */
.game-controls {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spin-btn {
    border: none;
    background: none;
    box-shadow: none;
    cursor: pointer;
    padding: 0;
    animation: spin-hero-pulse 1s infinite;
}

.spin-btn img {
    width: 7em;
    max-width: 100px;
    display: block;
}

.spin-btn[disabled] {
    display: none;
}

/* --- Dekoratif ışıklar --- */
.spin-hero__lights {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.spin-hero__lights span {
    position: absolute;
    display: block;
}

.spin-hero__lights img {
    display: block;
    width: 100%;
    height: auto;
}

.light1 {
    width: 9%;
    left: 5%;
    top: 6%;
    animation: spin-hero-float1 3s infinite alternate ease-in-out;
}

.light2 {
    width: 11%;
    left: 1%;
    top: 38%;
    animation: spin-hero-float2 3s infinite alternate ease-in-out;
}

.light3 {
    width: 9%;
    right: 6%;
    top: 8%;
    transform: rotate(-16deg);
    animation: spin-hero-float3 3s infinite alternate ease-in-out;
}

.light4 {
    width: 12%;
    right: 3%;
    bottom: 4%;
    transform: rotate(26deg);
    animation: spin-hero-float4 3s infinite alternate ease-in-out;
}

/* --- Kazanç modalı --- */
.spin-modal {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: radial-gradient(circle at 70% 50%, rgba(94, 36, 143, 0.55) 0%, rgba(10, 4, 20, 0.88) 70%);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.spin-hero.show-modal .spin-modal {
    opacity: 1;
    visibility: visible;
}

.spin-modal__card {
    text-align: center;
    max-width: 420px;
    width: 100%;
    padding: 2rem 1.75rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, rgba(40, 8, 70, 0.95), rgba(15, 3, 30, 0.97));
    border: 1px solid rgba(248, 255, 19, 0.35);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    transform: scale(0.85);
    transition: transform 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.spin-hero.show-modal .spin-modal__card {
    transform: scale(1);
}

.spin-modal__top {
    color: #fff;
    text-shadow: 0 0 14px rgba(0, 0, 0, 0.8);
    font-family: "Termina", var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
}

.spin-modal__title {
    color: #f8ff13;
    text-shadow: 0 0 18px rgba(248, 255, 19, 0.35);
    font-family: "Termina", var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin: 0.4rem 0 0.75rem;
}

.spin-modal__desc {
    color: var(--color-text-secondary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.spin-modal__cta {
    display: inline-block;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 13px 46px;
    border-radius: 77px;
    background: #f8ff13;
    box-shadow: 0 0 16px rgba(248, 255, 19, 0.6);
    color: #1a0a2e;
    font-family: "Termina", var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.spin-modal__cta:hover {
    background: #fff;
    color: #5e248f;
    transform: translateY(-1px);
}

/* --- Animasyonlar --- */
@keyframes spin-hero-blink {
    0% { opacity: 0.2; }
    80%, 100% { opacity: 1; }
}

@keyframes spin-hero-pulse {
    50% { transform: scale(1.04); }
}

@keyframes spin-hero-float1 {
    50% { transform: translate(8px, 8px); }
}

@keyframes spin-hero-float2 {
    50% { transform: translate(12px, 5px); }
}

@keyframes spin-hero-float3 {
    0%, 100% { transform: rotate(-16deg) translate(0, 0); }
    50% { transform: rotate(-16deg) translate(-8px, 8px); }
}

@keyframes spin-hero-float4 {
    0%, 100% { transform: rotate(26deg) translate(0, 0); }
    50% { transform: rotate(26deg) translate(-8px, 8px); }
}

/* --- Responsive: bütün makineyi font-size ile ölçekle --- */
@media (max-width: 900px) {
    .spin-hero { font-size: 7px; }
    .spin-hero__inner { padding: 2rem 1rem 2.4rem; }
    .spin-modal__title { font-size: 2.4rem; }
}

@media (max-width: 620px) {
    .spin-hero { font-size: 5.4px; }
    .spin-hero__logo img { height: 30px; }
    .spin-hero__signin { font-size: 0.7rem; padding: 9px 16px; }
    .spin-modal__top { font-size: 1.1rem; }
    .spin-modal__title { font-size: 2rem; }
    .spin-modal__desc { font-size: 0.85rem; }
    .spin-modal__cta { font-size: 0.85rem; padding: 11px 34px; }
    .light2, .light4 { display: none; }
}

@media (max-width: 400px) {
    .spin-hero { font-size: 4.4px; }
}

@media (prefers-reduced-motion: reduce) {
    .spin-hero__lights span,
    .spin-btn { animation: none; }
}
