/* style.css - Structural Layout Framework */

:root {
    --bg-casual: #dcdedf;
    --hud-bg: #3c3d4a;
}

body {
    margin: 0;
    padding: 0;
    background-color: #202225; /* Dark frame backdrop to highlight the mobile phone wrapper */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Standalone Smartphone Core Shell Container Wrapper */
.app-phone-container {
    width: 100%;
    max-width: 430px;
    height: 92vh;
    background-color: var(--bg-casual);
    border-radius: 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px 16px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    
    /* Disable default highlight behaviors to keep gameplay fluid and lag-free */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Header Styles */
.top-bar-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    z-index: 10;
}

.hud-pill {
    background: var(--hud-bg);
    color: white;
    border-radius: 20px;
    padding: 6px 14px;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
}

.level-progress-bar {
    position: relative;
    width: 160px;
    height: 28px;
    background: #17123a;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-fill-layer {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #b526ff, #00f0ff);
    z-index: 1;
    transition: width 0.3s ease;
}

.progress-text-node {
    position: relative;
    z-index: 2;
    font-size: 0.75rem;
}

.gear-config-btn {
    background: #b2b9cb;
    border: none;
    border-radius: 12px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    font-size: 1.1rem;
}

/* Canvas Wrapper Config */
.canvas-viewport-frame {
    width: 100%;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Lower Controls Area */
.bottom-controls-tray {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.card-dock-deck {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    height: 90px;
}

.dock-slot {
    width: 70px;
    height: 85px;
    background: rgba(255, 255, 255, 0.4);
    border: 2px dashed rgba(0,0,0,0.15);
    border-radius: 12px;
    cursor: pointer;
    box-sizing: border-box;
    transition: transform 0.2s;
}

.dock-slot.selected {
    border: 3px solid #00f0ff;
    transform: scale(1.08);
}

.booster-lock-row {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.booster-lock-badge {
    background: #25283d;
    border-radius: 12px;
    padding: 6px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #a4a9c6;
    min-width: 55px;
}