/* Papir-kamen-makaze (igra #3). Platformske widgete stilizuje SDK (.vasa-*). */
:root {
    --text: #f3eefe;
    --surface: rgba(255, 255, 255, 0.06);
    --surface-bd: rgba(255, 255, 255, 0.14);
    --bg2: #120a26;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: #0a0616;
    -webkit-tap-highlight-color: transparent;
}
body::before {
    content: '';
    position: fixed;
    inset: -20%;
    z-index: -1;
    background: radial-gradient(circle at 28% 26%, rgba(124, 77, 255, 0.5), transparent 42%),
               radial-gradient(circle at 74% 64%, rgba(255, 61, 110, 0.4), transparent 42%),
               radial-gradient(circle at 50% 96%, rgba(255, 216, 107, 0.3), transparent 45%);
    filter: blur(48px);
}

.rps-app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: calc(12px + env(safe-area-inset-top)) 16px calc(14px + env(safe-area-inset-bottom));
}

/* ---------- Top bar ---------- */
.rps-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rps-top__btns { display: flex; align-items: center; gap: 8px; }
.rps-iconbtn {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    color: var(--text);
    border: 1px solid var(--surface-bd);
    border-radius: 14px;
    background: var(--surface);
    backdrop-filter: blur(10px);
    cursor: pointer; text-decoration: none; position: relative;
}

.rps-title {
    margin: 4px 0 0;
    text-align: center;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.5px;
}
.rps-title span {
    background: linear-gradient(90deg, #ffd86b, #ff7eb3, #b69bff);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Scoreboard ---------- */
.rps-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 10px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--surface-bd);
}
.rps-score__side { display: flex; flex-direction: column; align-items: center; min-width: 90px; }
.rps-score__l { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: rgba(243, 238, 254, 0.55); }
.rps-score__v { font-size: 34px; font-weight: 900; color: #fff; line-height: 1.1; }
.rps-score__vs { font-size: 26px; font-weight: 900; color: rgba(243, 238, 254, 0.4); }

/* ---------- Arena ---------- */
.rps-arena {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px 0;
}
.rps-hand {
    width: 96px; height: 96px;
    display: flex; align-items: center; justify-content: center;
    font-size: 56px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--surface-bd);
}
.rps-hand--opp { transform: scaleX(-1); }      /* protivnička šaka okrenuta */
.rps-arena__vs { font-size: 18px; font-weight: 900; color: rgba(243, 238, 254, 0.45); }

@keyframes rpsShake {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-12px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(-12px); }
}
.rps-hand.shake { animation: rpsShake 0.25s linear infinite; }
.rps-hand--opp.shake { animation: rpsShake 0.25s linear infinite; transform: scaleX(-1); }

.rps-status {
    text-align: center;
    font-size: 17px;
    font-weight: 800;
    min-height: 24px;
    color: rgba(243, 238, 254, 0.85);
}
.rps-status--win { color: #5ef0a8; }
.rps-status--lose { color: #ff8a8a; }
.rps-status--draw { color: #ffd86b; }

/* ---------- Izbori ---------- */
.rps-choices { display: flex; justify-content: center; gap: 14px; }
.rps-choice {
    width: 78px; height: 78px;
    font-size: 38px;
    border-radius: 20px;
    color: #fff;
    border: 1px solid var(--surface-bd);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease;
}
.rps-choice:hover { transform: translateY(-3px); background: rgba(124, 77, 255, 0.25); }
.rps-choice:active { transform: translateY(0); }
.rps-choices--off { opacity: 0.5; pointer-events: none; }

.rps-back {
    align-self: center;
    margin-top: 4px;
    padding: 9px 22px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    background: transparent;
    cursor: pointer;
}

/* ---------- Reklamni baner ---------- */
.rps-adbanner {
    display: flex; align-items: center; justify-content: center;
    width: 100%; max-width: 360px; height: 56px;
    margin: auto auto 0;
    border-radius: 14px;
    border: 1px dashed var(--surface-bd);
    background: var(--surface);
    color: rgba(243, 238, 254, 0.5);
    font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
}

/* ---------- Overlay (mod + kraj) ---------- */
.rps-overlay {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    background: rgba(5, 3, 12, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
}
.rps-overlay[hidden] { display: none; }
.rps-card {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    width: 100%; max-width: 320px;
    padding: 30px 32px;
    border-radius: 26px;
    text-align: center;
    background: linear-gradient(160deg, rgba(40, 28, 78, 0.96), rgba(18, 10, 38, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7);
}
.rps-card h2 { margin: 0 0 2px; font-size: 26px; font-weight: 900; color: #ff7eb3; }
.rps-card .rps-win { color: #5ef0a8; }
.rps-card .rps-lose { color: #ff8a8a; }
.rps-card__sub { margin: 0 0 8px; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.rps-card__sc { font-size: 40px; font-weight: 900; color: #ffd86b; line-height: 1; margin-bottom: 8px; }
.rps-soon { margin: 6px 0 0; font-size: 12px; color: rgba(255, 255, 255, 0.45); }
.rps-rematch__msg { margin: 0; font-size: 13px; font-weight: 700; color: #b69bff; }
.rps-rematch__msg.ready { color: #5ef0a8; }

.rps-btn {
    width: 100%;
    padding: 14px 22px;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    background: linear-gradient(135deg, #7c4dff, #b14dff);
    box-shadow: 0 10px 25px rgba(124, 77, 255, 0.4);
}
.rps-btn--ghost { background: transparent; border: 1px solid rgba(255, 255, 255, 0.25); color: rgba(255, 255, 255, 0.85); box-shadow: none; }

/* ---------- Online lobi / soba ---------- */
.rps-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 2px;
    color: #fff;
    border: 1px solid var(--surface-bd);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    outline: none;
}
.rps-input[readonly] { font-size: 12px; letter-spacing: 0; color: rgba(255, 255, 255, 0.7); }
.rps-room__code {
    font-size: 44px;
    font-weight: 900;
    letter-spacing: 8px;
    color: #ffd86b;
    padding: 6px 0;
}
.rps-wager { display: flex; flex-direction: column; gap: 5px; width: 100%; text-align: left; font-size: 12px; font-weight: 600; color: rgba(243, 238, 254, 0.7); }
.rps-room__wager { margin: 0; font-size: 15px; font-weight: 800; color: #ffd86b; }
.rps-room__btns { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.rps-room__wait {
    margin: 10px 0 0;
    font-size: 14px;
    font-weight: 700;
    color: #b69bff;
    animation: rpsBlink 1.4s ease-in-out infinite;
}
@keyframes rpsBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.rps-search__spin {
    font-size: 56px;
    animation: rpsSpin 1.1s ease-in-out infinite;
}
@keyframes rpsSpin {
    0% { transform: rotate(0) scale(1); }
    50% { transform: rotate(180deg) scale(1.15); }
    100% { transform: rotate(360deg) scale(1); }
}
