:root {
    --body-background: #ffffff;
    --background: #eeeeee;
    --border: #444;
    --ship: #ffb703;
    --ship-thrust: #fb8500;
    --bullets: #fb8500;
    --asteroids-large: #219ebc;
    --asteroids-medium: #126782;
    --asteroids-small: #023047;
    --shield: #00FFFF;
    --shield-glow: rgba(0, 255, 255, 0.5);
    --text: #323232;
    --hud-text: white;
    --debug-text: yellow;
    --game-over: #fb8500;
    --button-background: #444;
    --button-text: #fb8500;
    --bonus-gift: #8db600;
    --bonus-text: white;
    --enemy-ship: #3a0ca3;
    
    /* Epic perk card glow effects */
    --epic-glow-color: #FFD700;
    --epic-glow-inner: rgba(255, 215, 0, 0.5);
    --epic-glow-outer: rgba(255, 215, 0, 0.9);
    --epic-glow-border: rgba(255, 215, 0, 0.7);
    --epic-text-color: #FFD700;
    --epic-particle-color: rgba(255, 215, 0, 0.7);
}

body {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--body-background, #fefae0);
    font-family: Arial, sans-serif;
    overflow: hidden;
}

#main-layout-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
}

#left-column,
#right-column {
    width: 200px;
    background-color: var(--background, #faedcd);
    border: 2px solid var(--border, #444);
    align-self: stretch;
    margin: 0 5px;
    box-sizing: border-box;
}

#game-container {
    position: relative;
}

canvas {
    background-color: var(--background, #faedcd);
    border: 2px solid var(--border, #444);
    display: block;
}

.hud-element {
    position: absolute;
    color: var(--hud-text, white);
    font-size: 20px;
}

#score {
    top: 10px;
    left: 10px;
}

#lives {
    top: 10px;
    right: 10px;
}

#game-over-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--button-background, #444);
    opacity: 0.7;
    padding: 30px;
    border-radius: 5px;
    width: 300px;
    height: auto;
    box-sizing: border-box;
    z-index: 100;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#game-over {
    color: var(--game-over, white);
    font-size: 36px;
    text-align: center;
    margin-bottom: 20px;
}

#final-score {
    position: relative;
    top: 58%;
    color: var(--game-over, white);
    font-size: 24px;
    text-align: center;
    width: 100%;
    margin-bottom: 15px;
}

#final-level {
    position: relative;
    top: 66%;
    color: var(--game-over, white);
    font-size: 24px;
    text-align: center;
    width: 100%;
    margin-bottom: 15px;
}

#final-multiplier {
    top: 74%;
}

.game-over-info {
    color: var(--game-over, white);
    font-size: 24px;
    text-align: center;
    display: none;
}

#game-over-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--button-background, #444);
    opacity: 0.7;
    display: none;
}

#restart-button, #start-button, #stats-button, #back-button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: var(--button-background, #444);
    color: var(--button-text, white);
    border: 2px solid var(--button-text, white);
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    display: inline-block;
}

#close-call {
    position: absolute;
    bottom: 10px;
    left: 10px;
    white-space: nowrap;
    min-width: 200px;
}

#close-call.mission-pending {
    color: var(--hud-text, white);
}

#close-call.mission-active {
    color: orange;
    animation: closeCallPulse 1s infinite;
}

#close-call.mission-success {
    color: #2a9d8f;
    animation: none;
}

#close-call.mission-failed {
    color: #d00000;
    animation: none;
}

@keyframes closeCallPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.close-call-dot {
    display: inline-block;
    margin-left: 2px;
    margin-right: 2px;
    position: relative;
    font-size: 16px;
    line-height: 1;
}

.close-call-dot.gray {
    color: #888;
}

.close-call-dot.orange {
    color: orange;
}

.mission-timer {
    margin-left: 8px;
    font-size: 14px;
}

.mission-reward {
    margin-left: 8px;
    color: #ffd700;
    font-size: 14px;
}

#ultimate {
    position: absolute;
    bottom: 10px;
    right: 10px;
    white-space: nowrap;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}

#ultimate.ready {
    color: var(--hud-text);
}

#ultimate.cooldown {
    color: #888888;
}

#level {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

#level-up-message {
    pointer-events: none;
}

#collected-perks-container h2, #stats-list-container h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: var(--border); /* Or your desired title color */
    border-bottom: 2px solid var(--border);
    border-top: 2px solid var(--border);
}

#collected-perks-container h3, #stats-list-container h3 {
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: var(--asteroids-large); /* Or your desired title color */
    border-bottom: 2px solid var(--asteroids-large);
    
}


#collected-perks-list, #stats-list {
    list-style-type: none; /* Remove default bullet points */
    padding: 0;
    margin: 0;
    /* max-height and overflow-y will be set individually */
}

#collected-perks-list {
    max-height: 250px; /* Optional: if the list can get very long */
    overflow-y: auto;  /* Optional: for scrolling if max-height is set */
}

/* #stats-list will not have max-height or overflow-y: auto by default anymore */

#collected-perks-list li, #stats-list li {
    padding: 4px 0; /* Add some spacing between perk names */
    font-size: 0.9em;
    cursor: help; /* Indicate that hovering provides more info */
    /* Color is set by JavaScript based on rarity */
}



/* Styling for the scrollbar if overflow-y is auto and content overflows */
#collected-perks-list::-webkit-scrollbar {
    width: 8px;
}

#collected-perks-list::-webkit-scrollbar-track {
    background: #2c2c2c; /* Darker background for the track */
    border-radius: 4px;
}

#collected-perks-list::-webkit-scrollbar-thumb {
    background-color: #555555; /* Color of the scroll thumb */
    border-radius: 4px;
    border: 2px solid #2c2c2c; /* Creates padding around thumb */
}

#collected-perks-list::-webkit-scrollbar-thumb:hover {
    background-color: #777777; /* Color of the scroll thumb on hover */
}

/* General column content styling (if you want to ensure text is a certain color) */
#left-column-content {
    /* Example: color: var(--hud-text); Ensure text within the column is readable */
    padding-left: 10px; /* Add some padding inside the column */
    padding-right: 10px; /* Add some padding inside the column */
}