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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: white;
}

/* Country Selection Screen */
#country-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

#country-selection h1 {
    font-size: 3rem;
    margin-bottom: 50px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.countries-container {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1200px;
    padding: 0 20px;
}

.country-card {
    background: rgba(255,255,255,0.1);
    border: 3px solid transparent;
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 120px;
}

.country-card:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-5px);
}

.country-card.selected {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.3);
}

/* Boss Country Cards */
.country-card.boss-card {
    border: 2px solid #9b59b6;
    background: rgba(155, 89, 182, 0.2);
}

.country-card.boss-card:hover {
    background: rgba(155, 89, 182, 0.3);
    box-shadow: 0 0 15px rgba(155, 89, 182, 0.5);
}

.country-card.boss-card .country-name {
    color: #9b59b6;
}

/* Mythic Country Cards */
.country-card.mythic-card {
    border: 2px solid #00d4ff;
    background: rgba(0, 212, 255, 0.2);
    animation: mythicCardGlow 2s ease-in-out infinite;
}

@keyframes mythicCardGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 212, 255, 0.3); }
    50% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.6); }
}

.country-card.mythic-card:hover {
    background: rgba(0, 212, 255, 0.3);
}

.country-card.mythic-card .country-name {
    color: #00d4ff;
}

/* Superboss Country Cards */
.country-card.superboss-card {
    border: 3px solid #ff0040;
    background: linear-gradient(135deg, rgba(255, 0, 64, 0.3), rgba(139, 0, 0, 0.3));
    animation: superbossCardGlow 1.5s ease-in-out infinite;
}

@keyframes superbossCardGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 0, 64, 0.5); }
    50% { box-shadow: 0 0 30px rgba(255, 0, 64, 0.8); }
}

.country-card.superboss-card:hover {
    background: linear-gradient(135deg, rgba(255, 0, 64, 0.4), rgba(139, 0, 0, 0.4));
}

.country-card.superboss-card .country-name {
    color: #ff0040;
    font-weight: bold;
}

.country-card.superboss-card .country-flag {
    animation: superbossFlagPulse 1s ease-in-out infinite;
}

@keyframes superbossFlagPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.country-flag {
    font-size: 3rem;
    margin-bottom: 10px;
}

.country-name {
    font-size: 1rem;
    font-weight: bold;
}

#start-btn {
    padding: 15px 60px;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
    pointer-events: none;
}

#start-btn.active {
    opacity: 1;
    pointer-events: all;
}

#start-btn.active:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.5);
}

/* Game Screen */
#game-screen {
    display: none;
    min-height: 100vh;
}

.game-header {
    background: rgba(0,0,0,0.3);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.player-flag {
    font-size: 2rem;
}

.player-country {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Team indicator in header */
.team-indicator {
    background: linear-gradient(135deg, #00b894, #00a085);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-left: 15px;
    display: none;
}

.team-indicator.active {
    display: inline-block;
}

.resources {
    display: flex;
    gap: 30px;
}

.resource {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 8px 15px;
    border-radius: 20px;
}

.resource-icon {
    font-size: 1.3rem;
}

.resource-value {
    font-weight: bold;
    font-size: 1.1rem;
}

.game-content {
    display: flex;
    height: calc(100vh - 70px);
}

.main-area {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.units-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
    max-width: 500px;
}

.army-display {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
}

.army-display h2 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.army-count {
    font-size: 2.5rem;
    font-weight: bold;
    color: #4CAF50;
}

.army-icon {
    font-size: 2rem;
    margin-top: 5px;
}

/* Right Menu */
.right-menu {
    width: 80px;
    background: rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    padding: 20px 10px;
    gap: 15px;
}

.menu-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    padding: 15px 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: bold;
}

.menu-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 15px rgba(102, 126, 234, 0.5);
}

.menu-btn-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 5px;
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: linear-gradient(135deg, #2d3436 0%, #1a1a2e 100%);
    border-radius: 20px;
    padding: 30px;
    min-width: 400px;
    max-width: 500px;
    border: 2px solid rgba(255,255,255,0.1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.modal-header h2 {
    font-size: 1.8rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.close-btn:hover {
    opacity: 1;
}

/* Shop Items */
.shop-item {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shop-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.shop-item-icon {
    font-size: 2rem;
}

.shop-item-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.shop-item-desc {
    font-size: 0.9rem;
    opacity: 0.7;
}

.shop-buy-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-qty-input {
    width: 70px;
    padding: 8px 10px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1rem;
    text-align: center;
    outline: none;
}

.shop-qty-input:focus {
    border-color: #f39c12;
}

.buy-btn {
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    min-width: 100px;
}

.buy-btn:hover {
    transform: scale(1.05);
}

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

/* Stats */
.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    margin-bottom: 10px;
}

.stat-label {
    opacity: 0.8;
}

.stat-value {
    font-weight: bold;
    color: #4CAF50;
}

/* Settings */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    margin-bottom: 10px;
}

.toggle-btn {
    background: #555;
    border: none;
    border-radius: 20px;
    width: 50px;
    height: 26px;
    cursor: pointer;
    position: relative;
    transition: background 0.3s;
}

.toggle-btn.active {
    background: #4CAF50;
}

.toggle-btn::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: left 0.3s;
}

.toggle-btn.active::after {
    left: 26px;
}

.reset-btn {
    background: #e74c3c;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    margin-top: 20px;
    width: 100%;
    transition: all 0.3s;
}

.reset-btn:hover {
    background: #c0392b;
}

/* Attack Button Style */
.menu-btn.attack-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.menu-btn.attack-btn:hover {
    box-shadow: 0 3px 15px rgba(231, 76, 60, 0.5);
}

/* Enemy Country Cards */
.enemy-country {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.enemy-country:hover {
    background: rgba(255,255,255,0.2);
}

/* Scrollable attack countries list */
#attack-countries-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

#attack-countries-list::-webkit-scrollbar {
    width: 8px;
}

#attack-countries-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

#attack-countries-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
}

#attack-countries-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

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

.enemy-flag {
    font-size: 2rem;
}

.enemy-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.enemy-army {
    font-size: 0.9rem;
    opacity: 0.7;
}

.attack-country-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.attack-country-btn:hover {
    transform: scale(1.05);
}

/* Battle Result */
.battle-result-content {
    text-align: center;
    padding: 20px;
}

.battle-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.battle-status {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.battle-status.victory {
    color: #4CAF50;
}

.battle-status.defeat {
    color: #e74c3c;
}

.battle-details {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.battle-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.battle-detail-row:last-child {
    border-bottom: none;
}

.battle-reward {
    color: #4CAF50;
    font-weight: bold;
}

.battle-loss {
    color: #e74c3c;
    font-weight: bold;
}

/* Quests Button Style */
.menu-btn.quests-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.menu-btn.quests-btn:hover {
    box-shadow: 0 3px 15px rgba(243, 156, 18, 0.5);
}

/* Quests Styles */
.quest-category {
    margin-bottom: 25px;
}

.quest-category-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    color: #f39c12;
}

.quest-item {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.quest-item.completed {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.5);
}

.quest-info {
    flex: 1;
}

.quest-name {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 5px;
}

.quest-progress {
    font-size: 0.85rem;
    opacity: 0.7;
}

.quest-reward {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    white-space: nowrap;
}

.quest-reward.claimed {
    background: #4CAF50;
}

.claim-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.claim-btn:hover {
    transform: scale(1.05);
}

.quest-check {
    color: #4CAF50;
    font-size: 1.5rem;
}

/* Attack Setup Styles */
.attack-setup-row {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.attack-setup-row label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

.input-group {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-bottom: 8px;
}

.input-group input {
    width: 80px;
    padding: 8px;
    border: none;
    border-radius: 5px;
    text-align: center;
    font-size: 1.1rem;
    background: rgba(255,255,255,0.2);
    color: white;
}

.adjust-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.adjust-btn:hover {
    transform: scale(1.05);
}

.adjust-btn.max-btn {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.available {
    font-size: 0.9rem;
    opacity: 0.7;
}

.total-power {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.launch-attack-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.launch-attack-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.5);
}

.enemy-forces {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.5);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.enemy-forces-title {
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Attacking Progress Screen */
.attacking-content {
    text-align: center;
    padding: 30px 20px;
}

.attacking-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.attacking-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #e74c3c;
}

.attacking-target {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.progress-container {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 5px;
    margin-bottom: 20px;
}

.progress-bar {
    height: 30px;
    background: linear-gradient(90deg, #e74c3c, #c0392b);
    border-radius: 12px;
    width: 0%;
    transition: width 0.1s linear;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.progress-text {
    font-size: 2rem;
    font-weight: bold;
    margin-top: 20px;
    color: #e74c3c;
}

.attacking-status {
    font-size: 1rem;
    opacity: 0.7;
    margin-top: 15px;
}

/* Code Button Style */
.menu-btn.code-btn {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.menu-btn.code-btn:hover {
    box-shadow: 0 3px 15px rgba(155, 89, 182, 0.5);
}

/* Team Button Style */
.menu-btn.team-btn {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
}

.menu-btn.team-btn:hover {
    box-shadow: 0 3px 15px rgba(0, 184, 148, 0.5);
}

/* Team Modal Styles */
.team-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.team-option-btn {
    padding: 20px;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.team-option-btn.create-btn {
    background: linear-gradient(135deg, #00b894, #00a085);
}

.team-option-btn.join-btn {
    background: linear-gradient(135deg, #0984e3, #0773c7);
}

.team-option-btn.browse-btn {
    background: linear-gradient(135deg, #fdcb6e, #f39c12);
}

.team-option-btn:hover {
    transform: scale(1.02);
}

.team-form-group {
    margin-bottom: 15px;
}

.team-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    opacity: 0.9;
}

.team-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.team-input:focus {
    border-color: #00b894;
}

.team-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.team-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    resize: vertical;
    min-height: 80px;
}

.team-textarea:focus {
    border-color: #00b894;
}

.team-textarea::placeholder {
    color: rgba(255,255,255,0.5);
}

.privacy-toggle {
    display: flex;
    gap: 10px;
}

.privacy-option {
    flex: 1;
    padding: 12px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.privacy-option:hover {
    background: rgba(255,255,255,0.2);
}

.privacy-option.selected {
    border-color: #00b894;
    background: rgba(0, 184, 148, 0.3);
}

.team-code-display {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    margin-top: 10px;
}

.team-code-display .code {
    font-size: 1.8rem;
    font-weight: bold;
    color: #00b894;
    letter-spacing: 5px;
}

.create-team-btn {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.create-team-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(0, 184, 148, 0.5);
}

/* Team List Styles */
.teams-list {
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.team-list-item {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.team-list-item:hover {
    background: rgba(255,255,255,0.15);
}

.team-list-item.active {
    border: 2px solid #00b894;
    background: rgba(0, 184, 148, 0.2);
}

.team-list-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.team-list-flag {
    font-size: 2rem;
}

.team-list-details {
    flex: 1;
}

.team-list-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.team-list-desc {
    font-size: 0.85rem;
    opacity: 0.7;
}

.team-list-badge {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 10px;
    margin-top: 5px;
    display: inline-block;
}

.team-list-badge.public {
    background: rgba(9, 132, 227, 0.3);
    color: #74b9ff;
}

.team-list-badge.private {
    background: rgba(253, 121, 168, 0.3);
    color: #fd79a8;
}

.team-join-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.team-join-btn:hover {
    transform: scale(1.05);
}

.team-join-btn.active {
    background: linear-gradient(135deg, #636e72, #4a5568);
    cursor: default;
}

.team-join-btn.active:hover {
    transform: none;
}

/* Current playing mode */
.current-mode {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    text-align: center;
}

.current-mode.team-mode {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.3), rgba(0, 206, 201, 0.3));
    border: 2px solid #00b894;
}

.current-mode.solo-mode {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.3), rgba(162, 155, 254, 0.3));
    border: 2px solid #6c5ce7;
}

.mode-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.mode-team-name {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #00b894;
}

.mode-resources {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 0.95rem;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.mode-info {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 10px;
}

.leave-team-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.leave-team-btn:hover {
    transform: scale(1.05);
}

.teams-section-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1rem;
    opacity: 0.8;
}

.team-resources-preview {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 3px;
}

.team-members-count {
    font-size: 0.8rem;
    color: #00b894;
    margin-top: 3px;
}

/* Country select in create team */
.country-select-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-height: 150px;
    overflow-y: auto;
    padding: 5px;
}

.country-select-option {
    background: rgba(255,255,255,0.1);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 10px 5px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.country-select-option:hover {
    background: rgba(255,255,255,0.2);
}

.country-select-option.selected {
    border-color: #00b894;
    background: rgba(0, 184, 148, 0.2);
}

.country-select-flag {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 3px;
}

.country-select-name {
    font-size: 0.7rem;
    opacity: 0.8;
}

.no-teams-message {
    text-align: center;
    padding: 30px;
    opacity: 0.7;
}

/* Code Modal Styles */
.code-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.code-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.3s;
}

.code-input:focus {
    border-color: #9b59b6;
}

.code-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.redeem-btn {
    padding: 12px 25px;
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.redeem-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 15px rgba(155, 89, 182, 0.5);
}

.code-message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
    display: none;
}

.code-message.success {
    display: block;
    background: rgba(76, 175, 80, 0.3);
    border: 1px solid #4CAF50;
    color: #4CAF50;
}

.code-message.error {
    display: block;
    background: rgba(231, 76, 60, 0.3);
    border: 1px solid #e74c3c;
    color: #e74c3c;
}

.redeemed-codes {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
}

.redeemed-codes h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

#redeemed-list {
    font-size: 0.9rem;
    opacity: 0.7;
}

.redeemed-code-item {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

/* Difficulty Labels */
.enemy-difficulty {
    font-size: 0.8rem;
    font-weight: bold;
    margin: 3px 0;
}

.diff-easy { color: #4CAF50; }
.diff-medium { color: #f39c12; }
.diff-hard { color: #e67e22; }
.diff-veryhard { color: #e74c3c; }

.diff-boss {
    color: #9b59b6;
    font-size: 1rem;
    text-shadow: 0 0 10px rgba(155, 89, 182, 0.5);
    animation: bossGlow 1.5s ease-in-out infinite;
}

@keyframes bossGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(155, 89, 182, 0.5); }
    50% { text-shadow: 0 0 20px rgba(155, 89, 182, 0.8), 0 0 30px rgba(155, 89, 182, 0.5); }
}

.diff-legendary {
    color: #ff6b35;
    font-size: 1rem;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
    animation: legendaryGlow 1.5s ease-in-out infinite;
}

@keyframes legendaryGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 107, 53, 0.5); }
    50% { text-shadow: 0 0 20px rgba(255, 107, 53, 0.8), 0 0 30px rgba(255, 107, 53, 0.5); }
}

.diff-mythic {
    color: #00d4ff;
    font-size: 1.1rem;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
    animation: mythicGlow 1.2s ease-in-out infinite;
}

@keyframes mythicGlow {
    0%, 100% { text-shadow: 0 0 15px rgba(0, 212, 255, 0.6); }
    50% { text-shadow: 0 0 25px rgba(0, 212, 255, 0.9), 0 0 40px rgba(0, 212, 255, 0.5); }
}

.diff-impossible {
    color: #ff0040;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 0 0 20px rgba(255, 0, 64, 0.7);
    animation: impossibleGlow 0.8s ease-in-out infinite;
}

@keyframes impossibleGlow {
    0%, 100% { text-shadow: 0 0 20px rgba(255, 0, 64, 0.7), 0 0 40px rgba(255, 0, 64, 0.3); }
    50% { text-shadow: 0 0 30px rgba(255, 0, 64, 1), 0 0 60px rgba(255, 0, 64, 0.6); }
}

/* Boss Country Styling */
.boss-country {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.3), rgba(142, 68, 173, 0.3));
    border: 2px solid #9b59b6;
    animation: bossBorder 2s ease-in-out infinite;
}

@keyframes bossBorder {
    0%, 100% { border-color: #9b59b6; box-shadow: 0 0 10px rgba(155, 89, 182, 0.3); }
    50% { border-color: #8e44ad; box-shadow: 0 0 20px rgba(155, 89, 182, 0.6); }
}

.boss-country .enemy-flag { font-size: 2.5rem; }
.boss-country .enemy-name { color: #9b59b6; font-size: 1.3rem; }

.boss-attack-btn {
    background: linear-gradient(135deg, #9b59b6, #8e44ad) !important;
    animation: bossButtonPulse 2s ease-in-out infinite;
}

@keyframes bossButtonPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.boss-attack-btn:hover {
    box-shadow: 0 0 20px rgba(155, 89, 182, 0.7) !important;
}

/* Superboss Country Styling */
.superboss-country {
    background: linear-gradient(135deg, rgba(255, 0, 64, 0.4), rgba(139, 0, 0, 0.4));
    border: 3px solid #ff0040;
    animation: superbossBorder 1.5s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.superboss-country::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 0, 64, 0.1), transparent);
    animation: superbossShine 3s linear infinite;
}

@keyframes superbossShine {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes superbossBorder {
    0%, 100% { border-color: #ff0040; box-shadow: 0 0 20px rgba(255, 0, 64, 0.5), inset 0 0 20px rgba(255, 0, 64, 0.1); }
    50% { border-color: #ff3366; box-shadow: 0 0 40px rgba(255, 0, 64, 0.8), inset 0 0 30px rgba(255, 0, 64, 0.2); }
}

.superboss-country .enemy-flag {
    font-size: 3rem;
    animation: superbossIcon 2s ease-in-out infinite;
}

@keyframes superbossIcon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.superboss-country .enemy-name {
    color: #ff0040;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 0, 64, 0.5);
}

.superboss-attack-btn {
    background: linear-gradient(135deg, #ff0040, #8b0000) !important;
    animation: superbossButtonPulse 1s ease-in-out infinite;
    font-size: 1.1rem !important;
}

@keyframes superbossButtonPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 0, 64, 0.5); }
    50% { transform: scale(1.08); box-shadow: 0 0 40px rgba(255, 0, 64, 0.8); }
}

.superboss-attack-btn:hover {
    box-shadow: 0 0 40px rgba(255, 0, 64, 0.9) !important;
}

/* Sync indicator */
.sync-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 184, 148, 0.9);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: none;
    z-index: 9999;
}

.sync-indicator.active {
    display: block;
    animation: fadeInOut 1s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    #country-selection h1 {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .countries-container {
        gap: 10px;
    }

    .country-card {
        width: 100px;
        padding: 12px;
    }

    .country-flag {
        font-size: 2.5rem;
    }

    .country-name {
        font-size: 0.9rem;
    }

    .game-header {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }

    .resources {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .resource {
        padding: 5px 8px;
        font-size: 0.85rem;
    }

    .game-content {
        flex-direction: column;
        height: auto;
    }

    .main-area {
        padding: 15px;
        order: 1;
    }

    .units-grid {
        gap: 10px;
        max-width: 100%;
        width: 100%;
    }

    .right-menu {
        width: 100%;
        flex-direction: row;
        order: 2;
        padding: 10px;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .menu-btn {
        padding: 10px 12px;
        font-size: 0.7rem;
        min-width: 60px;
    }

    .modal {
        min-width: unset;
        max-width: 95vw;
        width: 95vw;
        max-height: 85vh;
        padding: 20px;
    }

    .enemy-country {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .attack-country-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .country-card {
        width: 85px;
        padding: 10px;
    }

    .country-flag {
        font-size: 2rem;
    }

    .country-name {
        font-size: 0.75rem;
    }

    .menu-btn {
        padding: 8px;
        font-size: 0.6rem;
        min-width: 50px;
    }
}

/* ==================== WORLD MAP ==================== */

.map-section {
    margin-top: 30px;
    text-align: center;
}

.map-section-title {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 15px;
}

.world-map-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, #1a3a5c 0%, #0d2137 100%);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

#world-map {
    position: relative;
    width: 100%;
    height: 350px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 500"><rect fill="%231a3a5c" width="1000" height="500"/><ellipse cx="500" cy="250" rx="450" ry="200" fill="%230d2137" opacity="0.5"/></svg>') center/cover;
    border-radius: 15px;
}

.map-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    z-index: 10;
}

.map-marker:hover {
    transform: translate(-50%, -50%) scale(1.15);
    background: rgba(0, 0, 0, 0.8);
    border-color: #667eea;
    z-index: 20;
}

.map-marker.selected {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.3);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.marker-flag {
    font-size: 1.8rem;
}

.marker-name {
    font-size: 0.7rem;
    opacity: 0.9;
    white-space: nowrap;
    margin-top: 3px;
}

/* ==================== CITY SELECTION ==================== */

.city-list {
    max-height: 350px;
    overflow-y: auto;
}

.city-item {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.city-item:hover {
    background: rgba(255,255,255,0.2);
}

.city-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.city-icon {
    font-size: 2rem;
}

.city-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.city-defense {
    font-size: 0.85rem;
    opacity: 0.7;
    color: #f39c12;
}

.attack-city-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.attack-city-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.5);
}

/* Atomic War Styling */
.atomic-war-item {
    background: linear-gradient(135deg, rgba(255, 100, 0, 0.3), rgba(255, 50, 0, 0.2));
    border: 2px solid #ff6600;
    animation: atomicGlow 2s ease-in-out infinite;
}

@keyframes atomicGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 100, 0, 0.3); }
    50% { box-shadow: 0 0 25px rgba(255, 100, 0, 0.6); }
}

.atomic-name {
    color: #ff6600;
    font-size: 1.3rem;
}

.atomic-desc {
    color: #ffaa00;
}

.atomic-btn {
    background: linear-gradient(135deg, #ff6600, #cc3300);
    font-size: 1rem;
    padding: 12px 25px;
}

.atomic-btn:hover {
    box-shadow: 0 0 20px rgba(255, 100, 0, 0.7);
}

/* City info extras */
.city-forces {
    font-size: 0.85rem;
    opacity: 0.8;
    color: #e74c3c;
}

.city-recommended {
    font-size: 0.85rem;
    opacity: 0.8;
    color: #2ecc71;
}

/* City divider */
.city-divider {
    text-align: center;
    padding: 15px 0;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    position: relative;
}

.city-divider span {
    background: #1a1a2e;
    padding: 0 15px;
    position: relative;
    z-index: 1;
}

.city-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255,255,255,0.2);
}

/* ==================== LANGUAGE SETTINGS ==================== */

.language-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.language-select {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 10px 15px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    outline: none;
    min-width: 150px;
}

.language-select:focus {
    border-color: #667eea;
}

.language-select option {
    background: #2d3436;
    color: white;
}

/* Flag icons in settings */
.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-label {
    flex: 1;
}

/* ==================== MODAL LARGER ==================== */

.modal.large {
    max-width: 600px;
    min-width: 500px;
}

/* City selection modal title */
#city-selection-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
    color: #f39c12;
}

/* ==================== RESPONSIVE MAP ==================== */

@media (max-width: 768px) {
    #world-map {
        height: 250px;
    }

    .map-marker {
        padding: 5px;
    }

    .marker-flag {
        font-size: 1.3rem;
    }

    .marker-name {
        font-size: 0.6rem;
    }

    .modal.large {
        max-width: 95vw;
        min-width: unset;
    }

    .shop-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .shop-item-info {
        flex-direction: column;
        gap: 10px;
    }

    .shop-buy-controls {
        width: 100%;
        justify-content: center;
    }

    .shop-qty-input {
        width: 60px;
    }

    .buy-btn {
        flex: 1;
    }
}
