﻿:root {
    --primary: #00d2ff;
    --accent: #ff007a;
    --bg: #1a1a2e;
    --card: #16213e;
    --win-color: #00ff88;
    --lose-color: #ff4757;
    --draw-color: #ffd32a;
    --lock-color: #ff9f43;
}

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg);
    color: white;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
    flex-direction:column;
}

.app-container {
    width: 95%;
    max-width: 500px;
    background: var(--card);
    border-radius: 30px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

header {
    text-align: center;
}

header h1 {
    font-family: 'Exo 2', sans-serif;
    font-weight: 900;
    font-size: 2.2rem;
    margin: 0;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.score-display {
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    color: var(--primary);
    margin-top: 5px;
    font-weight: 700;
}

.battle-arena {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
}

.display-box {
    text-align: center;
}

.label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 5px;
    font-weight: bold;
    letter-spacing: 1px;
}

.view-window {
    aspect-ratio: 3 / 4;
    background: rgba(0,0,0,0.4);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid rgba(255,255,255,0.08);
}

#inputVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.cpu-hand-icon {
    font-size: 4rem;
    color: var(--primary);
}

.vs-text {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.4rem;
    color: var(--accent);
    font-weight: 900;
    font-style: italic;
}

.result-display {
    margin-top: 10px;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    height: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.res-win { color: var(--win-color); text-shadow: 0 0 10px var(--win-color); }
.res-lose { color: var(--lose-color); text-shadow: 0 0 10px var(--lose-color); }
.res-draw { color: var(--draw-color); }
.res-locked { color: var(--lock-color); }

.battle-btn {
    width: 100%;
    padding: 1.1rem;
    font-family: 'Exo 2', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    border-radius: 50px;
    border: none;
    background: linear-gradient(90deg, #3a7bd5, var(--primary));
    color: white;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 210, 255, 0.4);
    transition: all 0.2s;
}

.battle-btn:active { transform: scale(0.96); }
.battle-btn:disabled {
    background: #2a2a3e;
    color: #555;
    box-shadow: none;
}

.game-stats {
    background: rgba(0,0,0,0.3);
    border-radius: 20px;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
}

.stat-item .stat-val {
    display: block;
    font-size: 1.3rem;
    font-weight: bold;
    font-family: 'Exo 2', sans-serif;
}

.stat-label {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.4);
    font-weight: bold;
}