/* ===== DESIGN TOKENS ===== */

:root{
    --color-bg: #f3f4f6;
    --color-card: #ffffff;
    --color-text: #0f172a;
    --color-muted: rgba(15,23,42,0.5);
    --color-border: rgba(0,0,0,0.08);

    --radius: 18px;

    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 20px;
    --space-lg: 40px;
}

/* ===== ШРИФТ ===== */

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

/* ===== BASE ===== */

*{
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

body{
    margin:0;
    font-family: 'Roboto', Arial, sans-serif;
    background:var(--color-bg);
    color:var(--color-text);
}

/* ===== LAYOUT ===== */

.app{
    min-height:100dvh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:12px;

    background:var(--color-bg);

    overflow:auto;
}

/* ===== CARD ===== */

.card{
    position:relative;
    overflow:hidden;

    background:var(--color-card);

    border-radius:24px;
    padding:var(--space-lg);

    width:100%;
    max-width:700px;
    min-height:500px;

    border:1px solid var(--color-border);

    box-shadow:
        0 12px 24px rgba(0,0,0,0.08),
        0 3px 6px rgba(0,0,0,0.04);

    display:flex;
    flex-direction:column;
}

/* ===== ФОН ===== */

.card::before{
    content:'';
    position:absolute;
    inset:0;

    background:url('../img/back.png') center/cover no-repeat;

    opacity: 0.25;

    pointer-events:none;
    z-index:0;
}

.card > *{
    position:relative;
    z-index:1;
}

/* ===== TOP ===== */

.card-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

/* ===== USER BLOCK ===== */

.user-block{
    display:flex;
    align-items:center;
    gap:16px;
}

/* ===== USER NAME ===== */

.user-name{
    font-size:20px;
    font-weight:600;
    color:#5a3b00;
}

/* ===== LOGO ===== */

.logo-box{
    border:1px solid var(--color-border);
    border-radius:20px;
    padding:8px;

    background:#fff;

    box-shadow:
        0 4px 10px rgba(0,0,0,0.08);

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

.logo-box img{
    width:48px;
    height:48px;
    object-fit:contain;
}

.avatar-image{
    transform:scale(1.18);
}

/* ===== CENTER ===== */

.card-center{
    flex:1;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
}

/* ===== BUTTON BASE ===== */

.btn{
    border-radius:20px;
    cursor:pointer;
    transition:all 0.15s ease;
}

/* ===== ВОЙТИ ===== */

.btn-top{
    height:64px;
    padding:0 40px;
    font-size:20px;
    font-weight:600;
    letter-spacing:0.5px;

    background:linear-gradient(
        135deg,
        #00c6ff,
        #00e0c6
    );

    color:#e6ffff;

    border:1px solid rgba(0,0,0,0.12);

    box-shadow:
        0 6px 14px rgba(0,0,0,0.16);
}

/* ===== ИГРАТЬ ===== */

.btn-play{
    width:100%;
    max-width:320px;
    height:80px;

    font-size:30px;
    font-weight:600;
    letter-spacing:1px;

    background:linear-gradient(
        135deg,
        #ff8a00,
        #ffd400
    );

    color:#5a3b00;

    margin:0 auto;

    border:1px solid rgba(0,0,0,0.12);

    box-shadow:
        0 10px 20px rgba(0,0,0,0.18),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

/* ===== HOVER ===== */

.btn-play:hover,
.btn-top:hover{
    transform:translateY(-1px);

    box-shadow:
        0 16px 28px rgba(0,0,0,0.22);
}

/* ===== ACTIVE ===== */

.btn-play:active,
.btn-top:active{
    transform:scale(0.96);

    box-shadow:
        0 4px 8px rgba(0,0,0,0.2),
        inset 0 2px 6px rgba(0,0,0,0.2);
}

/* ===== MESSAGE ===== */

.play-message{
    margin-top:var(--space-md);
    font-size:14px;
    color:var(--color-muted);
    opacity:0;
    transition:opacity 0.2s ease;
}

.play-message.visible{
    opacity:1;
}

/* ===== AUTH MODAL ===== */

.auth-modal{
    position:fixed;
    inset:0;
    z-index:1000;
}

.auth-overlay{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,0.45);
}

.auth-card{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    width:90%;
    max-width:360px;
    background:#ffffff;
    border-radius:24px;
    padding:20px 20px 24px;

    box-shadow:
        0 20px 40px rgba(0,0,0,0.2),
        0 6px 12px rgba(0,0,0,0.1);
}

.auth-close-wrap{
    display:flex;
    justify-content:flex-end;
    margin-bottom:12px;
}

.auth-close{
    border:none;
    background:none;
    font-size:28px;
    line-height:1;
    cursor:pointer;
    color:rgba(0,198,255,0.8);
    transition:all 0.15s ease;
}

.auth-close:hover{
    transform:scale(1.1);
    color:#00c6ff;
}

.auth-form{
    display:flex;
    flex-direction:column;
    gap:14px;
}

.auth-input{
    height:60px;
    padding:0 16px;
    border-radius:18px;
    border:2px solid rgba(0,198,255,0.25);
    font-size:18px;
    font-weight:500;
    color:rgba(15,23,42,0.9);
    outline:none;
    transition:border 0.15s ease;
}

.auth-input:focus{
    border-color:#00c6ff;
}

.auth-submit{
    height:60px;
    font-size:20px;
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus{
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    -webkit-text-fill-color: rgba(15,23,42,0.9);
    transition: background-color 9999s ease-in-out 0s;
}

/* ===== MOBILE ===== */

@media (max-width: 600px){

    .app{
        height:100dvh;
        padding:10px;
    }

    .card{
        height:100%;
        min-height:unset;

        border-radius:24px;
        padding:var(--space-md);
    }

    .card-center{
        justify-content:center;
    }

    .user-name{
        display:none;
    }
}