/* Property Tycoon Game Styles */

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#game-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#game-canvas {
    max-width: 100%;
    max-height: 100%;
}

/* Player panel */
.player-panel {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    padding: 15px;
    border-radius: 10px;
    color: #fff;
    min-width: 150px;
    z-index: 50;
}

.player-panel.active {
    border: 2px solid #20c997;
    box-shadow: 0 0 15px rgba(32, 201, 151, 0.5);
}

.player-panel .name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-panel .token {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
}

.player-panel .money {
    color: #28a745;
    font-size: 1.2rem;
    font-weight: bold;
}

.player-panel .properties {
    font-size: 0.85rem;
    color: #aaa;
    margin-top: 5px;
}

/* Action buttons */
.game-actions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
}

.game-btn {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.game-btn:hover {
    transform: translateY(-2px);
}

.game-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.game-btn.roll {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: #fff;
}

.game-btn.buy {
    background: linear-gradient(135deg, #6f42c1, #5a32a3);
    color: #fff;
}

.game-btn.auction {
    background: linear-gradient(135deg, #ffc107, #d39e00);
    color: #1a1a2e;
}

.game-btn.end-turn {
    background: linear-gradient(135deg, #17a2b8, #117a8b);
    color: #fff;
}

.game-btn.pay {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: #fff;
}

/* Dice display */
.dice-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 20px;
    z-index: 150;
}

.die {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: dice-roll 0.5s ease;
}

@keyframes dice-roll {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(1.1); }
}

/* Property card popup */
.property-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 0;
    border-radius: 10px;
    width: 250px;
    z-index: 200;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.property-card .header {
    padding: 15px;
    text-align: center;
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
}

.property-card .content {
    padding: 20px;
    color: #333;
}

.property-card .price {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

.property-card .rent-table {
    width: 100%;
    font-size: 0.85rem;
}

.property-card .rent-table td {
    padding: 4px 0;
}

.property-card .rent-table td:last-child {
    text-align: right;
    font-weight: bold;
}

.property-card .buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.property-card .buttons button {
    flex: 1;
}

/* Trade modal */
.trade-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(22, 33, 62, 0.98);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(111, 66, 193, 0.5);
    min-width: 400px;
    z-index: 200;
}

.trade-modal h3 {
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
}

.trade-columns {
    display: flex;
    gap: 20px;
}

.trade-column {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
}

.trade-column h4 {
    color: #20c997;
    margin-bottom: 10px;
}

.trade-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    color: #fff;
    font-size: 0.9rem;
}

.trade-item input[type="checkbox"] {
    accent-color: #6f42c1;
}

/* Auction modal */
.auction-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(22, 33, 62, 0.98);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(111, 66, 193, 0.5);
    text-align: center;
    min-width: 300px;
    z-index: 200;
}

.auction-modal h3 {
    color: #fff;
    margin-bottom: 10px;
}

.auction-modal .property-name {
    color: #ffc107;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.auction-modal .current-bid {
    color: #28a745;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.auction-modal .bidder {
    color: #aaa;
    margin-bottom: 20px;
}

.auction-modal .bid-input {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

.auction-modal input {
    width: 100px;
    padding: 10px;
    border: 2px solid #6f42c1;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    text-align: center;
}

/* Jail modal */
.jail-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(22, 33, 62, 0.98);
    padding: 30px;
    border-radius: 16px;
    border: 2px solid #dc3545;
    text-align: center;
    z-index: 200;
}

.jail-modal h3 {
    color: #dc3545;
    margin-bottom: 20px;
}

.jail-modal p {
    color: #fff;
    margin-bottom: 20px;
}

/* Bankruptcy overlay */
.bankruptcy-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(220, 53, 69, 0.95);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    z-index: 200;
}

.bankruptcy-overlay h2 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 10px;
}

.bankruptcy-overlay p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

/* Winner overlay */
.winner-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    padding: 50px;
    border-radius: 16px;
    text-align: center;
    z-index: 200;
    animation: pop-in 0.5s ease;
}

@keyframes pop-in {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.winner-overlay h2 {
    color: #ffd700;
    font-size: 2.5rem;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 15px;
}

.winner-overlay .subtitle {
    color: #20c997;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.winner-overlay .stats {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 25px;
}

/* Setup modal */
.setup-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(22, 33, 62, 0.98);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(111, 66, 193, 0.5);
    text-align: center;
    z-index: 200;
    min-width: 300px;
}

.setup-modal h3 {
    color: #fff;
    margin-bottom: 20px;
}

.setup-modal .option-group {
    margin-bottom: 20px;
    text-align: left;
}

.setup-modal label {
    color: #ccc;
    display: block;
    margin-bottom: 8px;
}

.setup-modal select {
    width: 100%;
    padding: 10px;
    border: 2px solid #6f42c1;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
}

.setup-modal .start-btn {
    padding: 15px 50px;
    background: linear-gradient(135deg, #20c997, #17a881);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.setup-modal .start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(32, 201, 151, 0.5);
}

/* Turn indicator */
.turn-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 12px 25px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 3px solid #20c997;
    z-index: 50;
    pointer-events: none;
}

.turn-indicator .token-icon {
    font-size: 1.5rem;
}

.turn-indicator .player-name {
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
}

.turn-indicator .player-money {
    color: #28a745;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Hidden class */
.hidden {
    display: none !important;
}
