:root {
    /* Color Variables */
    --color-1: #0067b6;
    --color-2: #ffe600;
    --color-3: #09de37;
    --color-4: #ff00ff;
    --color-5: #ff7b00;
    --color-6: #0ff0f0;
    --color-empty-island: #d3d3d3;
    --color-occupied-no-match: #a2d1ff;
    --color-inactive-island: #1f1f1f;
    --color-multiple-matches: #e6194b;
    --color-additional-island: #9900ff;
}

html, body {
    font-family: 'Georgia', Times, serif;
    background-color: #f4e7c5; /* Light parchment color */
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 500px;
}

main{
    flex: 1;
}

#container {
    width: auto;
    margin: 0 15px;
    /* flex: 1; */
}

h1, h2 {
    color: #604020; /* Dark brown for headings */
    text-align: center;
}

#searchType {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 0px;
}

#searchType label {
    display: inline-block;
    font-size: 18px;
}

.select-menus{
    text-align: center; 
    margin-top: 0px;
}

.search-inputs{
    text-align: center;
    margin-top: 0px;
}

/* Container for Map and Table */
#legend-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

#game-map {
    border: 1px solid #ccc;
    background-color: #f7e9cd;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.grid-line {
    stroke: #ecf0f1; /* Subtle sandy color */
}

.grid-cell {
    fill: #6699cc; /* Muted blue */
    transition: fill 0.3s;
}

.grid-cell.yellow {
    fill: var(--color-occupied-no-match);
}

.grid-cell.red {
    fill: var(--color-multiple-matches);
}

.grid-cell:hover {
    stroke: #2980b9;
    stroke-width: 1;
}

/* Axis Labels */
.axis-label {
    font-size: 12px;
    fill: #7f8c8d;
}

.tooltip {
    position: absolute;
    background-color: rgba(51, 34, 17, 0.9); /* Dark brown */
    color: #f4e7c5;
    border-radius: 4px;
    padding: 10px;
    pointer-events: none; /* Makes sure it doesn't interfere with cursor actions */
    display: none; /* Hide by default */
    font-size: 12px;
    max-width: 250px;
    z-index: 20;
}


button {
    background-color: #b68b59; /* Clay color */
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #8b5e3b;
}

.control-button{
    margin: 1%;
    text-align: center;
}

/* Table Styles */
.player-container {
    margin-bottom: 20px;
}

.alliance-name{
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    background-color: #f2f2f2;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 5px;
    width: 600px; /* Set fixed width */
    text-align: center; /* Center text */
    margin-left: auto; /* Center horizontally */
    margin-right: auto; /* Center horizontally */
    display: block; /* Make it a block element */
    position: relative;
}

.alliance-details{
    display: none;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    max-width: 500px;
    position: relative;
    text-align: center; /* Center text */
    margin-left: auto; /* Center horizontally */
    margin-right: auto; /* Center horizontally */
}
.player-name {
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    background-color: #f2f2f2;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 5px;
    width: 400px; /* Set fixed width */
    text-align: center; /* Center text */
    margin-left: auto; /* Center horizontally */
    margin-right: auto; /* Center horizontally */
    display: block; /* Make it a block element */
    position: relative;
}
.player-name:hover, .alliance-details:hover{
    background-color: #e0e0e0;
}
.player-name::after{
    content: ' ▼';
    font-size: 12px;
    transition: transform 0.3s ease;
}
.player-name.active::after{
    transform: rotate(180deg);
}


.city-details {
    display: none;
    background-color: #f4e7c5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    max-width: 60vw;
    position: relative;
    text-align: center; /* Center text */
    margin-left: auto; /* Center horizontally */
    margin-right: auto; /* Center horizontally */
}
.city-details.active, .alliance-details.active{
    display: block;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
th {
    background-color: #d1b58f; /* Light sandy brown */
}

td {
    background-color: #f5deb3; /* Parchment-like color */
}

/* Responsive Design */
@media (max-width: 768px) {
    #container {
        flex-direction: column;
        align-items: center;
    }

    .player-inputs input[type="text"] {
        width: 100%;
        max-width: 300px;
    }

    table {
        font-size: 10px;
    }
    
    .language-select {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* Map container */
#legend-container {
    position: relative;
    width: 700px; /* Match the width of the map */
    margin: 0 auto;
}

/* Legend styles */
#legend {
    position: absolute;
    background-color: rgba(255, 245, 220, 0.9); /* Semi-transparent sandy color */
    padding: 8px;
    border: 1px solid #b68b59;
    bottom: 10px;
}

#legend h3 {
    margin-top: 0;
    font-size: 14px; /* Smaller heading size */
}

#legend ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

#legend li {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    width: 50%; /* Each item takes up 50% of the container's width */
    box-sizing: border-box;
}


.legend-box {
    width: 15px;
    height: 15px;
    margin-right: 5px;
    display: inline-block;
    border: 1px solid #8b5e3b; /* Soft brown border */
}

/* Base style for islands */
.island-cell {
    cursor: pointer;
    transition: stroke-width 0.3s;
    stroke: #000;         /* Border color */
    stroke-width: 0.1px;  /* Border thickness */
}

/* Empty islands */
.island-cell.empty {
    fill: var(--color-empty-island);
}

.island-cell.inactive {
    fill: var(--color-inactive-island);
}

/* Legend colors matching your map styles */
.legend-box.empty {
    background-color: var(--color-empty-island);
}


/* Islands with players not matching search */
.yellow {
    fill: var(--color-occupied-no-match);
}

.legend-box.yellow {
    background-color: var(--color-occupied-no-match);
}

.legend-box.inactive{
    background-color: var(--color-inactive-island);
}

.legend-box.additional{
    background-color: var(--color-additional-island);
}

.island-cell.additional{
    fill: var(--color-additional-island);
}

/* Islands with exactly one searched player */
.island-cell.blue {
    fill: var(--color-1);
}

.legend-box.blue {
    background-color: var(--color-1);
}


/* Islands with two or more searched players */
.island-cell.red {
    fill: var(--color-multiple-matches);
}

.legend-box.red {
    background-color: var(--color-multiple-matches);
}

.island-cell.first {
    fill: var(--color-1)
}

.legend-box.first {
    background-color: var(--color-1);
}

.island-cell.second {
    fill: var(--color-2)
}

.legend-box.second {
    background-color: var(--color-2);
}

.island-cell.third {
    fill: var(--color-3)
}

.legend-box.third {
    background-color: var(--color-3);
}

.island-cell.fourth {
    fill: var(--color-4)
}

.legend-box.fourth {
    background-color: var(--color-4);
}

.island-cell.fifth {
    fill: var(--color-5)
}

.legend-box.fifth {
    background-color: var(--color-5);
}

.island-cell:hover {
    stroke: #2d3436;
    stroke-width: 1;
    opacity: 0.8; /* Slight transparency on hover */
}

.wonder-image {
    max-width: 24px;
    max-height: 24px;
    width: auto;
    height: auto;
    vertical-align: middle;
}

.tooltip-image {
    max-width: 24px;
    max-height: 24px;
    width: auto;
    height: auto;
    vertical-align: middle;
}

.icon {
    width: 40px;
    max-height: 40px;
    width: auto;
    height: auto;
    vertical-align: middle;
}

.selected-island {
    stroke: #ff0000;
    stroke-width: 2px;
}

.distance-line {
    pointer-events: none; /* So the line doesn't interfere with other interactions */
}

.distance-label {
    pointer-events: none;
    font-weight: bold;
}

.distance-info-header{
    font-size: 20px;
}

/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scrolling if needed */
    background-color: rgba(0, 0, 0, 0.5); /* Black background with opacity */
    backdrop-filter: blur(5px); 
}
  
  /* Modal Content */
  .modal-content {
    background-color: #f4e7c5;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%; /* Larger modal width */
    max-width: 900px; /* Maximum width for larger screens */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    display: flex;
    flex-direction: column;
  }
  
  /* Modal Columns */
  .modal-columns {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
  }

  .modal-header{
    font-size: larger;
    display: flex;
    flex-direction: column; /* Align elements vertically */
    justify-content: center; /* Center vertically */
    align-items: center; /* Center horizontally */
    text-align: center;
  }
  
  /* Modal Column Styles */
  .modal-column {
    flex: 1;
    padding: 10px;
    text-align: left;
  }
  
  /* Center the Distance Column */
  .distance-column {
    text-align: center;
    font-size: 15px;
  }
  
  /* Close Button */
  .close-button {
    margin-top: 20px;
    background-color: #2980b9;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
  }
  
  .close-button:hover {
    background-color: #1f6391;
  }
  
.suggestions-box {
    position: absolute; /* Make sure it is absolutely positioned */
    z-index: 1000; /* Ensure it appears above other content */
    max-height: 150px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ccc;
    display: none; /* Hidden by default */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.suggestions-box div {
    padding: 8px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.suggestions-box div:hover {
    background-color: #f1f1f1;
}


/* Highlighted suggestion */
.autocomplete-active {
    background-color: #f1f1f1;
    color: #333;
}

/* Navbar Styling */
.navbar {
    display: flex;
    justify-content: space-between; /* Spreads items between the left and right */
    align-items: center;
    background-color: #333;
    padding: 10px;
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    margin: 0 5px;
    transition: background-color 0.3s;
}

.navbar a:hover {
    background-color: #555;
}

.navbar a.active {
    background-color: #1e90ff;
    font-weight: bold;
}

/* Language Selection Styling */
.language-select {
    margin-left: auto; /* This moves the language selection to the right */
}

.language-select select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
}

input[type="text"], select {
    padding: 10px;
    width: 120px;
    margin: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.canvasContainer {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%; /* Ensures it doesn’t exceed the screen width */
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.canvas {
    width: 100%;
    max-width: 1000px;
}

.footer {
    background-color: #333; /* Dark background */
    color: #fff; /* White text */
    text-align: center; /* Center the text */
    padding: 20px 0; /* Padding for space inside the footer */
    position: inherit;
    bottom: 0;
    width: 100%;
    font-size: 14px;
    margin-top: auto;
}

.footer a {
    color: #f1c40f; /* Link color */
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .footer {
        font-size: 12px;
        padding: 15px 0;
    }

    input[type="number"] {
        width: 80%; /* Adjust width on smaller screens */
    }
}

/* Base styles for the number input */
input[type="number"] {
    width: 150px; /* Adjust the width as needed */
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    color: #333; /* Text color */
    background-color: #f9f9f9; /* Light background */
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

/* Focused state styles */
input[type="number"]:focus {
    border-color: #2980b9; /* Blue border color */
    box-shadow: 0 0 5px rgba(41, 128, 185, 0.3); /* Blue shadow */
}

/* Hover state styles */
input[type="number"]:hover {
    border-color: #3498db; /* Slightly lighter blue on hover */
}

/* Styles to hide the default number input arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Placeholder color */
input[type="number"]::placeholder {
    color: #999; /* Light gray placeholder text */
}

.island-cell.searched {
    stroke: red;
    /*stroke-width: 2;*/
    background-color: red;
    fill: red;
    fill-opacity: 0.6; /* Adjust as needed for highlighting */
}

.battle-simulator {
    max-width: 900px;
    margin: auto;
    font-family: 'Segoe UI', sans-serif;
    background-color: #fdf5e6;
    padding: 20px;
    border-radius: 12px;
  }
  
  .unit-section h2,
  .maintenance-section h2 {
    text-align: center;
    margin-bottom: 10px;
  }
  
  .unit-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
  
  .unit-card {
    background: #fffaf0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    text-align: center;
    width: 80px;
  }
  
  .unit-card img {
    max-width: 100%;
    height: 40px;
  }
  
  .unit-card input {
    width: 100%;
    margin-top: 5px;
    text-align: center;
  }
  
  .general-points {
    font-size: 12px;
    color: #555;
    margin-top: 4px;
  }
  
  .maintenance-section {
    margin-top: 30px;
  }
  
  .time-inputs label,
  .checkboxes label {
    display: block;
    margin: 6px 0;
  }
  
  .resource-summary {
    display: flex;
    gap: 12px;
    margin-top: 15px;
  }
  
  .resource-summary img {
    width: 20px;
    vertical-align: middle;
    margin-right: 4px;
  }
  
  .form-group {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #5e3300
}

.form-group input{
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #acc;
    width: 250px;
    text-align: center;
}

#paypal-button-container{
    margin-top: 30px;
    margin-bottom: 40px;
}

.paypal-container{
    display: flex;
    flex-direction: column;
    align-items: center;
    
}

.unit-list{
    display: flex;
    gap: 10px;
    padding: 10px;
    flex-direction:row;
    flex-wrap: wrap;
    justify-content: center;
}

.unit-table{
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
}

.unit-icon{
    max-width: 50px;
    height: auto;
    margin: auto;
    padding: 2px;
}

.unit-amount{
    margin-top: 4px;
    max-width: 50px;
    padding: 2px;
    margin: 2px;
    text-align: center;
    font-size: 15px;
}

.handle-buttons{
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
    justify-content: center;
}

.header-row{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.header-row h2{
    margin: 0;
}

.forge-checkbox{
    display: flex;
    align-items: center;
    gap: 5px;
}

.battlefield-grid {
  display: grid;
  grid-template-areas:
    "airSupport     thirdRow     bomb"
    ".            secondRow    ."
    "flankLeft    firstRow     flankRight";
  grid-template-columns: 1fr 3fr 1fr;
  gap: 10px;
  max-width: 1000px;
  margin: auto;
  background-size: cover;
  padding: 20px;
  border: 2px solid #888;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  background-color: rgba(255, 255, 255, 0.1);
}


.section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  min-height: 48px;
}

/* Assign grid areas */
.section[data-section="airSupport"] {
  grid-area: airSupport;
}
.section[data-section="bomb"] {
  grid-area: bomb;
}
.section[data-section="thirdRow"] {
  grid-area: thirdRow;
}
.section[data-section="secondRow"] {
  grid-area: secondRow;
}
.section[data-section="firstRow"] {
  grid-area: firstRow;
}
.section[data-section="flankLeft"] {
  grid-area: flankLeft;
  justify-content: flex-end;
}
.section[data-section="flankRight"] {
  grid-area: flankRight;
  justify-content: flex-start;
}


.slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 48px;
  height: 64px; /* Slightly taller to fit label */
  background-color: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.3);
  position: relative;
  font-size: 11px;
  text-align: center;
}

.slot-wrapper {
  position: relative;
  width: 48px;
  height: 48px;
}

.slot img {
  width: 100%;
  height: 100%;
  display: block;
}

.health-bar-background{
    position: absolute;
    right: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    border-left: 1px solid rgba(0, 0, 0, 0.3);
}

.health-bar {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to top, green, limegreen);
    border-left: 1px solid rgba(0, 0, 0, 0.3);
}

.battlefield-grid .slot-label {
  margin-top: 2px;
  line-height: 1;
  font-weight: bold;
  color: #333;
  text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
}

.slot-tooltip {
  position: absolute;
  z-index: 9999; /* Make sure it's above modal */
  background: #fff8cc;
  border: 1px solid #b98e3b;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 4px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
}

.round-header{
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: bold;
}

.invalid-input {
  border: 1px solid red;
  background-color: #ffecec;
}

.mirrored {
  transform: scaleY(-1);
  /* transform: scaleX(-1); */
}

.mirrored .slot img, .mirrored .slot .slot-label {
  transform: scaleY(-1);
}

.round-wrapper {
  margin-bottom: 40px;
  text-align: center;
}

.battle-label {
  font-weight: bold;
  margin-top: 10px;
}

.version-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tooltip-wrapper {
  position: relative;
}

.tooltip-icon {
  cursor: pointer;
  font-weight: bold;
  margin-left: 8px;
  border-radius: 50%;
  background: #eee;
  padding: 3px 7px;
  font-size: 0.9em;
  display: inline-block;
  text-align: center;
  color: #333;
  border: 1px solid #aaa;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.version-select{
    width: auto;
}

.tooltip-table {
  display: none;
  position: absolute;
  top: 120%;
  left: 0;
  background: white;
  border: 1px solid #ccc;
  padding: 10px;
  z-index: 10;
}

.tooltip-help {
  display: none;
  position: absolute;
  top: 120%;
  left: 0;
  background: white;
  border: 1px solid #ccc;
  padding: 10px;
  z-index: 10;
  min-width: 200px;
}

.tooltip-wrapper:hover .tooltip-table {
  display: block;
}

.tooltip-wrapper:hover .tooltip-help {
  display: block;
}


.tooltip-table table {
  border-collapse: collapse;
  font-size: 0.9em;
}

.tooltip-table th,
.tooltip-table td {
  border: 1px solid #ccc;
  padding: 4px 8px;
  text-align: center;
}

.health-lost{
    text-align: start;
}

.card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    /* border: 1px solid #ccc; */
    border-radius: 8px;
    padding: 16px;
    margin: 10px auto;
    justify-content: center;
    align-items: center;
    max-width: 400px; /* Optional: restrict width */
    text-align: center;
}

.row {
    display: flex;
    flex-direction: column; /* Stack label and input */
    align-items: center;
    margin: 10px 0;
    width: 100%;
}

.row input {
    width: 80%; /* Or 100% with max-width */
    padding: 8px;
    margin-top: 5px;
}

/* ===== Account page scope ===== */
.account-page .hidden{display:none!important;}
.account-page .muted{color:#6b5c48;}

.account-page .account-wrap{max-width:760px;margin:24px auto 64px;padding:0 12px;}

.account-page .account-card{background:#fffaf0;border:1px solid #e6d7b8;}
.account-page .benefits-card{background:#fffaf0;border:1px solid #e6d7b8;}

.account-page .account-header{
  display:flex;flex-direction:column;align-items:center;gap:8px;
}

.account-page .avatar{
  width:56px;height:56px;border-radius:50%;border:1px solid #ddd;object-fit:cover;background:#eee;margin-top:6px;
}

.account-page .account-name{margin:0;color:#604020;}

.account-page .badge{
  padding:6px 10px;border-radius:999px;font-weight:700;font-size:.9rem;border:1px solid #e6d7b8;background:#fff;
}
.account-page .badge-free{background:#fff5e6;color:#8b5e3b;border-color:#f0dfc0;}
.account-page .badge-pro{background:#eaf7ee;color:#0d6a2f;border-color:#bfe9cc;}

.account-page .thin{border:none;height:1px;background:#eadbc0;margin:14px 0;}
.account-page .section-title{margin:0 0 6px;color:#604020;}
.account-page .sub-section{text-align:center;}

.account-page .btn-row{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;padding-bottom:5px;}

/* Ghost/link variants need higher specificity to beat global `button{…}` */
.account-page .btn-ghost{
  background:transparent;color:#333;border:1px solid #ddd;
}
.account-page .btn-ghost:hover{background:#f2e6ce;}
.account-page .btn-link{
  background:transparent;border:none;color:#0067b6;padding-left:0;
}
.account-page .btn-link:hover{text-decoration:underline;}

/* Status dots */
.account-page .dot{display:inline-block;width:10px;height:10px;border-radius:50%;vertical-align:middle;}
.account-page .dot-red{background:#e11d48;}
.account-page .dot-green{background:#09de37;}

/* Benefits list */
.account-page .benefits{list-style:none;padding:0;margin:6px 0 0;}
.account-page .benefits li{
  display:flex;align-items:flex-start;gap:8px;
  padding:8px 10px;margin:6px 0;background:#fdf3d9;border:1px solid #eadbc0;border-radius:8px;
}
.account-page .benefits li::before{content:'✔';color:var(--color-3);font-weight:700;margin-right:4px;}

/* Error banner */
.account-page .account-alert{
  background:#fde2e2;border:1px solid #f7b4b4;color:#7f1d1d;
  padding:10px 12px;border-radius:8px;margin:0 0 12px;
}

/* Modal from policy/terms (already unique class names; keep but scope overlay/dialog) */
.account-page .modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.35);display:grid;place-items:center;z-index:1000;}
.account-page .modal-dialog{background:#fffaf0;border:1px solid #e6d7b8;border-radius:14px;box-shadow:0 10px 40px rgba(0,0,0,.25);max-width:820px;width:min(92vw,820px);max-height:85vh;overflow:auto;padding:18px 18px 8px;}
.account-page .modal-content{color:#2b2114;line-height:1.55;}
.account-page .modal-content h2{margin:6px 0 10px;}
.account-page .modal-content h3{margin:14px 0 6px;}
.account-page .modal-content p,.account-page .modal-content li{font-size:.98rem;}
.account-page .modal-content ul{margin:6px 0 10px 18px;}
.account-page .modal-close{position:sticky;top:0;left:100%;transform:translate(0,-8px);border:1px solid #e6d7b8;background:#f2e6ce;color:#333;width:28px;height:28px;border-radius:8px;font-weight:700;line-height:24px;cursor:pointer;}
.account-page .modal-close:hover{background:#e8dabd;}
body.modal-open{overflow:hidden;} /* ok global */
/* Make sure hidden overlays are actually hidden */
.modal-overlay[hidden] { display: none !important; }

#searchFields{
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

/* Panel shell */
.ika-panel {
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    color: #3b2a1a;

    background: #f6e9c8;
    border: 1px solid #b58b55;
    border-radius: 2px;

    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);

    margin: 0 10%;
}

.ika-panel-header {
    padding: 5px 8px;
    font-weight: bold;

    background: linear-gradient(#f7d79a, #e8b86c);
    border-bottom: 1px solid #b58b55;

    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.ika-panel-body {
    padding: 8px;
}

/* Base table */
.ika-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;

    background: rgba(255, 255, 255, 0.22);
    border: 1px solid #c7a06c;
}

.ika-table th {
    padding: 6px 8px;
    font-weight: bold;
    color: #3b2a1a;

    background: linear-gradient(#f4d7a7, #e9c98f);
    border-bottom: 1px solid #c7a06c;
}

.ika-table td {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(181, 139, 85, 0.35);

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ika-table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.16);
}

.ika-table tr:hover td {
    background: rgba(255, 230, 160, 0.55);
}

/* Align helpers */
.is-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Clickable rows */
.ika-row-click {
    cursor: pointer;
    user-select: none;
    text-align: center;
    background: rgba(255, 255, 255, 0.22);
    justify-content: center;
}

.ika-row-click:active td {
    background: rgba(240, 201, 126, 0.35);
}

/* Expand/collapse arrow */
.ika-arrow {
    display: inline-block;
    width: 14px;
    text-align: center;
    margin-right: 4px;
    color: #6b4b2b;
}

.ika-open .ika-arrow {
    transform: rotate(90deg);
}

/* Nested content row container */
.ika-nested-cell {
    padding: 6px !important;
    background: rgba(255, 255, 255, 0.12);
}

.ika-nested {
    border: 1px solid rgba(181, 139, 85, 0.55);
    background: rgba(255, 255, 255, 0.18);
    /* max-height: 260px;
    overflow: auto; */
}

.ika-nested::-webkit-scrollbar,
.ika-member + div::-webkit-scrollbar {
    width: 8px;
}

.ika-nested::-webkit-scrollbar-thumb,
.ika-member + div::-webkit-scrollbar-thumb {
    background: #c7a06c;
    border: 1px solid #a77a45;
}

.ika-nested::-webkit-scrollbar-track,
.ika-member + div::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.3);
}


/* Member list styling */
.ika-member {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 4px 6px;
    border-bottom: 1px solid rgba(181, 139, 85, 0.28);

    cursor: pointer;
}

.ika-member:hover {
    background: rgba(255, 230, 160, 0.55);
}

.ika-member-name {
    font-weight: bold;
    font-size: 15px;
}

.ika-badge {
    display: inline-block;
    padding: 1px 6px;

    border: 1px solid rgba(167, 122, 69, 0.8);
    border-radius: 10px;

    background: linear-gradient(#fdebc9, #f0c97e);
    color: #3b2a1a;

    font-size: 11px;
    font-weight: bold;
}

/* Cities mini-table tweaks */
.ika-cities-table td, .ika-cities-table th {
    padding: 3px 5px;
}

.ika-muted {
    color: #6b4b2b;
    opacity: 0.9;
}

.ika-alliance-tag {
    font-size: 20px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
.footer-dot {
    margin: 0 6px;
    opacity: 0.6;
}

.footer-api-status {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.api-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2);
}

.api-status-dot[data-status="ok"] {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.api-status-dot[data-status="degraded"] {
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

.api-status-dot[data-status="down"] {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
}

.ika-confirm {
    position: fixed;
    z-index: 999999;

    width: 220px;
    background: #f6e9c8;
    border: 1px solid #b58b55;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
    border-radius: 3px;
    overflow: hidden;

    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    color: #3b2a1a;
}

.ika-confirm-header {
    padding: 6px 8px;
    font-weight: bold;
    background: linear-gradient(#f7d79a, #e8b86c);
    border-bottom: 1px solid #b58b55;
}

.ika-confirm-body {
    padding: 8px;
}

.ika-confirm-text {
    margin-bottom: 8px;
}

.ika-confirm-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.ika-btn {
    border: 1px solid #a77a45;
    border-radius: 2px;
    background: linear-gradient(#fdebc9, #f0c97e);
    color: #3b2a1a;
    padding: 3px 8px;
    cursor: pointer;
    font-weight: bold;
}

.ika-btn:hover {
    background: linear-gradient(#fff2d6, #f4d28e);
}
