/* ==========================================================================
   SHARED.CSS (Shared layouts used by both systems)
   ========================================================================== */

.sky-backdrop, .bg-stars, .bg-mountains, .bg-trees {
    position: absolute;
    width: 100% !important;
    height: 100% !important;
    left: 0;
    top: 0;
}

/* ENTITIES */
#p1 { width: 32px; height: 48px; position: absolute; background: transparent; }
.princess-art { position: absolute; width: 32px; height: 48px; background: transparent; }
#p2 { width: 32px; height: 48px; background: transparent; position: absolute; border-radius: 4px; }

/* HUD GLASS CARD */
#hud {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    padding: 8px 24px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 1px;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
#timerCounter { color: #e74c3c; }
#levelCounter { color: #3498db; }

/* ==========================================================================
   CHARACTER SELECTION INTERFACE STYLES
   ========================================================================== */

#charSelectScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 12, 16, 0.95); /* Deep dark frosted backdrop */
    z-index: 5000; /* Forces menu to sit over everything during initialization */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Courier New', Courier, monospace;
    color: #f1f5f9;
    /* --- ENFORCE CARD CLICKABILITY --- */
    pointer-events: auto !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

.menu-title {
    font-size: 28px;
    letter-spacing: 3px;
    color: #3498db;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.character-grid {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.char-card {
    width: 180px;
    background: rgba(31, 40, 51, 0.6);
    border: 2px solid #1f2833;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    /* --- ENFORCE CARD CLICKABILITY --- */
    pointer-events: auto !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* Hover & Active Selected states */
.char-card:hover {
    border-color: #3498db;
    background: rgba(31, 40, 51, 0.9);
}

.char-card.active {
    border-color: #2ecc71; /* Green lock border */
    background: rgba(46, 204, 113, 0.1);
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.3);
}

.char-preview {
    width: 64px;
    height: 64px;
    margin: 0 auto 15px auto;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    /* If you have sprite sheets later, add background-image links here! */
}

.char-name {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.char-desc {
    margin: 0 0 15px 0;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
    height: 32px;
}

/* Mini stat meters */
.stat-bar {
    width: 100%;
    height: 6px;
    background: #0f172a;
    border-radius: 3px;
    overflow: hidden;
}
.stat-bar span {
    display: block;
    height: 100%;
    background: #3498db;
}
.char-card.active .stat-bar span {
    background: #2ecc71;
}

/* Master deployment button */
.start-game-btn {
    padding: 12px 40px;
    font-size: 16px;
    font-weight: bold;
    font-family: inherit;
    color: #ffffff;
    background: #2ecc71;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
    transition: transform 0.1s ease;
}

.start-game-btn:active {
    transform: scale(0.95);
}