:root {
    --bg-dark: #121212;
    --bg-panel: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --accent-primary: #ffb703;
    --accent-hover: #fb8500;
    --accent-secondary: #219ebc;
    --danger: #e63946;
    --success: #2a9d8f;
    --border-color: #333333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Kanit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: radial-gradient(circle at top right, #2b2b2b, var(--bg-dark));
}

#app {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
}

.hidden {
    display: none !important;
}

.screen {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 80vh;
}

.panel {
    background: var(--bg-panel);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

.card {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

h1 {
    color: var(--accent-primary);
    margin-bottom: 10px;
    font-size: 28px;
}

p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(255, 183, 3, 0.2);
}

.btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn.primary {
    background: var(--accent-primary);
    color: #000;
}

.btn.primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn.secondary {
    background: transparent;
    border: 1px solid var(--accent-secondary);
    color: var(--accent-secondary);
}

.btn.secondary:hover {
    background: rgba(33, 158, 188, 0.1);
}

.divider {
    margin: 20px 0;
    color: var(--text-secondary);
    position: relative;
}

.divider::before, .divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border-color);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

.room-code-display {
    font-size: 24px;
    color: var(--accent-primary);
    font-weight: bold;
    letter-spacing: 2px;
    margin: 20px 0;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 8px;
}

.player-list {
    list-style: none;
    margin-bottom: 20px;
    text-align: left;
}

.player-list li {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
}

/* Game Board */
#game-screen {
    align-items: flex-start;
}

.game-board {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 20px;
    width: 100%;
}

@media (min-width: 900px) {
    .game-board {
        grid-template-columns: 250px 1fr 300px;
    }
}

.opponents {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.opponent-card {
    background: #252525;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.opponent-info h4 {
    margin-bottom: 5px;
}

.card-slots {
    display: flex;
    gap: 5px;
}

.mini-card {
    width: 30px;
    height: 45px;
    background: #444;
    border-radius: 4px;
    border: 1px solid #666;
}

.mini-card.revealed {
    background: var(--danger);
    opacity: 0.5;
}

.event-log {
    height: 60vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#log-messages {
    flex-grow: 1;
    margin-top: 15px;
    font-size: 14px;
    color: var(--text-secondary);
}

.log-entry {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.my-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.my-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.my-fish {
    font-size: 18px;
    color: var(--accent-primary);
    font-weight: bold;
}

.my-cards {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.identity-card {
    width: 100px;
    height: 150px;
    background: linear-gradient(135deg, #2b2b2b, #1a1a1a);
    border-radius: 10px;
    border: 2px solid var(--accent-secondary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.identity-card:hover {
    transform: scale(1.05);
}

.identity-card.dead {
    border-color: var(--danger);
    opacity: 0.5;
    background: #2a1111;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-buttons hr {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 5px 0;
}

.btn.action {
    background: #333;
    color: white;
}
.btn.action:hover { background: #444; }

.btn.role-action.duke { border-left: 4px solid #9b5de5; }
.btn.role-action.assassin { border-left: 4px solid #f15bb5; }
.btn.role-action.captain { border-left: 4px solid #00bbf9; }
.btn.role-action.ambassador { border-left: 4px solid #00f5d4; }

.response-area {
    background: rgba(230, 57, 70, 0.1);
    border: 1px solid var(--danger);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.response-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn.block { background: var(--accent-secondary); }
.btn.challenge { background: var(--danger); }
.btn.pass { background: #555; }
.timer-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    background: #444;
    font-size: 14px;
    margin-left: 10px;
    color: var(--accent-primary);
}

.timer-badge.danger {
    background: rgba(230, 57, 70, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(230, 57, 70, 0.2);
    padding-bottom: 10px;
}

