body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #1a1a1a;
    font-family: Arial, sans-serif;
}

.menu-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.game-title {
    color: #ffffff;
    font-size: 4rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.decoration {
    width: 100px;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        #ffffff,
        transparent
    );
    position: relative;
}

.decoration::before,
.decoration::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #ffffff;
    transform: rotate(45deg);
}

.decoration.left::before {
    left: 0;
}

.decoration.left::after {
    right: 0;
}

.decoration.right::before {
    left: 0;
}

.decoration.right::after {
    right: 0;
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.menu-button {
    display: block;
    width: 80%;
    margin: 20px auto;
    padding: 15px 30px;
    font-size: 1.5rem;
    background-color: rgba(0, 0, 0, 0.8);
    color: #FFD700;
    border: 2px solid #FFD700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Trebuchet MS', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
}

.menu-button:hover {
    background-color: rgba(255, 215, 0, 0.2);
    transform: scale(1.05);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.menu-button:active {
    transform: scale(0.95);
}

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

#map-container {
    width: 80%;
    max-width: 1000px;
    height: 70vh;
}

#map-container path {
    fill: #2a2a2a;
    stroke: rgba(38, 35, 35, 0.9);
    stroke-width: 5px;
    transition: fill 0.3s ease;
    vector-effect: non-scaling-stroke;
}

#map-container path:hover {
    fill: #3a3a3a;
}

#state-announcement {
    color: #ffffff;
    text-align: center;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.2rem;
    z-index: 1000;
}

.selected-state {
    fill: #2196F3 !important;
}

#map-container svg {
    width: 100%;
    height: 100%;
    transform-origin: center;
    transition: transform 1s ease-in-out;
}

.stats-container {
    position: fixed;
    right: 20px;
    top: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    color: white;
    z-index: 1000;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-size: 1.2rem;
}

.stat-label {
    font-weight: bold;
    margin-right: 20px;
    color: #FFD700;  /* Gold color for labels */
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.stat-value {
    color: #4CAF50;  /* Green color for values */
    font-weight: bold;
    font-size: 1.3rem;
}

.zoom-button {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #FFD700;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Trebuchet MS', Arial, sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.zoom-button:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

.action-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Trebuchet MS', Arial, sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 15px;
    width: 100%;
    transition: all 0.3s ease;
}

.action-button:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

.action-button:disabled {
    background-color: #666;
    cursor: not-allowed;
    transform: none;
}

.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #FFD700;
    padding: 15px 25px;
    border-radius: 8px;
    font-family: 'Trebuchet MS', Arial, sans-serif;
    font-weight: bold;
    animation: fadeOut 3s forwards;
    z-index: 1000;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

.clickable-state {
    cursor: pointer;
    transition: fill 0.3s ease;
}

.clickable-state:hover {
    fill: #3a3a3a !important;
}

.state-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.9);
    padding: 25px;
    border-radius: 10px;
    color: white;
    font-family: 'Trebuchet MS', Arial, sans-serif;
    text-align: center;
    z-index: 1000;
}

.dialog-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.dialog-button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.confirm-button {
    background-color: #4CAF50;
    color: white;
}

.cancel-button {
    background-color: #f44336;
    color: white;
}

.dialog-button:hover {
    transform: scale(1.05);
}

.stats-divider {
    height: 2px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 15px 0;
}

.state-health-container {
    position: fixed;
    left: 20px;
    top: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    color: white;
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
}

.health-title {
    margin-top: 0;
    margin-bottom: 10px;
    color: #4CAF50;
}

.state-health-item {
    margin: 5px 0;
    font-size: 14px;
}

.state-health-label {
    margin-right: 10px;
}

.state-health-value {
    color: #4CAF50;
}

.military-button {
    background-color: #2196F3;  /* Blue color for military button */
}

.military-button:hover {
    background-color: #1976D2;
}

.military-button:disabled {
    background-color: #666;
    cursor: not-allowed;
}

.blockade-button {
    background-color: #FF9800;  /* Orange color for blockade button */
}

.blockade-button:hover {
    background-color: #F57C00;
}

.blockade-button:disabled {
    background-color: #666;
    cursor: not-allowed;
}

.send-military-button {
    background-color: #F44336;  /* Red color for military action */
}

.send-military-button:hover {
    background-color: #D32F2F;
}

.send-military-button:disabled {
    background-color: #666;
    cursor: not-allowed;
}

/* Captured and attack states */
.captured-state {
    fill: #ff0000 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.under-attack {
    fill: #808080 !important;
}

/* Player states */
.selected-state {
    fill: #3498db !important;
}

.opponent-state {
    fill: #e74c3c !important;
}

.low-health-state {
    fill: #ffff00 !important;
}

/* Game over overlay */
.game-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.game-over-content {
    background-color: #2c3e50;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    color: white;
}

.game-over-content h1 {
    color: #e74c3c;
    margin-bottom: 20px;
}

.restart-button {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.restart-button:hover {
    background-color: #27ae60;
}

/* Victory overlay */
.victory-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.victory-content {
    background-color: #2c3e50;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    color: white;
    max-width: 600px;
}

.victory-content h1 {
    color: #2ecc71;
    margin-bottom: 20px;
}

.stats-summary {
    margin: 30px 0;
    font-size: 18px;
    line-height: 1.6;
}

.stats-summary p {
    margin: 10px 0;
}

/* How to Play button */
.how-to-play-button {
    width: 100px;
    height: 100px;
    background-color: #3498db;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    border: 3px solid white;
    text-align: center;
    font-size: 16px;
    line-height: 1.2;
    margin-bottom: 30px;
}

.how-to-play-button:hover {
    background-color: #2980b9;
}

/* Game duration note */
.title-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.duration-note {
    font-size: 14px;
    color: #95a5a6;
    font-style: italic;
}

/* Multiplayer modal: name input styling */
.multiplayer-modal .name-input-container input {
    background-color: #000;
    color: #fff;
    width: 80% !important;        /* override injected 100% width */
    max-width: 320px;              /* prevent over-expansion */
    display: block;                /* enable auto margins */
    margin: 0 auto;                /* center horizontally */
    font-family: "Poppins", "Segoe UI", Roboto, sans-serif;
    font-weight: 500;
}

.multiplayer-modal .name-input-container input::placeholder {
    color: #FFD700; /* yellow */
    font-family: "Poppins", "Segoe UI", Roboto, sans-serif;
}

.multiplayer-modal .name-input-container {
    text-align: center;
}

/* Modernize modal heading fonts */
.multiplayer-modal .modal-content h2,
.waiting-content h2 {
    font-family: "Poppins", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: white;
}