

.screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
    transition: opacity 0.3s;
}

/* Loading Screen */
#loading-screen {
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: center;
}

#loading-screen h1 {
    color: var(--accent-purple);
    font-size: 2.5rem;
    max-width: 800px;
    margin-bottom: 2rem;
}

.lang-select button.active {
    background: var(--accent-pink);
    border-color: var(--accent-pink);
}

/* Menu Systems */
.menu-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    width: 100%;
    max-width: 600px;
}

/* NEW: Wide container for Team Management */
.menu-container-wide {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    width: 90%;
    max-width: 1000px;
    background: rgba(24, 24, 27, 0.95);
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.team-layout {
    display: flex;
    gap: 20px;
    width: 100%;
    height: 500px;
}

.team-panel {
    flex: 1;
    background: #0f0b15;
    border: 1px solid #333;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.team-panel h4 {
    margin: 0 0 10px 0;
    color: var(--accent-yellow);
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

/* Roster Grid (Left) */
.roster-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns */
    grid-auto-rows: 90px;
    gap: 10px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Squad Grid (Right) */
.squad-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    grid-template-rows: repeat(4, 1fr); /* 4 rows */
    gap: 10px;
    height: 100%;
}

/* Card Styles */
.char-card {
    background: #1f1f22;
    border: 1px solid #444;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: grab;
    position: relative;
    overflow: hidden;
    transition: all 0.2s;
}

.char-card:hover {
    border-color: var(--accent-purple);
    background: #27272a;
}

.char-card img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    object-position: top; /* Changed from center to top to show faces */
    border-radius: 4px;
    margin-bottom: 5px;
    pointer-events: none; /* Important for Drag */
}

.char-card span {
    font-size: 0.75rem;
    color: #ccc;
    pointer-events: none;
}

.char-card.locked {
    opacity: 0.4;
    cursor: default;
    background: #111;
}

.char-card.dragging {
    opacity: 0.5;
    border-color: var(--accent-yellow);
}

.squad-slot {
    background: #18181b;
    border: 1px dashed #444;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.2s;
}

.squad-slot.drag-over {
    background: rgba(139, 92, 246, 0.2); /* Purple tint */
    border-color: var(--accent-purple);
    border-style: solid;
}

/* When a card is inside a slot, make it fill the slot */
.squad-slot .char-card {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}


.btn-primary {
    padding: 15px 40px;
    font-size: 1.25rem;
    background: #7f1d1d;
    border-color: #ef4444;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
    width: 300px;
}

.btn-primary:hover {
    background: #991b1b;
}

.btn-secondary {
    background: transparent;
    border: 1px solid #3f3f46;
    color: #94a3b8;
    width: 250px;
}

.btn-secondary:hover {
    border-color: var(--accent-purple);
    color: white;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.btn-level {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-purple);
    background: #1e1b29;
    font-weight: bold;
}

.btn-level:hover:not(.disabled) {
    background: var(--accent-purple);
    box-shadow: 0 0 10px var(--accent-purple);
}

.btn-level.disabled {
    border-color: #3f3f46;
    color: #3f3f46;
    cursor: default;
    background: #0f0b15;
}

/* Game Layout */
.layout {
    display: flex;
    width: 100%;
    height: 100vh; /* Force full viewport height */
    overflow: hidden;
}

/* New Left Panel */
.left-panel {
    width: 280px;
    background: #09090b;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 30;
    flex-shrink: 0;
}

/* Center Map */
.map-section {
    flex: 1;
    position: relative;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
}

/* Right Controls */
.control-panel {
    width: 380px;
    background: var(--panel-bg);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

@media (max-width: 1200px) {
    .left-panel { display: none; } /* Hide log on smaller screens or make draggable */
    .control-panel { width: 300px; }
}

@media (max-width: 900px) {
    .layout { flex-direction: column; }
    .control-panel { width: 100%; height: 40vh; }
    .left-panel { width: 100%; height: 150px; border-right: none; border-bottom: 1px solid var(--border-color); }
}
