/* CSS Variables */
:root {
    --primary-color: #209cee;
    --success-color: #92cc41;
    --warning-color: #f7d51d;
    --error-color: #e76e55;
    --dark-bg: #212529;
    --light-bg: #ffffff;
}

body {
    background-color: var(--dark-bg);
    color: var(--light-bg);
    font-family: 'DotGothic16', 'Press Start 2P', cursive;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

#app {
    width: 95%;
    max-width: 1100px;
    margin: 20px;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}

.nes-container.is-dark {
    background-color: var(--dark-bg) !important;
}

.nes-input.is-dark, .nes-select.is-dark select {
    background-color: #212529 !important;
    color: #fff !important;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    text-shadow: 4px 4px 0px rgba(0,0,0,0.5);
    font-family: 'Press Start 2P', cursive;
}

.view {
    flex: 1;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.menu-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.field {
    margin-bottom: 1.5rem;
}

.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }

/* Player List Highlighting */
.player-list-container {
    margin-top: 1.5rem;
}

#player-list li {
    padding: 0.8rem;
    border-bottom: 2px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.is-me {
    color: var(--warning-color) !important;
    font-weight: bold;
}

.is-me::before {
    content: "▶";
    margin-right: 8px;
}

/* Game Layout */
.game-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 950px) {
    .game-layout {
        grid-template-columns: 1fr;
    }
}

.card-display {
    font-size: 5rem;
    padding: 1.5rem;
    background: #000;
    display: inline-block;
    border: 4px solid var(--primary-color);
    box-shadow: 8px 8px 0px rgba(0,0,0,0.3);
    margin: 1rem 0;
    font-family: 'Press Start 2P', cursive;
}

/* Chat */
.chat-box {
    height: 300px;
    overflow-y: auto;
    font-size: 1rem;
    padding: 15px !important;
    background: rgba(0,0,0,0.4) !important;
}

.chat-msg {
    margin-bottom: 8px;
}

.chat-msg .sender {
    color: var(--primary-color);
    font-weight: bold;
}

/* Prediction List Improvements */
.prediction-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-label {
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    font-size: 0.7rem;
    color: #888;
}

.prediction-item {
    cursor: grab;
    background: #333;
    padding: 12px;
    margin-bottom: 10px;
    border: 2px solid #555;
    display: flex;
    align-items: center;
    position: relative;
    transition: all 0.2s;
}

.prediction-item::before {
    content: attr(data-rank);
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.prediction-item.is-me {
    border-color: var(--warning-color);
    background-color: rgba(247, 213, 29, 0.1);
}

.prediction-item.dragging {
    opacity: 0.5;
    background: #555;
    border: 2px dashed var(--warning-color);
}

/* Results */
.result-row {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 2px solid #444;
}

/* Footer */
footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
}
