/* balancebreak/index.html 전용 스타일 (풀스크린 아케이드 톤) */
html, body { height: 100%; }

.jgb-page {
    margin: 0;
    height: 100vh;
    height: 100dvh;
    background: #050912;
    color: #d9f2df;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    display: flex;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}
.jgb-page *, .jgb-page *::before, .jgb-page *::after {
    box-sizing: border-box;
}

.jgb-wrap {
    width: 100%;
    max-width: 480px;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.jgb-back {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 20;
    color: rgba(217,242,223,0.75);
    text-decoration: none;
    font-size: 14px;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jgb-info-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 20;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid rgba(255,210,63,0.7);
    background: rgba(0,0,0,0.35);
    color: #ffd23f;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
}

.jgb-board-area {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.jgb-board {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    cursor: pointer;
}

.jgb-hud-top {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
    z-index: 5;
}

.jgb-gauge-box {
    background: rgba(4,13,7,0.55);
    border: 2px solid #1f5c33;
    border-radius: 3px;
    padding: 5px 8px;
    min-width: 110px;
}

.jgb-gauge-label {
    font-size: 8px;
    color: #6fc98a;
    margin-bottom: 4px;
}

.jgb-gauge {
    height: 10px;
    width: 100px;
    background: #040d07;
    border: 2px solid #1f5c33;
    border-radius: 2px;
    overflow: hidden;
}
.jgb-gauge-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3fff8f, #ffd23f);
    transition: width 0.15s ease-out;
}

.jgb-mini-stats {
    background: rgba(4,13,7,0.55);
    border: 2px solid #1f5c33;
    border-radius: 3px;
    padding: 6px 8px;
    font-size: 8px;
    color: #d9f2df;
    white-space: nowrap;
}

.jgb-hud-bottom {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
    z-index: 5;
}

.jgb-hearts {
    display: flex;
    gap: 4px;
    font-size: 20px;
    line-height: 1;
    color: #ff4d6d;
    text-shadow: 0 0 6px rgba(255,77,109,0.7);
}
.jgb-heart-lost {
    color: rgba(217,242,223,0.2);
    text-shadow: none;
}

.jgb-score-display {
    font-size: 18px;
    color: #ffd23f;
    -webkit-text-stroke: 2px #050912;
    text-shadow: 0 0 8px rgba(255,210,63,0.6), 2px 2px 0 #050912;
    letter-spacing: 1px;
}

.jgb-overlay, .jgb-modal {
    position: absolute;
    inset: 0;
    background: rgba(5,9,18,0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    padding: 16px;
}
.jgb-hidden { display: none; }

.jgb-overlay-box, .jgb-modal-box {
    text-align: center;
    padding: 16px;
    max-height: 100%;
    overflow-y: auto;
}

.jgb-overlay-title, .jgb-modal-title {
    font-size: 18px;
    color: #ffd23f;
    text-shadow: 0 0 10px rgba(255, 210, 63, 0.7);
    margin: 0 0 14px;
}

.jgb-overlay-text {
    font-size: 10px;
    color: #a8d9b6;
    line-height: 2;
    margin: 0 0 16px;
}

.jgb-guide-box { }

.jgb-countdown {
    font-size: 72px;
    color: #ffd23f;
    text-shadow: 0 0 20px rgba(255,210,63,0.8);
}

.jgb-gameover-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 8px;
}

.jgb-btn {
    display: inline-block;
    border: 2px solid #ffd23f;
    border-radius: 2px;
    background: #0c2415;
    color: #ffd23f;
    font-family: inherit;
    font-size: 11px;
    padding: 10px 18px;
    cursor: pointer;
}
.jgb-btn:hover { background: #16401f; }

.jgb-btn-link {
    display: inline-block;
    border: none;
    background: none;
    color: #6fc98a;
    font-family: inherit;
    font-size: 9px;
    padding: 8px;
    margin-top: 8px;
    cursor: pointer;
    text-decoration: underline;
}

.jgb-name-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.jgb-name-label {
    font-size: 9px;
    color: #a8d9b6;
}

.jgb-name-input {
    font-family: inherit;
    font-size: 11px;
    padding: 8px 10px;
    background: #040d07;
    border: 2px solid #2f8f52;
    color: #ffd23f;
    border-radius: 2px;
    text-align: center;
    width: 160px;
}

.jgb-save-msg {
    font-size: 9px;
    min-height: 16px;
    color: #3fff8f;
}

.jgb-ranking-list {
    margin: 0 0 10px;
    padding: 0 0 0 18px;
    font-size: 10px;
    line-height: 1.9;
    color: #a8d9b6;
    text-align: left;
}
.jgb-ranking-empty { list-style: none; margin-left: -18px; color: #4a8a5f; }

.jgb-ranking-more {
    display: block;
    margin-bottom: 12px;
    font-size: 9px;
    color: #3fff8f;
    text-decoration: none;
}
.jgb-ranking-more:hover { text-decoration: underline; }

.jgb-tier-list {
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
    font-size: 9px;
    line-height: 2.1;
    color: #a8d9b6;
    text-align: left;
}

.jgb-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    margin-right: 6px;
    font-size: 12px;
}

.jgb-controls-list {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    font-size: 9px;
    line-height: 2.1;
    color: #a8d9b6;
    text-align: left;
}

.jgb-key {
    display: inline-block;
    background: #1f5c33;
    color: #d9f2df;
    border-radius: 2px;
    padding: 1px 6px;
    font-size: 9px;
    margin: 0 2px;
}

.jgb-touch-controls {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    background: #040d07;
}

.jgb-touch-btn {
    font-family: inherit;
    font-size: 8px;
    color: #d9f2df;
    background: #0c2415;
    border: 2px solid #2f8f52;
    padding: 12px 4px;
    touch-action: none;
    -webkit-touch-callout: none;
    cursor: pointer;
}
.jgb-touch-btn:active { background: #16401f; border-color: #ffd23f; }
.jgb-touch-btn-main { border-color: #ffd23f; color: #ffd23f; }
