* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
    width: 100vw;
    gap: 0;
}

/* SIDEBARS */
.sidebar {
    display: flex;
    flex-direction: column;
    background: #ff5301;
    border: 2px solid #0f3460;
    overflow-y: auto;
    overflow-x: hidden;
}

.left-sidebar {
    width: 660px;
    border-right: 2px solid #e94560;
}

.right-sidebar {
    width: 335px;
    border-left: 2px solid #e94560;
}

.sidebar-header {
    background: linear-gradient(90deg, #2D7F97, #2955DC);
    padding-left: 12px;
    padding-right: 12px;
    text-align: center;
    border-bottom: 2px solid #e94560;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.header-image {
    width: 100%;
    max-height: 70px;
    object-fit: contain;
    image-rendering: pixelated;
}

/* CHARACTER LIST - GRID LAYOUT */
.character-list {
    display: grid;
    grid-template-columns: repeat(2, 240px);
    gap: 64px;
    padding: 8px;
    flex: 1;
    align-content: start;
    justify-content: center;
    overflow-y: auto;
}

.character-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 6px;
    background: rgba(15, 52, 96, 0.8);
    border: 1px solid #0f3460;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 90px;
    width: 275px;
}

.character-item:hover {
    background: rgba(233, 69, 96, 0.3);
    border-color: #e94560;
    transform: translateY(-2px);
}

.character-item img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    image-rendering: pixelated;
    flex-shrink: 0;
}

.character-item .name {
    display: none;
}

.character-item .command {
    font-size: 28px;
    color: #f39c12;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 6px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    font-weight: bold;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* CAMERA PLACEHOLDER */
.camera-placeholder {
    width: calc(100% - 16px);
    height: 375px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px dashed #e94560;
    border-radius: 8px;
    margin: 0 8px 8px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.camera-label {
    font-size: 12px;
    color: #e94560;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* COMMAND LIST */
.command-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    flex: 1;
}

.command-item {
    background: rgba(15, 52, 96, 0.8);
    border: 1px solid #0f3460;
    border-radius: 4px;
    padding: 10px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.command-item:hover {
    background: rgba(233, 69, 96, 0.3);
    border-color: #e94560;
}

.command-item .cmd {
    font-family: 'Courier New', monospace;
    color: #f39c12;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.command-item .desc {
    font-size: 14px;
    color: #aaa;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* CENTER AREA */
.center-area {
    width: 1060px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    background: linear-gradient(135deg, #0f1419, #1a2332);
}

/* BATTLE SCREEN */
.battle-screen {
    flex-shrink: 0;
    width: 1020px;
    height: 600px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid #e94560;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.current-player {
    position: absolute;
    top: 10px;
    left: 10px;
    max-width: 200px;
}

.current-player .player-info {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #e94560;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    color: #f39c12;
    text-align: left;
}

.battle-arena {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    gap: 40px;
    position: relative;
    z-index: 10;
    border-radius: 4px;
}

.player-area,
.enemy-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.character-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.character-sprite {
    width: min(30vw, 300px);
    height: min(30vw, 300px);
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 10px rgba(233, 69, 96, 0.5));
}

.energy-projectile {
    position: absolute;
    z-index: 20;
    width: 150px;
    height: 92px;
    object-fit: contain;
    image-rendering: pixelated;
    pointer-events: none;
}

#enemySprite {
    transform: scaleX(-1);
}

.character-info {
    width: 180px;
    text-align: center;
}

.character-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.hp-bar {
    width: 100%;
    height: 32px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #e94560;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    margin-bottom: 100px;
}

.hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    width: 100%;
    transition: width 0.3s ease;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5);
}

.hp-text {
    display: none;
    font-size: 12px;
    margin-top: 4px;
    font-family: 'Courier New', monospace;
    color: #f39c12;
}

/* CONSOLE CONTAINER */
.console-container {
    flex: 1;
    display: flex;
    overflow-y: auto;
    width: 1020px;
}

/* CONSOLE */
.console {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #e94560;
    border-radius: 8px;
    overflow: hidden;
}

.console-header {
    background: linear-gradient(90deg, #1a1a2e, #16213e);
    color: #e94560;
    padding: 8px 12px;
    font-weight: bold;
    border-bottom: 1px solid #e94560;
    font-size: 14px;
    flex-shrink: 0;
}

.console-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 32px;
    line-height: 1.6;
    min-height: 0;
}

.console-line {
    color: #ffffff;
    margin-bottom: 4px;
    word-break: break-word;
}

.console-line.error {
    color: #e74c3c;
}

.console-line.warning {
    color: #f39c12;
}

.console-line.info {
    color: #3498db;
}

/* SCROLLBARS */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 52, 96, 0.3);
}

::-webkit-scrollbar-thumb {
    background: #e94560;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #f39c12;
}

/* RESPONSIVE */
@media (max-width: 1600px) {
    .left-sidebar {
        width: 350px;
    }
    
    .character-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .character-item {
        aspect-ratio: auto;
        height: 80px;
    }

    .character-sprite {
        width: min(30vw, 240px);
        height: min(30vw, 240px);
    }
}
