/* BISONX FIGHTING MOBILE - CSS OTIMIZADO */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0a0a0f;
    font-family: 'Press Start 2P', monospace;
    user-select: none;
    -webkit-user-select: none;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

/* SPLASH */
#screen-splash {
    background: radial-gradient(ellipse at center, #1a0a2e 0%, #0a0a0f 100%);
    justify-content: center;
    align-items: center;
}

.splash-content {
    text-align: center;
    padding: 20px;
}

.game-title {
    font-size: 18vw;
    background: linear-gradient(180deg, #ff6b00 0%, #ff0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    animation: pulse 1.5s ease-in-out infinite;
}

.game-subtitle {
    font-size: 8vw;
    color: #ffd700;
    margin-top: 5px;
    letter-spacing: 0.3em;
}

.edition {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    background: linear-gradient(90deg, #ff6b00, #ff0000);
    border: 2px solid #ffd700;
    font-size: 3.5vw;
    border-radius: 5px;
}

.blink {
    margin-top: 40px;
    font-size: 4vw;
    color: #fff;
    animation: blink 1s step-end infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* SELECT */
#screen-select {
    background: linear-gradient(180deg, #1a0a2e 0%, #0a0a0f 100%);
    padding: 10px;
    justify-content: flex-start;
}

.sel-header {
    text-align: center;
    padding: 10px 0;
}

.sel-header h2 {
    font-size: 5vw;
    color: #ffd700;
}

.sel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 5px;
    flex: 1;
    max-height: 55vh;
}

.char-card {
    background: linear-gradient(180deg, #1a1a2e 0%, #0a0a1a 100%);
    border: 2px solid #333;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
}

.char-card.selected {
    border-color: #ff6b00;
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.6);
    transform: scale(1.05);
}

.char-card canvas {
    width: 100%;
    height: 80px;
    background: #0a0a0f;
    border-radius: 5px;
}

.char-card h3 {
    font-size: 3vw;
    color: #ffd700;
    margin-top: 5px;
}

.char-card p {
    font-size: 2.2vw;
    color: #888;
}

.sel-info {
    padding: 8px;
    background: rgba(0,0,0,0.5);
    border-radius: 8px;
    margin: 5px 0;
    font-size: 3vw;
    color: #aaa;
    min-height: 60px;
}

.sel-confirm {
    width: 100%;
    padding: 15px;
    background: linear-gradient(180deg, #ff6b00, #cc0000);
    border: none;
    border-radius: 10px;
    font-family: 'Press Start 2P', monospace;
    font-size: 5vw;
    color: #fff;
    cursor: pointer;
    margin-top: 5px;
}

.sel-confirm:active {
    transform: scale(0.95);
    filter: brightness(1.3);
}

/* FIGHT */
#screen-fight {
    background: #000;
    flex-direction: column;
}

#gc {
    flex: 1;
    width: 100%;
}

/* HUD */
.hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px;
    z-index: 50;
    pointer-events: none;
}

.hud-side {
    flex: 1;
}

.hud-center {
    text-align: center;
    padding: 0 8px;
}

.hud-name {
    font-size: 3.5vw;
    margin-bottom: 3px;
    text-shadow: 0 0 5px rgba(0,0,0,0.8);
}

.hud-left .hud-name { color: #00aaff; }
.hud-right .hud-name { color: #ff4444; text-align: right; }

.hp-bar {
    width: 100%;
    height: 14px;
    background: #1a1a2e;
    border: 2px solid #ffd700;
    border-radius: 3px;
    overflow: hidden;
}

.hp-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(180deg, #00ff00, #00aa00);
    transition: width 0.2s;
}

.hp-right {
    float: right;
}

.sp-bar {
    width: 100%;
    height: 8px;
    background: #1a1a2e;
    border: 1px solid #666;
    border-radius: 2px;
    margin-top: 3px;
    overflow: hidden;
}

.sp-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff6b00, #ff00ff);
    transition: width 0.15s;
}

.sp-right {
    float: right;
}

.round-txt {
    font-size: 3vw;
    color: #fff;
}

.timer {
    font-size: 10vw;
    color: #ffd700;
    line-height: 1;
    text-shadow: 0 0 10px rgba(255,215,0,0.5);
}

/* MOVE NAME */
.move-name {
    position: absolute;
    bottom: 35vh;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4.5vw;
    color: #ffd700;
    background: rgba(0,0,0,0.85);
    padding: 8px 16px;
    border-radius: 8px;
    border: 2px solid #ff6b00;
    z-index: 60;
    opacity: 0;
    transition: opacity 0.15s;
    text-align: center;
    white-space: nowrap;
}

.move-name.show {
    opacity: 1;
}

/* ROUND MSG */
.round-msg {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12vw;
    color: #ffd700;
    text-shadow: 0 0 30px rgba(255,215,0,0.8);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
}

.round-msg.show {
    animation: rmsg 2s ease-out forwards;
}

@keyframes rmsg {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    30% { transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* CONTROLES */
.controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 10px;
    z-index: 70;
    pointer-events: none;
}

.controls > * {
    pointer-events: auto;
}

/* D-PAD */
.dpad-area {
    display: grid;
    grid-template-columns: repeat(3, 55px);
    grid-template-rows: repeat(3, 55px);
    gap: 5px;
}

.dpad {
    width: 55px;
    height: 55px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.08s;
}

.dpad:active {
    background: rgba(255,107,0,0.6);
    border-color: #ff6b00;
    transform: scale(0.92);
}

.dpad-up { grid-column: 2; grid-row: 1; }
.dpad-left { grid-column: 1; grid-row: 2; }
.dpad-right { grid-column: 3; grid-row: 2; }
.dpad-down { grid-column: 2; grid-row: 3; }

/* ACTION BUTTONS */
.action-area {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 55%;
}

.act {
    height: 65px;
    border-radius: 12px;
    border: 3px solid;
    font-family: 'Press Start 2P', monospace;
    font-size: 3.5vw;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.08s;
    min-width: 70px;
}

.act:active {
    transform: scale(0.9);
    filter: brightness(1.5);
}

.act-punch {
    background: rgba(255,0,0,0.25);
    border-color: #ff4444;
    color: #ff4444;
}

.act-kick {
    background: rgba(255,165,0,0.25);
    border-color: #ffa500;
    color: #ffa500;
}

.act-spec {
    background: rgba(0,150,255,0.25);
    border-color: #0096ff;
    color: #0096ff;
}

.act-def {
    background: rgba(255,255,0,0.25);
    border-color: #ffff00;
    color: #ffff00;
}

.act-super {
    background: rgba(255,0,255,0.25);
    border-color: #ff00ff;
    color: #ff00ff;
}

/* RESULT */
#screen-result {
    background: radial-gradient(ellipse at center, #1a0a2e 0%, #0a0a0f 100%);
    justify-content: center;
    align-items: center;
}

.result-content {
    text-align: center;
    padding: 20px;
}

.winner {
    font-size: 10vw;
    background: linear-gradient(180deg, #ffd700, #ff6b00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.result-stats {
    font-size: 4vw;
    color: #aaa;
    margin-bottom: 30px;
}

/* RESPONSIVO */
@media (max-height: 600px) {
    .dpad-area {
        grid-template-columns: repeat(3, 45px);
        grid-template-rows: repeat(3, 45px);
    }
    
    .dpad {
        width: 45px;
        height: 45px;
        font-size: 14px;
    }
    
    .act {
        height: 55px;
        min-width: 60px;
    }
}

@media (min-width: 768px) {
    .dpad-area {
        grid-template-columns: repeat(3, 70px);
        grid-template-rows: repeat(3, 70px);
    }
    
    .dpad {
        width: 70px;
        height: 70px;
        font-size: 24px;
    }
    
    .act {
        height: 80px;
        min-width: 90px;
        font-size: 16px;
    }
}