body {
    margin: 0;
    padding: 0;
    background-color: #222;
    color: #eee;
    font-family: 'Courier New', monospace; /* Retro-style font */
    overflow: hidden;
    background-image: url('https://images.unsplash.com/photo-1506318137071-a8e063b4bec0?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
}

.game-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    position: relative;
}

canvas {
    background: #000;
    display: block;
    flex-grow: 1;
}

.game-ui {
    background-color: rgba(51, 51, 51, 0.9);
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.power-bar-container {
    width: 200px;
    height: 20px;
    background-color: #444;
    border: 2px solid #666;
}

.power-bar {
    height: 100%;
    width: 0%;
    background-color: #f00;
    transition: width 0.1s;
}

.weapons {
    display: flex;
    gap: 10px;
}

.weapon-btn {
    background-color: #555;
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: transform 0.1s, background-color 0.2s;
}

.weapon-btn:hover {
    background-color: #777;
    transform: scale(1.05);
}

.weapon-btn.active {
    background-color: #777;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.turn-info {
    font-weight: bold;
    font-size: 18px;
    color: #ffcc00;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.info {
    font-size: 12px;
    text-align: right;
    color: #aaa;
}

/* Menu Screens */
.menu-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    color: #fff;
    display: none; /* Hide by default */
}

.menu-screen h1 {
    font-size: 50px;
    text-shadow: 0 0 10px #ff6600, 0 0 20px #ff6600;
    margin-bottom: 30px;
    letter-spacing: 5px;
}

.menu-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.menu-screen button {
    background-color: #ff6600;
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    font-family: 'Courier New', monospace;
    min-width: 200px;
}

.menu-screen button:hover {
    background-color: #ff8c44;
    transform: scale(1.05);
}

.tribe-selector {
    margin: 10px 0;
}

.tribe-options {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.tribe-btn {
    background-color: #333;
    color: #fff;
    border: 2px solid #555;
    padding: 5px 10px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: all 0.2s;
    border-radius: 4px;
}

.tribe-btn:hover {
    background-color: #444;
    transform: scale(1.05);
}

.tribe-btn.selected {
    background-color: #ff6600;
    border-color: #ff8800;
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.7);
    transform: scale(1.1);
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

/* Add this cool pulsing effect */
.tribe-btn.selected::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(30deg);
    animation: selectedPulse 3s linear infinite;
    pointer-events: none;
}

/* Make it pulse with this animation */
@keyframes selectedPulse {
    0% { transform: rotate(30deg) translateX(-100%); }
    100% { transform: rotate(30deg) translateX(100%); }
}

.player-setup {
    display: flex;
    gap: 40px;
    margin-top: 20px;
}

.team-avatar {
    position: absolute;
    width: 512px;
    height: 720px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.8;
    transition: all 0.3s ease;
    pointer-events: none; /* So clicks pass through to buttons behind */
    z-index: 0;
}

.blue-avatar {
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
}

.red-avatar {
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
}

/* Tribe info panel styles */
.tribe-info-panel {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.85);
    border: 2px solid #ff6600;
    padding: 15px;
    border-radius: 8px;
    color: white;
    font-family: 'Courier New', monospace;
    max-width: 250px;
    z-index: 100;
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.5);
}

.tribe-info-panel h3 {
    margin-top: 0;
    color: #ffcc00;
    text-align: center;
    margin-bottom: 10px;
}

.tribe-info-panel p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

/* Small avatar icons for the in-game UI */
.racoon-avatar-small {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
    border: 2px solid white;
}

/* Tribe-specific small avatar borders - simple color coding */
.racoon-avatar-small[data-tribe="forest"] {
    border-color: #3e8d41;
}

.racoon-avatar-small[data-tribe="mountain"] {
    border-color: #8d6e63;
}

.racoon-avatar-small[data-tribe="river"] {
    border-color: #29b6f6;
}

.racoon-avatar-small[data-tribe="night"] {
    border-color: #9c27b0;
}

/* Avatar list for game over screen */
.avatar-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.avatar-card {
    background-color: rgba(51, 51, 51, 0.7);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    width: 150px;
}

.avatar-image {
    width: 100px;
    height: 100px;
    background-size: cover;
    background-position: center bottom;
    border-radius: 50%;
    margin: 0 auto 10px;
    border: 3px solid white;
}

.avatar-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.avatar-score {
    color: #ffcc00;
}

/* Make team setup have higher z-index to appear in front of avatars */
.team-setup {
    position: relative;
    z-index: 1;
    background-color: rgba(51, 51, 51, 0.8); /* Slightly more opaque background */
    padding: 20px;
    border-radius: 10px;
    min-width: 250px;
}


.team-setup h3 {
    margin-top: 0;
    text-align: center;
    color: #ffcc00;
}

.player-names {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

input[type="text"] {
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid #666;
    padding: 8px;
    color: #fff;
    font-family: 'Courier New', monospace;
    width: 100%;
}

.controls-info {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}

.control-group {
    background-color: rgba(51, 51, 51, 0.7);
    padding: 15px;
    border-radius: 5px;
    min-width: 200px;
}

.control-group h3 {
    margin-top: 0;
    color: #ffcc00;
    text-align: center;
}

.control-group p {
    margin: 10px 0;
}

/* Weather effects */
.rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    opacity: 0.7;
    display: none;
}

.snow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    opacity: 0.7;
    display: none;
}

.weather-indicator {
    position: absolute;
    top: 80px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    font-size: 14px;
    pointer-events: none;
}

.weather-icon {
    margin-right: 10px;
    font-size: 20px;
}

/* Scoreboard */
.scoreboard {
    position: absolute;
    top: 100px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    max-width: 200px;
    display: none;
}

.scoreboard h3 {
    margin-top: 0;
    text-align: center;
    font-size: 16px;
    margin-bottom: 10px;
}

.team-score {
    margin-bottom: 8px;
}

.team-name {
    font-weight: bold;
}

/* Special effects */
.flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    opacity: 0;
    pointer-events: none;
    z-index: 9;
}

/* Notification system */
.notification {
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 8;
    text-align: center;
    pointer-events: none;
}

/* Make sure buttons work on mobile too */
@media (max-width: 768px) {
    .game-ui {
        flex-direction: column;
        gap: 10px;
    }
    
    .weapons {
        justify-content: center;
    }
    
    .info {
        text-align: center;
    }
    
    .player-setup {
        flex-direction: column;
    }
    
    .menu-screen h1 {
        font-size: 30px;
    }
}

.map-settings {
  background-color: rgba(51, 51, 51, 0.7);
  padding: 20px;
  border-radius: 10px;
  margin-top: 20px;
}

.seed-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.small-btn {
  background-color: #ff6600;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
}

/* Audio controls */
.audio-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 100;
}

.audio-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
}

.volume-slider-container {
    width: 80px;
    margin-left: 10px;
}

#volumeSlider {
    width: 100%;
    background: #555;
    cursor: pointer;
}



