:root {
    --board-bg: #d4eac0;
    --center-bg: #e8f5e9;
    --space-bg: #fff;
    --border-color: #2c3e50;
    --primary-color: #e74c3c;
    --secondary-color: #3498db;
    --accent-color: #f1c40f;
    --text-color: #2c3e50;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

body {
    font-family: 'Segoe UI', 'Roboto', Helvetica, Arial, sans-serif;
    background-color: #2c3e50;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text-color);
}

.hidden {
    display: none !important;
}

#app {
    width: 100%;
    max-width: 1300px;
    padding: 20px;
    box-sizing: border-box;
}

/* Lobby Styles - Card Moderno */
#lobby-screen {
    background: white;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    max-width: 450px;
    margin: 0 auto;
    text-align: center;
}

#lobby-screen h1 {
    color: var(--secondary-color);
    margin-bottom: 30px;
    font-size: 2.5em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.form-group input, .join-room input {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s;
    margin-bottom: 10px;
}

.form-group input:focus, .join-room input:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.actions button {
    width: 100%;
    padding: 15px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background 0.3s, transform 0.1s;
    box-shadow: 0 4px 0 #2980b9;
    margin-bottom: 15px;
}

.actions button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.actions button:active {
    transform: translateY(2px);
    box-shadow: none;
}

.join-room {
    display: flex;
    gap: 10px;
}

/* Game Styles */
#game-screen {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 95vh;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.header div {
    font-size: 1.1em;
    font-weight: 500;
}

.header span {
    font-weight: bold;
    color: var(--secondary-color);
}

.game-container {
    display: flex;
    gap: 30px;
    flex: 1;
    overflow: hidden;
}

/* Tabuleiro Clássico */
.board {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    grid-template-rows: repeat(11, 1fr);
    width: 80vh; /* Responsivo à altura */
    height: 80vh;
    background-color: var(--board-bg);
    border: 2px solid var(--border-color);
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-radius: 4px;
}

.space {
    background-color: var(--space-bg);
    border: 1px solid var(--border-color);
    font-size: 0.75em;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-sizing: border-box;
    transition: transform 0.2s, z-index 0.2s;
}

.space:hover {
    transform: scale(1.05);
    z-index: 100;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    border: 1px solid #000;
}

.space-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2px;
}

.space .icon {
    font-size: 2em; /* Ícone Grande */
    margin-bottom: 2px;
    line-height: 1;
}

/* Cantos */
.space.corner {
    background-color: #f8f9fa;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 0.9em;
}

.space .color-bar {
    height: 25%;
    width: 100%;
    border-bottom: 2px solid var(--border-color);
    box-sizing: border-box;
}

/* Ajustes de orientação para as barras de cor */
/* Top Row */
.space[style*="grid-row: 1"] .color-bar {
    order: 2;
    border-bottom: none;
    border-top: 2px solid var(--border-color);
    position: absolute;
    bottom: 0;
}
.space[style*="grid-row: 1"] {
    padding-bottom: 25%;
}

/* Bottom Row */
.space[style*="grid-row: 11"] {
    /* Padrão já é top */
}

/* Left Column */
.space[style*="grid-column: 1"] .color-bar {
    width: 25%;
    height: 100%;
    border-bottom: none;
    border-right: 2px solid var(--border-color);
    position: absolute;
    right: 0;
    top: 0;
}
.space[style*="grid-column: 1"] {
    flex-direction: row;
    padding-right: 25%;
}

/* Right Column */
.space[style*="grid-column: 11"] .color-bar {
    width: 25%;
    height: 100%;
    border-bottom: none;
    border-left: 2px solid var(--border-color);
    position: absolute;
    left: 0;
    top: 0;
}
.space[style*="grid-column: 11"] {
    flex-direction: row;
    padding-left: 25%;
}


.space .name {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    word-break: break-word;
    font-weight: 500;
}

.space .price {
    font-weight: bold;
    padding: 2px;
    font-size: 0.9em;
}

.center-board {
    grid-column: 2 / 11;
    grid-row: 2 / 11;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--center-bg);
    position: relative;
    border: 2px solid var(--border-color);
}

.center-logo {
    font-size: 3em;
    font-weight: 900;
    color: var(--secondary-color);
    transform: rotate(-45deg);
    opacity: 0.1;
    position: absolute;
    z-index: 0;
    pointer-events: none;
}

#dice-area {
    z-index: 1;
    text-align: center;
    margin-bottom: 20px;
}

#btn-roll-dice {
    padding: 15px 30px;
    font-size: 1.2em;
    background: #e67e22;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 0 #d35400;
    transition: all 0.2s;
}

#btn-roll-dice:hover:not(:disabled) {
    transform: translateY(-2px);
}

#btn-roll-dice:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: none;
}

#btn-roll-dice:disabled {
    background: #bdc3c7;
    box-shadow: none;
    cursor: not-allowed;
}

#dice-result {
    margin-top: 15px;
    font-size: 1.5em;
    font-weight: bold;
    height: 30px;
}

#game-log {
    width: 90%;
    height: 150px;
    overflow-y: auto;
    border: 1px solid #bdc3c7;
    background: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9em;
    z-index: 1;
}

#game-log div {
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}

/* Sidebar */
.sidebar {
    flex: 1;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar h3 {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 0;
    color: var(--secondary-color);
}

#players-list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

#players-list li {
    padding: 10px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 5px solid transparent;
}

#my-properties {
    list-style: none;
    padding: 0;
    flex: 1;
    overflow-y: auto;
}

#my-properties li {
    font-size: 0.9em;
    padding: 5px 0;
    border-bottom: 1px dashed #eee;
}

.actions-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.actions-panel button {
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    transition: opacity 0.2s;
}

.actions-panel button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#btn-buy-property { background-color: #27ae60; }
#btn-end-turn { background-color: #c0392b; }

/* Tokens */
.player-token {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    position: absolute;
    z-index: 10;
    transition: all 0.5s ease;
    /* Centralizar no espaço se possível, mas com offset randomico no JS */
}

/* Responsividade simples */
@media (max-width: 1000px) {
    .game-container {
        flex-direction: column;
        overflow: auto;
    }
    .board {
        width: 100%;
        padding-bottom: 100%; /* Aspect Ratio 1:1 */
        height: 0;
    }
}
