/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* Navigation */
.navbar {
    background-color: #2d2d2d;
    padding: 1rem;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4a9eff;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    background-color: #404040;
    color: #4a9eff;
}

/* Main content */
.content {
    padding: 2rem;
    height: calc(100vh - 4rem);
}

/* Campaign layout */
.campaign-container {
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 2rem;
    height: 100%;
}

/* Game layout */
.game-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    height: 100%;
}

.game-info {
    background: #2d2d2d;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

.game-map {
    background: #2d2d2d;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
}

#battle-map {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    filter: brightness(0.8) contrast(1.2);
}

/* Status Panel */
.status-panel {
    background: #363636;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #404040;
}

.turn-info {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #404040;
}

.turn-side {
    font-weight: bold;
}

.turn-side.blufor {
    color: #4a9eff;
}

.turn-side.opfor {
    color: #ff4a4a;
}

.reinforcements {
    display: flex;
    gap: 1rem;
}

.force {
    flex: 1;
    padding: 0.5rem;
    border-radius: 4px;
    text-align: center;
}

.force.blufor {
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid #4a9eff;
}

.force.opfor {
    background: rgba(255, 74, 74, 0.1);
    border: 1px solid #ff4a4a;
}

/* Battle Log */
.battle-log {
    background: #363636;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #404040;
}

.casualties {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #404040;
}

/* Action Panel */
.action-panel, .waiting-panel {
    background: #363636;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #404040;
}

.target-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
    max-height: 300px;
    overflow-y: auto;
}

.target-option {
    padding: 1rem;
    background: #2d2d2d;
    border: 1px solid #404040;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.target-option:hover {
    background: #404040;
    border-color: #ffffff;
}

.target-option.selected {
    background: #404040;
    border-color: #ffff00;
    box-shadow: 0 0 0 1px #ffff00;
}

.target-option h4 {
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.target-status {
    margin-top: 0.5rem;
    font-weight: bold;
    color: #909090;
}

.action-button {
    width: 100%;
    padding: 1rem;
    background: #4a9eff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s;
}

.action-button:hover:not(:disabled) {
    background: #3a8eff;
    transform: translateY(-1px);
}

.action-button:disabled {
    background: #404040;
    cursor: not-allowed;
    opacity: 0.7;
}

.leave-button {
    margin-top: auto;
    padding: 1rem;
    background: #ff4a4a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.leave-button:hover {
    background: #ff3a3a;
    transform: translateY(-1px);
}

/* Campaign list and faction styles (unchanged) */
.campaign-list, .faction-list {
    background: #2d2d2d;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.map-container {
    background: #2d2d2d;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
}

#campaign-map {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    filter: brightness(0.8) contrast(1.2);
}

/* Map Legend */
.map-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(45, 45, 45, 0.9);
    padding: 1rem;
    border-radius: 4px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 0.5rem;
    border: 2px solid #fff;
}

.legend-color.blufor {
    background-color: #4a9eff;
}

.legend-color.opfor {
    background-color: #ff4a4a;
}

/* POI Popup Styling */
.poi-popup {
    color: #333;
    padding: 0.5rem;
}

.poi-popup h3 {
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.poi-popup p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.poi-status {
    font-weight: bold;
    color: #4a9eff;
}

.poi-action {
    color: #ff4a4a;
    font-style: italic;
}

/* Campaign and Faction items */
.campaign-item, .faction-item {
    padding: 1rem;
    margin-bottom: 1rem;
    background: #363636;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #404040;
}

.campaign-item:hover, .faction-item:hover,
.campaign-item.active, .faction-item.active {
    background: #404040;
    border-color: #4a9eff;
}

.campaign-item.active, .faction-item.active {
    background: #404040;
    border-color: #4a9eff;
    box-shadow: 0 0 0 1px #4a9eff;
}

/* Faction groups */
.faction-group {
    margin-bottom: 2rem;
}

.faction-group-title {
    color: #4a9eff;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #404040;
}

.blufor .faction-group-title {
    color: #4a9eff;
}

.opfor .faction-group-title {
    color: #ff4a4a;
}

.blufor .faction-item.active {
    border-color: #4a9eff;
    box-shadow: 0 0 0 1px #4a9eff;
}

.opfor .faction-item.active {
    border-color: #ff4a4a;
    box-shadow: 0 0 0 1px #ff4a4a;
}

/* Start Campaign Button */
.start-button {
    margin-top: auto;
    padding: 1rem;
    background: #4a9eff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s;
}

.start-button:hover:not(:disabled) {
    background: #3a8eff;
    transform: translateY(-1px);
}

.start-button:disabled {
    background: #404040;
    cursor: not-allowed;
    opacity: 0.7;
}

h2 {
    margin-bottom: 1rem;
    color: #4a9eff;
}

h3 {
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}

/* Placeholder pages */
.placeholder-content {
    text-align: center;
    padding: 4rem;
    background: #2d2d2d;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

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

::-webkit-scrollbar-track {
    background: #2d2d2d;
}

::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a9eff;
}

/* Save info in campaign list */
.save-info {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #404040;
}

.current-faction {
    font-size: 0.9rem;
    color: #909090;
}

/* Campaign actions */
.current-campaign-info {
    background: #363636;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #404040;
    margin-bottom: 1rem;
}

.faction-info {
    font-size: 1.1rem;
    color: #e0e0e0;
}

.campaign-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-button.continue {
    background: #4a9eff;
}

.action-button.continue:hover {
    background: #3a8eff;
}

.action-button.restart {
    background: #ff4a4a;
}

.action-button.restart:hover {
    background: #ff3a3a;
} 