.ti-color-red {
    background-color: #e61717 !important; /* deep red */
    color: white !important;
}

.ti-color-blue {
    background-color: #0759b8 !important; /* bold blue */
    color: white !important;
}

.ti-color-green {
    background-color: #2e7d32 !important; /* rich green */
    color: white !important;
}

.ti-color-purple {
    background-color: #720ab3 !important; /* TI-style purple */
    color: white !important;
}

.ti-color-yellow {
    background-color: #eeee0e !important; /* golden yellow */
    color: black !important;
}

.ti-color-black {
    background-color: #212121 !important; /* near black */
    color: white !important;
}

.ti-color-orange {
    background-color: #ff8902 !important; /* bright orange */
    color: black !important;
}

.ti-color-pink {
    background-color: #f6079e !important; /* magenta/pink */
    color: white !important;
}

.ti-color-chooser:hover {
    position: relative;
}

.ti-color-unpicked {
    background-color: #f0f0f0; /* light base */
    background-image: repeating-linear-gradient(
      45deg,
      #d0d0d0 0,
      #d0d0d0 8px,
      #f0f0f0 8px,
      #f0f0f0 16px
    ); }
  


.crosshatch {
    background-color: #f0f0f0; /* light base */
    background-image: repeating-linear-gradient(
      45deg,
      #d0d0d0 0,
      #d0d0d0 4px,
      #f0f0f0 4px,
      #f0f0f0 8px
    );
    /*color: #555;
    font-style: italic;*/
}

#new_game_setup {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px; /* nice spacing between sections */
    align-items: center;
}

.form-section {
    width: 100%;
    text-align: center;
}

.form-section label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 14px;
}

.new_game_text {
    width: 80%;
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    outline: none;
}

@keyframes flash {
    0%   { border-color: red; background-color: #ffaaaa; }
    50%  { border-color: transparent; background-color: transparent; }
    100% { border-color: red; background-color: #ffaaaa; }
}

.new_game_text.flash {
    animation: flash 1s ease-in-out infinite;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* 👈 align to left inside container */
    gap: 8px;
    margin: 0 auto; /* center the group block itself */
    width: 80%; /* keep it looking neat */}

.checkbox-group label {
    font-size: 13px;
    font-weight: normal;
}

.newgame-button {
    font-family: 'Orbitron', sans-serif;
    background-color: var(--primary-color, #4CAF50); /* fallback green if no var */
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    text-align: center;
    transition: background-color 0.3s;
    
    display: block;        /* allow centering */
    margin: 20px auto;     /* center horizontally + some spacing */
}

.newgame-button:hover {
    background-color: var(--primary-color-hover, #45a049);
}

.newgame-button:active {
    transform: scale(0.98);
    background-color: var(--primary-color-active, #42be47); /* even darker when clicked */
}

.game_ident {
    background-color: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 8px;
    padding: 6px;
    margin: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.game_ident > div {
    margin: 2px 0;
    text-align: center;
    word-break: break-word;
}

#game_uuid {
    font-family: monospace;
    font-size: 12px;
    color: #666666;
}

#game_name {
    font-weight: bold;
    font-size: 16px;
    color: #222222;
}

#game_date {
    font-size: 13px;
    color: #555555;
}

#game_options {
    font-size: 13px;
    color: #333333;
    font-style: italic;
    margin-top: 2px;
}

#close_game_button {
    margin-top: 8px;
    background-color: var(--primary-color, #4CAF50);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

#close_game_button:hover {
    background-color: var(--primary-color-hover, #45a049);
}


/*
 * Player cards
 
  1) Pre-Position choice
  2) Entering name with confirm button
  3) Position selected - name shown
  4) Faction choices (other player)
  5) Faction choices (self)
  6) Faction selected - name shown
 */
.player-card {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border: 2px solid #cccccc;
    border-radius: 8px;
    margin: 8px 0;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    font-family: sans-serif;
    cursor: pointer;
    user-select: none; 
}

/* 1. Pre-position choice (unclaimed) */
.player-card.unclaimed {
    background: #f5f5f5;
    color: #888;
    border-style: dashed;
    text-align: center;
    justify-content: center;
    font-style: italic;
}

/* 2. Entering name */
.player-card.entering {
    background: #fffce0;
    border-color: #e0c200;
}

.player-card.entering input {
    font-size: 14px;
    padding: 4px;
    margin-right: 6px;
}

.player-card.entering button {
    font-size: 12px;
    padding: 4px 8px;
}

/* 3. Position selected, name shown */
.player-card.assigned {
    background: #ffffff;
    border-color: #a0c4ff;
}

/* 4. Faction choices (viewing other player) */
.player-card.choices-other {
    background: #f4f4f4;
    border-color: #cccccc;
    opacity: 0.8;
}

/* 5. Faction choices (your own card) */
.player-card.choices-self {
    background: #e0f7ff;
    border-color: #0099cc;
    box-shadow: 0 0 6px rgba(0, 153, 204, 0.5);
}

.player-card.choices-self .faction-choices div.item-list div:hover {
    background: #d0fff0;
    border-color: #00aa77;
    box-shadow: 0 0 8px rgba(0, 170, 119, 0.5);
}

/* 6. Faction locked-in */
.player-card.locked-in {
    background: #d1f0d1;
    border-color: #22aa22;
    font-weight: bold;
    box-shadow: 0 0 8px rgba(34, 170, 34, 0.5);
}

.player-card.locked-in {
    animation: glow-lock 1.5s ease-out;
}

@keyframes glow-lock {
    0% { box-shadow: 0 0 0 rgba(0, 255, 0, 0.0); }
    50% { box-shadow: 0 0 12px rgba(0, 255, 0, 0.4); }
    100% { box-shadow: 0 0 6px rgba(0, 255, 0, 0.2); }
}

.player-card:hover {
    border: 2px solid #333333;
}

.player-tag {
    background-color: #eef0f3;
    color: #333333;
    font-weight: bold;
    font-size: 14px;
    padding: 12px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px; /* Slimmer now */
    text-align: center;
    border-right: 2px solid #cccccc;
}

.player-info {
    position: relative;
    padding: 10px 15px;
    flex-grow: 1;
}

.player-organizer {
    position: absolute;
    font-size: 12px;
    top: 0px;
    right: 5px;
}
.player-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 6px;
}

.player-card-button-list {
    margin-top: 5px;
}

.player-card-button {
    display: inline-block;
    padding: 2px 8px;
    margin-right: 5px;
    background: #ccc;
    border: 1px solid #555;
    color: #000;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.player-card-button.right {
    float: right;
}

.player-card-button.right {
  content: "";
  display: table;
  clear: both;
}

.player-card-button:hover {
    background: #888;
}


.faction-choices div {
    font-size: 12px;
    margin: 2px 0;
}

.faction-chosen {
    font-size: 14px;
    font-style: italic;
    margin: 2px 0;
    padding: 10px;
}

.faction-proposed {
    font-size: 14px;
    font-style: italic;
    margin: 2px 0;
    padding: 20px;
}

.faction-proposed-after {
    color: #d31515;
    padding-bottom: 10px;
}


.list-container {
    position: relative;
    width: 100%;
    display: inline-block;
  }
  

.overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-10deg);
    font-size: 48px !important;
    font-weight: bold;
    color: rgba(100, 100, 100, 0.5);
    pointer-events: none; /* so clicks pass through */
    z-index: 10;
    white-space: nowrap;
  }
  

.past_game_hdr {
    background: #f0f0f0;
    color: #333333;
    font-weight: bold;
    font-size: 16px;
    padding: 10px;
    border-bottom: 2px solid #cccccc;
}

.past_game {
    cursor: pointer;
    user-select: none;
    background: #f9f9f9;
    border: 1px solid #dddddd;
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
}

.past_game:hover {
    background: #f0f0f0;
}

.player-name-input {
    font-size: 14px;
    font-weight: bold;
    padding: 4px;
    width: 100%;
    box-sizing: border-box;
}

.player-name-input:focus {
    outline: none;
    border: 2px solid #2196f3;
    box-shadow: 0 0 5px rgba(33, 150, 243, 0.2);
}

/*
* Game setup checklist
*/
.checklist {
    position: relative;
    margin: 20px 0;
    padding-left: 40px;
}

.checklist::before {
    content: "";
    position: absolute;
    left: 48px; /* adjust based on circle size + padding */
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #ccc;
    z-index: 0;
}

.step {
    position: relative;
    margin: 10px 0;
    display: flex;
    align-items: center;
}

.circle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #ccc;
    border: 2px solid white;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.step.completed .circle {
    background-color: #4caf50;
}

.step.active .circle {
    background-color: #2196f3;
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.2);
}

.step.active .label_hdr {
    font-weight: bold;
}

.connector {
    flex-shrink: 0;
    width: 16px;
    height: 2px;
    background-color: #ccc;
    margin: 0 8px;
}

.label {
    align-items: center;
    font-size: 14px;
}

.copy_game_url {
    font-size: 12px;
    padding: 4px 8px;
    margin-top: 5px;
    min-width: 100px;
    display: inline-block;
    text-align: center;
    color: #000;
    background: none;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.copy_game_url:hover {
    color: #444;
    border-color: #888;
    background-color: #ddd;
}

.copy_game_url:active {
    transform: scale(0.98);
    opacity: 0.8;
}

.copy_game_url.copied::after {
    content: " ✓";
    color: #6f6;
    font-weight: normal;
}

/*
 * Map approval and voting
 */
.map_controls {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    margin-top: 8px;
}

.map_button {
    padding: 4px 8px;
    background: none;
    border: 1px solid #555;
    color: #000;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.map_button_action {
    width: 75px;
}

.map_button_asgn {
    width: fit-content;
}

.map_button div {
    display: flex;
    align-items: center;
    justify-content: center;
}

.map_button:hover {
    background-color: #ddd;
    color: #444;
    border-color: #888;
}

.map_button:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.map_button.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.map_button.chosen_red {
    border: 1px solid red;
    box-shadow: 0 0 0 4px rgba(243, 33, 33, 0.2);
}

.map_button.chosen_green {
    border: 1px solid green;
    box-shadow: 0 0 0 4px rgba(33, 243, 33, 0.2);
}

.vote_count {
    min-width: 16px;
    text-align: center;
    color: #aaa;
}

/***********************************/


.ti-color-chooser:hover::before {
    content: "🎨";
    position: absolute;
    left: 0px;
    top: 0px;
    transform: translate(0px,0px);
    font-size: 1em;
}

.player-slot {
    position: relative;
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
  }
  
  .color-picker {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(3, 40px);
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
  }
  
  .color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    font-family: sans-serif;
    justify-content: center;
    display: flex;
    align-items: center;
  }
  
  .color-option.claimed {
    cursor: not-allowed;
  }
  
  .hidden {
    display: none;
  }
  