.game-container {
    max-width: 1000px;
    margin: 0 auto;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.game-header h1 {
    color: #2c3e50;
}

.player-select select {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 2px solid #4a90d9;
    font-size: 1rem;
}

.game-menu {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.game-menu h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.game-menu p {
    margin-bottom: 2rem;
    color: #7f8c8d;
}

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

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.btn-primary {
    background: linear-gradient(135deg, #4a90d9, #357abd);
    color: white;
}

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.status-bar {
    display: flex;
    gap: 1rem;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.status-item {
    flex: 1;
    min-width: 80px;
    text-align: center;
    color: white;
}

.status-item .label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.status-item .value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}

.game-main {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.panel {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.panel h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ecf0f1;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.resource {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
}

.resource .icon {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.resource .name {
    display: block;
    font-size: 0.8rem;
    color: #7f8c8d;
}

.resource .value {
    display: block;
    font-weight: bold;
    color: #2c3e50;
}

.stats-detail {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.stats-detail p {
    margin-bottom: 0.25rem;
}

.stats-detail span {
    color: #2c3e50;
    font-weight: 600;
}

.actions-grid {
    display: grid;
    gap: 0.75rem;
}

.action-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #4a90d9;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-name {
    font-weight: 600;
    color: #2c3e50;
}

.action-cost {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.action-end {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-color: #e67e22;
    color: white;
}

.action-end .action-name,
.action-end .action-cost {
    color: white;
}

.log-container {
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.9rem;
}

.log-entry {
    padding: 0.5rem;
    border-bottom: 1px solid #ecf0f1;
    color: #7f8c8d;
}

.log-entry.important {
    color: #e74c3c;
    font-weight: 600;
}

.log-entry.success {
    color: #27ae60;
}

.log-entry.warning {
    color: #f39c12;
}

.game-footer {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.night-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.night-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    padding: 2rem 3rem;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.night-content h2 {
    margin-bottom: 1.5rem;
    color: #a8d8ea;
}

.night-events {
    text-align: left;
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.night-event {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.night-event.danger {
    color: #e74c3c;
}

.night-event.success {
    color: #2ecc71;
}

.night-event.warning {
    color: #f39c12;
}

.game-over {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    color: white;
}

.game-over h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.score-breakdown {
    margin-bottom: 1.5rem;
    text-align: left;
}

.score-line {
    padding: 0.25rem 0;
    font-size: 1.1rem;
}

.final-score {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2rem;
    color: #f1c40f;
}

.load-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.saves-list {
    margin-bottom: 1rem;
}

.save-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.save-item:hover {
    background: #e9ecef;
}

.save-info {
    flex: 1;
}

.save-label {
    font-weight: 600;
    color: #2c3e50;
}

.save-date {
    font-size: 0.8rem;
    color: #7f8c8d;
}

.save-type {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: #4a90d9;
    color: white;
}

.no-saves {
    text-align: center;
    color: #7f8c8d;
    padding: 2rem;
}

.leaderboard-preview-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ecf0f1;
}

.leaderboard-preview-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.high-scores {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.score-entry {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.score-entry .rank {
    font-size: 1.2rem;
    min-width: 2rem;
}

.score-entry .name {
    flex: 1;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
}

.score-entry .score {
    font-weight: bold;
    color: #4a90d9;
}

.no-scores {
    color: #7f8c8d;
    font-style: italic;
}

.leaderboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.leaderboard-list {
    margin-bottom: 1rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.lb-rank {
    font-size: 1.2rem;
    min-width: 2.5rem;
    text-align: center;
}

.lb-name {
    flex: 1;
    font-weight: 600;
    color: #2c3e50;
}

.lb-score {
    font-weight: bold;
    color: #4a90d9;
}

.lb-turns {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.score-input-section {
    margin: 1.5rem 0;
}

.name-input {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #4a90d9;
    border-radius: 8px;
    width: 200px;
    margin-right: 0.5rem;
    text-align: center;
}

.score-submitted {
    color: #2ecc71;
    font-weight: 600;
    margin: 1rem 0;
}

.score-item {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    border-radius: 8px;
    padding: 0.25rem 0.5rem;
}

.player-name-display {
    text-align: center;
    margin-bottom: 1rem;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.player-name-display span {
    font-weight: 600;
    color: #2c3e50;
}

.name-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.name-modal .modal-content {
    text-align: center;
}

.name-modal p {
    color: #7f8c8d;
    margin-bottom: 1rem;
}

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