
/* =========================================
   1. GENEL SAYFA AYARLARI
========================================= */

:root {
    font-family: Arial, sans-serif;
    color: #ffd1df;
    background: #090207;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    background: #000;
}


/* =========================================
   2. OYUN ALANI
========================================= */

#app {
    width: 100%;
    min-height: 100svh;

    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    max-width: 100%;
    flex: 0 0 auto;
}

#game-container canvas {
    display: block;
    max-width: 100%;
}

/* iPhone'da yazı alanına basınca
   otomatik yakınlaşmayı önler. */

input,
textarea,
select {
    font-size: 16px !important;
}


/* =========================================
   3. WEB MENÜSÜ
========================================= */

#app.cr-menu-active {
    display: block;
    min-height: 100svh;
}

#crushrush-web-menu {
    min-height: 100svh;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-bottom: 130px;

    background: radial-gradient(
        circle at 50% 20%,
        #34101d 0,
        #210811 55%,
        #16060d 100%
    );
}

/* Arka plandaki küçük yıldızlar */

#crushrush-web-menu::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.7;
    pointer-events: none;

    background-image: radial-gradient(
        #ff6b9a 1.5px,
        transparent 2px
    );

    background-size: 83px 99px;
    background-position: 20px 32px;
}


/* =========================================
   4. ÜST MENÜ VE BUTONLAR
========================================= */

.cr-hero,
.cr-auth-card {
    position: relative;
    z-index: 1;
}

.cr-hero {
    max-width: 780px;
    margin: auto;
}

.cr-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 24px clamp(16px, 4vw, 34px);
}

#crushrush-web-menu button {
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-weight: 800;
    color: #ffd1df;
}

.cr-icon-btn,
.cr-small-btn {
    min-height: 44px;
    padding: 9px 15px;

    border: 2px solid #ff9bb2;
    border-radius: 13px;

    background: #451525;
    box-shadow: 0 0 5px #d34e77;
}

.cr-icon-btn {
    font-size: 26px;
}


/* =========================================
   5. CRUSHRUSH BAŞLIĞI
========================================= */

.cr-brand {
    text-align: center;

    padding:
        clamp(42px, 10vh, 120px)
        10px
        clamp(48px, 10vh, 110px);
}

.cr-brand h1 {
    font-family: "Arial Black", Arial, sans-serif;
    font-size: clamp(39px, 9vw, 76px);

    color: #ff527c;
    text-shadow: 4px 5px #100309;

    margin: 0;
    letter-spacing: -1.5px;
}

.cr-brand p {
    color: #f7b0bd;
    font-size: clamp(14px, 3vw, 19px);
    margin-top: 30px;
}


/* =========================================
   6. GİRİŞ VE ÜYELİK PANELİ
========================================= */

.cr-auth-card {
    width: min(90%, 540px);
    margin: 0 auto 50px;

    padding:
        12px
        clamp(16px, 5vw, 30px)
        24px;

    border: 2px solid #ff9bb2;
    border-radius: 18px;

    background: #542b3d;
    box-shadow: 0 0 12px #4e1831;
}


/* Giriş Yap / Üye Ol sekmeleri */

.cr-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.cr-tabs button {
    flex: 1;
    min-width: 0;

    padding: 16px 8px;

    border: 2px solid #ff9bb2;
    border-radius: 14px;

    background: #421020;
    font-size: 16px;
}

.cr-tabs button.active {
    background: #962a4e;
}


/* =========================================
   7. E-POSTA, ŞİFRE VE FORM ALANLARI
========================================= */

#crushrush-web-menu form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#crushrush-web-menu [hidden] {
    display: none !important;
}

#crushrush-web-menu form input {
    width: 100%;
    height: 48px;
    padding: 0 14px;

    border: 2px solid #ff9bb2;
    border-radius: 10px;

    background: #351320;
    color: #ffd1df;

    outline: none;
}

#crushrush-web-menu form input::placeholder {
    color: #c9a4b0;
}

#crushrush-web-menu form input:focus {
    box-shadow: 0 0 0 2px #ff527c;
}


/* =========================================
   8. GİRİŞ VE MİSAFİR BUTONLARI
========================================= */

.cr-forgot {
    align-self: flex-end;

    border: 0;
    background: none;

    padding: 0 0 6px;
    font-size: 14px;
}

.cr-primary {
    display: block;

    width: min(100%, 320px);
    margin: 12px auto 0;
    padding: 14px 12px;

    border: 2px solid #ff9bb2;
    border-radius: 14px;

    background: #962a4e;
    font-size: 16px;
}

.cr-guest {
    margin-top: 24px;
}


/* =========================================
   9. HATA VE BAŞARI MESAJLARI
========================================= */

#cr-status {
    min-height: 24px;

    text-align: center;
    font-size: 13px;
    line-height: 1.4;
}

#cr-status.success {
    color: #a9ffd0;
}


/* =========================================
   10. ARKA PLAN ŞEHİR SİLÜETİ
========================================= */

.cr-city {
    position: absolute;
    z-index: 0;

    bottom: 0;
    left: 0;

    width: 100%;
    height: 170px;

    pointer-events: none;
    opacity: 0.9;

    background:
        repeating-linear-gradient(
            90deg,
            transparent 0 28px,
            #230812 28px 30px,
            transparent 30px 46px
        ),
        repeating-linear-gradient(
            90deg,
            #4b1427 0 43px,
            #220711 43px 48px
        );

    border-top: 12px solid #4b1427;
}


/* =========================================
   11. AYARLAR PENCERESİ
========================================= */

.cr-dialog {
    width: min(92vw, 440px);
    max-height: min(80svh, 640px);

    overflow: auto;
    padding: 24px;

    border: 2px solid #ff9bb2;
    border-radius: 16px;

    background: #694052;
    color: #ffd1df;
}

.cr-dialog::backdrop {
    background: #000b;
}

.cr-dialog-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.cr-dialog h2 {
    font-size: 23px;
    margin: 0 0 20px;
}

.cr-close {
    padding: 6px 12px;

    border: 2px solid #ff9bb2;
    border-radius: 8px;

    background: #421020;
    color: #ffd1df;

    font-size: 18px;
}


/* =========================================
   12. MÜZİK VE SES KAYDIRICILARI
========================================= */

.cr-slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;

    margin: 24px 0;

    font-weight: 800;
    font-size: 14px;
}

.cr-slider-label input {
    width: 45%;
    accent-color: #ff9bb2;
}


/* =========================================
   13. NASIL OYNANIR PENCERESİ
========================================= */

.cr-help-content {
    max-height: 55svh;

    overflow-y: auto;
    padding: 10px 16px;

    border-radius: 9px;

    background: #351320;
    line-height: 1.6;
}

.cr-help-content h3 {
    margin-bottom: 5px;
}

.cr-help-content p {
    margin-top: 5px;
}


/* =========================================
   14. GİZLİ ERİŞİLEBİLİRLİK METİNLERİ
========================================= */

.cr-visually-hidden {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;
    clip: rect(0, 0, 0, 0);

    white-space: nowrap;
    border: 0;
}


/* =========================================
   15. TELEFON EKRANI AYARLARI
========================================= */

@media (max-width: 500px) {

    .cr-topbar {
        padding-top: 16px;
    }

    .cr-brand {
        padding-top: 58px;
        padding-bottom: 64px;
    }

    .cr-auth-card {
        width: 88%;
    }

}

/* Phaser oyun sahnesinin görünürlüğünü koru */
#app:not(.cr-menu-active) #game-container {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    max-width: 100%;
}

#app:not(.cr-menu-active) #game-container canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

/* GAME SAHNESİ - EKRANA UYUMLU BOYUT */

#game-container {
    width: 100%;
    height: 100svh;
    max-width: 100%;
    overflow: hidden;
}

#game-container canvas {
    display: block;
    max-width: 100%;
    max-height: 100svh;
    margin: auto;
}

/* Telefon */
@media (max-width: 767px) {
    #game-container {
        width: 100%;
        height: 100svh;
    }
}
