/* =============================================================================
   Taiwan Strait Conflict Simulator - Styles
   ============================================================================= */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a2e;
    color: #eee;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    display: flex;
    gap: 20px;
    background-color: #16213e;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#gameCanvas {
    border: 2px solid #0f3460;
    border-radius: 5px;
    cursor: crosshair;
}

/* Sidebar */
.sidebar {
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 720px;
    overflow-y: auto;
}

.panel {
    background-color: #0f3460;
    padding: 10px;
    border-radius: 8px;
}

.panel h3 {
    margin-bottom: 8px;
    color: #e94560;
    border-bottom: 1px solid #e94560;
    padding-bottom: 5px;
    font-size: 12px;
}

/* Buttons */
.control-buttons { display: flex; flex-direction: column; gap: 5px; }

button {
    padding: 6px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    transition: all 0.2s;
}

button:hover { transform: translateY(-2px); }
#startBtn { background-color: #4CAF50; color: white; }
#pauseBtn { background-color: #ff9800; color: white; }
#resetBtn { background-color: #f44336; color: white; }
#autoDeployBtn { background-color: #9C27B0; color: white; }

/* Radio Groups */
.radio-group { display: flex; flex-direction: column; gap: 3px; }

.radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-size: 10px;
}

.radio-group label:hover { background-color: rgba(233, 69, 96, 0.2); }
.radio-group input[type="radio"] { cursor: pointer; margin: 0; }

.section-label {
    font-size: 9px;
    color: #aaa;
    margin-bottom: 3px;
    margin-top: 6px;
    text-transform: uppercase;
}

/* Status Dashboard */
.status-dashboard {
    background: linear-gradient(180deg, #0f3460 0%, #0a2540 100%);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #1a4a7a;
}

.version-tag {
    font-size: 9px;
    color: #888;
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 3px;
}

.status-indicator {
    font-size: 10px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 3px;
    background: #2a5a3a;
    color: #4CAF50;
}

.status-indicator.running {
    background: #5a4a2a;
    color: #ff9800;
}

.status-indicator.paused {
    background: #4a3a2a;
    color: #ffd700;
}

.status-indicator.victory {
    background: #2a5a3a;
    color: #00ff00;
}

.status-indicator.defeat {
    background: #5a2a2a;
    color: #ff4444;
}

/* Force Status */
.force-status {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
    padding: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 5px;
}

.force-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.force-label {
    font-size: 9px;
    font-weight: bold;
    text-transform: uppercase;
}

.force-count {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

.force-ratio {
    font-size: 9px;
    color: #aaa;
    text-align: center;
    flex: 1;
}

.force-ratio span {
    display: block;
    font-size: 12px;
    font-weight: bold;
    color: #ffd700;
}

/* Cursor Panel */
.cursor-panel {
    padding: 6px 10px;
}

.coord-display {
    font-size: 9px;
    color: #888;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.coord-label {
    color: #666;
}

/* Color classes */
.red-text { color: #ff6b6b; }
.blue-text { color: #6bb3ff; }
.time-text { color: #ffd700; font-weight: bold; }
.victory-text { color: #00ff00; font-weight: bold; }

/* Help text */
.help-text {
    font-size: 8px;
    color: #888;
    margin-top: 6px;
    line-height: 1.3;
}

.coord-display {
    font-size: 9px;
    color: #aaa;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #333;
}

/* Unit Categories */
.unit-category {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed #334;
}

.unit-category-label {
    font-size: 8px;
    color: #7a8;
    margin-bottom: 2px;
    font-weight: bold;
}

.weapon-info {
    font-size: 8px;
    color: #aaa;
    margin-left: 16px;
    font-style: italic;
}

/* Unit Stats Display */
.unit-stats-display {
    font-size: 8px;
    color: #888;
    background: rgba(0,0,0,0.2);
    padding: 5px;
    border-radius: 4px;
    margin-top: 6px;
}

.unit-stats-display .stat-row {
    display: flex;
    justify-content: space-between;
    margin: 1px 0;
}

.unit-stats-display .stat-label { color: #aaa; }
.unit-stats-display .stat-value { color: #fff; font-weight: bold; }

/* Transport & Special Abilities */
.transport-indicator {
    font-size: 7px;
    background: #2a4a7a;
    padding: 1px 3px;
    border-radius: 2px;
    margin-left: 3px;
}

.special-ability {
    font-size: 7px;
    color: #7d7;
    margin-left: 16px;
}

/* Time Display */
.time-display {
    background: rgba(0,0,0,0.3);
    padding: 8px;
    border-radius: 5px;
    margin-bottom: 8px;
    text-align: center;
}

.time-display .day {
    font-size: 18px;
    font-weight: bold;
    color: #ffd700;
}

.time-display .hour {
    font-size: 12px;
    color: #aaa;
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: #333;
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.3s;
}

.victory-condition {
    font-size: 9px;
    color: #aaa;
    margin-top: 5px;
}

/* Game Options */
.option-group {
    margin: 5px 0;
}

.option-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 10px;
}

.option-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.option-description {
    font-size: 8px;
    color: #888;
    margin-left: 20px;
    margin-top: 2px;
}

.option-checkbox:hover span {
    color: #fff;
}
