
body {
    font-family: 'Leelawadee UI', 'Segoe UI', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #1a1a1a;
    color: #e0e0e0;
}
.calculator {
    display: flex;
    flex-direction: column;
}
.team {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}
.monster {
    background-color: #2d2d2d;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 825px; /* Adjust this value based on your needs */
    width: 100%;
    max-width: 350px; /* Set a consistent width */
    box-sizing: border-box;
    margin: 0 10px; /* Add some spacing between cards */
}
.monster img {
    max-width: 100px;
    height: auto;
}
.monster select {
    width: 100%;
    margin-bottom: 10px;
}

select, input[type="number"] {
    background-color: #363636;
    border: 1px solid #505050;
    color: #e0e0e0;
    padding: 8px;
    border-radius: 4px;
}

.turn-order {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.turn-order label {
    margin: 0 5px;
}

.turn-order input[type="checkbox"] {
    display: none;
}

.turn-order span {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #ddd;
    text-align: center;
    line-height: 30px;
    cursor: pointer;
}

.turn-order input[type="checkbox"]:checked + span {
    background-color: #4CAF50;
    color: white;
}

.swift-checkbox {
    margin-bottom: 10px;
}

.swift-checkbox label {
    display: flex;
    align-items: center;
    justify-content: center;
}

.swift-checkbox input[type="checkbox"] {
    margin-right: 5px;
}

.swift-checker {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.swift-checker label {
    display: flex;
    align-items: center;
    color: #e0e0e0;
    cursor: pointer;
}

.swift-checker input[type="checkbox"] {
    margin-right: 5px;
}
.artifact-speed {
    margin-bottom: 10px;
}

.artifact-speed label {
    display: block;
    margin-bottom: 5px;
}

.artifact-speed input {
    width: 60px;
}
.turn-order-display {
    margin-top: 30px;
}

#turn-order-list {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.turn-order-monster {
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    text-align: center;
}

.turn-order-monster img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-bottom: 5px;
}

.rune-speed {
    height: 45px;
    margin-bottom: 10px;
}

.rune-speed label {
    display: block;
    margin-bottom: 5px;
}

.rune-speed input {
    width: 60px;
}

.atb-boost {
    margin-bottom: 10px;
}

.atb-boost label {
    display: block;
    margin-bottom: 5px;
}

.atb-boost input {
    width: 60px;
}

.monster {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
}

.monster-main-stats {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Fixed height for monster special abilities div */
.monster-special-abilities {
  height: 250px !important; /* Fixed height instead of min-height */
  background-color: #363636;
  border-radius: 6px;
  padding: 15px;
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  position: relative;
}

#friendly1-speedlead-container,
#friendly1-atb-boost-container {
    background: #f5f5f5;
    border-radius: 5px;
    padding: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
    min-height: 40px; /* Ensure consistent height */
}

#friendly2-speedlead-container,
#friendly2-atb-boost-container {
    background: #f5f5f5;
    border-radius: 5px;
    padding: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
    min-height: 40px; /* Ensure consistent height */
}

#friendly3-speedlead-container,
#friendly3-atb-boost-container {
    background: #f5f5f5;
    border-radius: 5px;
    padding: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
    min-height: 40px; /* Ensure consistent height */
}

#friendly4-speedlead-container,
#friendly4-atb-boost-container {
    background: #f5f5f5;
    border-radius: 5px;
    padding: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
    min-height: 40px; /* Ensure consistent height */
}

.monster-image{
    display: block;
    margin: 0 auto;
    height: auto;
}

.monster-image[src*="icons/"] {
    display: block;
    margin: 0 auto;
    height: auto;
}

.speed-warning {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: red;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
}

.combat-speed {
    font-size: 1.2em;
    color: #4CAF50;
    margin: 15px 0 2px 0; /* Reduce bottom margin */
    font-weight: bold;
}

h1 {
    color: #4CAF50;
    text-align: center;
    margin-bottom: 30px;
}

/* Tuning Mode Selector */
.tuning-mode-selector {
    margin: 20px 0 30px 0;
    text-align: center;
}

.tuning-mode-selector h4 {
    color: #e0e0e0;
    margin-bottom: 15px;
}

.mode-options {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.mode-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #e0e0e0;
    font-size: 16px;
    transition: color 0.3s;
}

.mode-option:hover {
    color: #4CAF50;
}

.mode-option input[type="radio"] {
    margin-right: 8px;
    accent-color: #4CAF50;
    transform: scale(1.2);
}

.mode-option span {
    user-select: none;
}

/* Mobile responsiveness for mode selector */
@media (max-width: 768px) {
    .mode-options {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .mode-option {
        font-size: 18px;
    }
}

/* Combat Speed Toggle Global */
.combat-speed-toggle-global {
    text-align: center;
    margin: 0 0 20px 0;
    padding: 10px;
    background-color: #2d2d2d;
    border-radius: 6px;
    border: 1px solid #404040;
}

.combat-speed-toggle-global label {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #e0e0e0;
    font-size: 14px;
    transition: color 0.3s;
}

.combat-speed-toggle-global label:hover {
    color: #4CAF50;
}

.combat-speed-toggle-global input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #4CAF50;
    transform: scale(1.1);
}

.combat-speed-toggle-global span {
    user-select: none;
}

/* Style for the containers inside */
#friendly1-speedlead-container,
#friendly2-speedlead-container,
#friendly3-speedlead-container,
#friendly4-speedlead-container,
#friendly1-atb-boost-container,
#friendly2-atb-boost-container,
#friendly3-atb-boost-container,
#friendly4-atb-boost-container {
  background-color: #363636;
  border-radius: 6px;
  padding: 15px;
  margin-top: 10px;
}

/* When containers are hidden, don't let them affect layout */
#friendly1-speedlead-container[style*="display: none"],
#friendly2-speedlead-container[style*="display: none"],
#friendly3-speedlead-container[style*="display: none"],
#friendly4-speedlead-container[style*="display: none"],
#friendly1-atb-boost-container[style*="display: none"],
#friendly2-atb-boost-container[style*="display: none"],
#friendly3-atb-boost-container[style*="display: none"],
#friendly4-atb-boost-container[style*="display: none"] {
  display: none !important; /* Force display: none */
}

label {
    color: #e0e0e0;
    cursor: pointer;
}

input[type="checkbox"] {
    accent-color: #4CAF50;
}

.exclude-checker {
    margin-bottom: 10px;
}

.exclude-checker label {
    display: flex;
    align-items: center;
    color: #e0e0e0;
    cursor: pointer;
}

.exclude-checker input[type="checkbox"] {
    margin-right: 5px;
}

.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip-icon {
    cursor: pointer;
    color: #00BCD4;
    font-size: 18px;
    padding: 2px 6px;
    display: inline-block;
    margin: 0;
}

.tooltip-text {
    visibility: hidden;
    background-color: #4a4a4a;
    color: #fff;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    width: 200px;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip-text.show {
    visibility: visible !important;
    opacity: 1 !important;
    display: block;
}

.kroa-boost-target {
    background: #363636;
    border-radius: 5px;
    padding: 10px;
    margin-top: 10px;
    text-align: left;
    min-height: 80px; /* Ensure enough space for 3-4 monster options */
}

.kroa-boost-target p {
    margin-bottom: 10px;
    font-weight: bold;
}

.kroa-boost-target label {
    display: inline-block;
    margin: 0 10px;
    cursor: pointer;
    vertical-align: top;
    position: relative;
    z-index: 10;
}

.kroa-boost-target input[type="radio"] {
    margin-right: 5px;
    vertical-align: top;
    text-align: left;
    position: relative;
    z-index: 10;
}

.site-footer {
    margin-top: 50px;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #404040;
    color: #e0e0e0;
}

.footer-credit {
    margin-bottom: 15px;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: #4CAF50;
    text-decoration: none;
    padding: 0 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #81c784;
    text-decoration: underline;
}

.footer-donation {
    max-width: 1000px;
    margin: 0 auto;
    line-height: 1.5;
}

.chilling-explanation {
    font-size: 12px;
    color: #4CAF50;
    font-style: italic;
    margin-top: 5px;
    margin-bottom: 10px;
    display: block;
}

/* Mobile-Friendly Enhancements */
@media (max-width: 768px) {
  .team {
    flex-direction: column;
    gap: 20px;
  }

  .monster {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 10px;
  }

  h1 {
    font-size: 20px;
  }

  input,
  select {
    font-size: 16px;
    min-height: 44px; /* Mobile tap target */
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .monster {
    padding: 10px;
  }

  h1 {
    font-size: 18px;
  }

  .combat-speed {
    font-size: 1em;
    font-weight: bold;
  }
}

/* General improvements */
select,
input,
img,
p {
  max-width: 100%;
  box-sizing: border-box;
  word-break: break-word;
}

/* Disable drag on touch devices (optional) */
@media (hover: none) and (pointer: coarse) {
  .monster {
    cursor: default !important;
  }
}

.action-buttons {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.action-button {
    background-color: #D32F2F; /* Darker red that fits with your dark theme */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.action-button:hover {
    background-color: #F44336; /* Lighter red on hover */
}

select option {
    background-color: #2d2d2d;
    color: #e0e0e0;
    padding: 10px;
}

select option:hover,
select option:focus,
select option:active,
select option:checked {
    background-color: #4CAF50;
    color: white;
}

/* For Firefox */
select:focus > option:checked { 
    background-color: #4CAF50 !important;
    color: white !important;
}

/* For Webkit browsers (Chrome, Safari) */
select::-webkit-scrollbar {
    width: 10px;
}

select::-webkit-scrollbar-track {
    background: #363636;
}

select::-webkit-scrollbar-thumb {
    background: #505050;
    border-radius: 5px;
}

select::-webkit-scrollbar-thumb:hover {
    background: #606060;
}

/* Make hidden containers take up space */
#friendly1-speedlead-container[style*="display: none"],
#friendly2-speedlead-container[style*="display: none"],
#friendly3-speedlead-container[style*="display: none"],
#friendly4-speedlead-container[style*="display: none"],
#friendly1-atb-boost-container[style*="display: none"],
#friendly2-atb-boost-container[style*="display: none"],
#friendly3-atb-boost-container[style*="display: none"],
#friendly4-atb-boost-container[style*="display: none"] {
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

.monster-special-abilities::after {
  content: "";
  flex-grow: 1;
  min-height: 50px; /* Adjust as needed */
}

.monster:not(:first-child) .monster-special-abilities {
    margin-top: 55px; /* Moved up 30px from original 85px to compensate for increased height */
    position: relative;
}

.monster:first-child .swift-checker {
  margin-top: 15px !important; /* Same as other monsters */
}



.monster {
  transition: transform 200ms ease, left 200ms ease, top 200ms ease;
}



/* Styling for draggable cards */
.monster {
    cursor: grab;
    user-select: none;
    transition: transform 0.2s ease-in-out;
}

.monster.dragging {
    opacity: 0.8;
    cursor: grabbing;
}

.team.friendly {
    position: relative;
    display: flex;
    justify-content: space-between;
}





/* Choices.js Dark Theme Styling - More specific selectors */
.choices {
  width: 100%;
  margin-bottom: 10px;
}

/* Main container */
.choices {
  background-color: #363636 !important;
  border: 1px solid #505050 !important;
  color: #e0e0e0 !important;
  border-radius: 4px !important;
  font-family: 'Leelawadee UI', 'Segoe UI', sans-serif !important;
  font-size: 16px !important;
}

/* Inner container */
.choices__inner {
  background-color: #363636 !important;
  color: #e0e0e0 !important;
  min-height: 44px !important;
  padding: 8px !important;
  border: none !important;
  border-radius: 4px !important;
}

/* Dropdown list */
.choices__list--dropdown {
  background-color: #2d2d2d !important;
  border: 1px solid #505050 !important;
  color: #e0e0e0 !important;
  border-radius: 4px !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
  z-index: 9999 !important;
}

/* Dropdown items */
.choices__list--dropdown .choices__item {
  color: #e0e0e0 !important;
  padding: 10px 12px !important;
}

/* Highlighted dropdown item */
.choices__list--dropdown .choices__item--selectable.is-highlighted {
  background-color: #4CAF50 !important;
  color: white !important;
}

/* Regular dropdown items */
.choices__list--dropdown .choices__item--selectable {
  background-color: #2d2d2d !important;
  padding: 10px 12px !important;
  border-bottom: 1px solid #404040 !important;
}

/* Last dropdown item */
.choices__list--dropdown .choices__item--selectable:last-child {
  border-bottom: none !important;
}

/* Search input */
.choices__input {
  background-color: #363636 !important;
  color: #ffffff !important;
}

.choices__input:focus {
  background-color: #363636 !important;
  color: #ffffff !important;
}

/* Single select styling */
.choices[data-type*="select-one"] .choices__inner {
  padding-bottom: 8px !important;
}

/* Dropdown arrow */
.choices[data-type*="select-one"]:after {
  border-color: #e0e0e0 transparent transparent transparent !important;
}

/* Dropdown arrow when open */
.choices[data-type*="select-one"].is-open:after {
  border-color: transparent transparent #e0e0e0 transparent !important;
}

/* Placeholder text */
.choices__placeholder {
  opacity: 0.7 !important;
  color: #e0e0e0 !important;
}

/* Selected item */
.choices__item.choices__item--selectable {
  background-color: #363636 !important;
  color: #e0e0e0 !important;
}

/* Search input in dropdown */
.choices__input--cloned {
  background-color: #363636 !important;
  color: #ffffff !important;
  min-width: 100% !important;
  padding: 8px !important;
}

/* Focused state */
.is-focused .choices__inner,
.is-open .choices__inner {
  border-color: #4CAF50 !important;
}

/* Dropdown header */
.choices__list--dropdown .choices__header {
  border-bottom: 1px solid #505050 !important;
  color: #e0e0e0 !important;
  padding: 10px !important;
  background-color: #2d2d2d !important;
}

/* Ensure dropdown is visible when open */
.choices.is-open {
  z-index: 9999 !important;
}

/* Fix for dropdown positioning */
.choices__list--dropdown {
  margin-top: 2px !important;
}

/* Hide original selects */
select.monster-select {
  display: none !important;
}

/* Make sure text is visible */
.choices__list--single {
  color: #e0e0e0 !important;
}

/* Style for no results text */
.choices__list--dropdown .choices__item--disabled {
  background-color: #2d2d2d !important;
  color: #999 !important;
}

/* Ensure the dropdown is properly sized */
.choices__list--dropdown .choices__list {
  max-height: 300px !important;
  overflow-y: auto !important;
}

/* Make dropdowns shorter */
.choices__inner {
  background-color: #363636 !important;
  color: #e0e0e0 !important;
  min-height: 10px !important; /* Reduced from 44px */
  padding: 4px 8px !important; /* Reduced top/bottom padding */
  border: none !important;
  border-radius: 4px !important;
  line-height: 22px !important; /* Add this to reduce internal spacing */
}

/* Also adjust the single item list height */
.choices__list--single {
  padding: 2px 16px 2px 4px !important; /* Reduced padding */
}

/* Adjust the dropdown arrow position */
.choices[data-type*="select-one"]:after {
  top: 45% !important; /* Adjust arrow vertical position */
}

.tuner-options{
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.donation-links{
    margin-top: -20px;
    padding-top: -10px;
    text-align: center;
}



