* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    overflow: hidden;
}

.game-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

.game-header {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #ffd700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.game-header h1 {
    font-size: 24px;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.game-info {
    display: flex;
    gap: 30px;
    align-items: center;
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#faction-name {
    font-size: 14px;
    color: #ffd700;
}

.turn-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    gap: 10px;
    padding: 10px;
}

.left-panel, .right-panel {
    width: 250px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    padding: 15px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.left-panel h3, .right-panel h3 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 5px;
}

.resources-panel, .units-panel, .actions-panel, .selected-info, .events-panel {
    margin-bottom: 20px;
}

.resource-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.resource-item:last-child {
    border-bottom: none;
}

.game-map-container {
    flex: 1;
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

#game-map {
    width: 100%;
    height: 100%;
    cursor: crosshair;
    background: #2d5016;
}

.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 10;
}

.map-legend {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 5px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    z-index: 10;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid #fff;
}

.legend-color.red { background: #c41e3a; }
.legend-color.white-south { background: #e8e8e8; }
.legend-color.white-east { background: #d0d0d0; }
.legend-color.white-west { background: #c0c0c0; }
.legend-color.white-north { background: #b0b0b0; }
.legend-color.green { background: #228b22; }
.legend-color.blue { background: #4169e1; }
.legend-color.poland { background: #dc143c; }
.legend-color.finland { background: #003580; }
.legend-color.transcaucasia { background: #ff8c00; }
.legend-color.neutral { background: #808080; }

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background: #ffd700;
    color: #000;
}

.btn-primary:hover {
    background: #ffed4e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.4);
}

.btn-action {
    width: 100%;
    margin-bottom: 8px;
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 1px solid #ffd700;
}

.btn-action:hover {
    background: rgba(255, 215, 0, 0.3);
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.3);
}

.unit-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    border-left: 3px solid #ffd700;
}

.unit-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 13px;
}

#units-list {
    max-height: 200px;
    overflow-y: auto;
}

.unit-item {
    padding: 8px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    font-size: 13px;
    border-left: 3px solid #ffd700;
}

.event-item {
    padding: 8px;
    margin-bottom: 8px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 5px;
    border-left: 3px solid #ffd700;
    font-size: 12px;
}

.event-item.important {
    background: rgba(196, 30, 58, 0.2);
    border-left-color: #c41e3a;
}

.region-info {
    margin-top: 10px;
}

.region-info p {
    margin: 5px 0;
    font-size: 13px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid #ffd700;
    max-width: 400px;
}

.modal-content h2 {
    color: #ffd700;
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.7);
}

/* Region highlighting */
.region-highlight {
    stroke: #ffd700;
    stroke-width: 3;
    opacity: 0.8;
}

