/* --- Global Theme Variables (Illusion Lucid Theme) --- */
:root {
    --dark-background: #0d0c1d;
    --main-app-background: #161523;
    --input-background: #252336;
    --primary-accent: #8A2BE2; /* BlueViolet */
    --secondary-accent: #4a00e0; /* Deep Purple */
    --illusion-blue: #2575fc; /* Bright Blue for gradients */
    --red-danger: #E63946;
    --red-danger-hover: #F05A66;
    --success-green: #2A9D8F;
    --text-light: #F0F0F0;
    --text-dark: #FFFFFF;
    --border-color: #3c3852;
    --points-color: #FFC300;

    /* New Gradient Variable */
    --lucid-gradient: linear-gradient(90deg, var(--primary-accent) 0%, var(--illusion-blue) 100%);
}

/* --- New Animation for Glowing Effect --- */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 12px rgba(138, 43, 226, 0.6);
    }
    50% {
        box-shadow: 0 0 24px rgba(37, 117, 252, 0.8);
    }
    100% {
        box-shadow: 0 0 12px rgba(138, 43, 226, 0.6);
    }
}

@keyframes pulse-text-glow {
    0% {
        text-shadow: 0 0 15px rgba(138, 43, 226, 0.8);
    }
    50% {
        text-shadow: 0 0 25px rgba(37, 117, 252, 1.0);
    }
    100% {
        text-shadow: 0 0 15px rgba(138, 43, 226, 0.8);
    }
}


/* --- General Body & Layout --- */
body {
    background-color: var(--dark-background);
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    margin: 0;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
}

.app-wrapper {
    max-width: 800px;
    width: 100%;
    background-color: var(--main-app-background);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(138, 43, 226, 0.2);
    border: 1px solid var(--border-color);
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-accent);
    text-align: center;
    padding: 1.8rem 0 0.8rem;
    background-color: var(--main-app-background);
    border-bottom: 2px solid var(--primary-accent);
    animation: pulse-text-glow 4s infinite ease-in-out;
}

.hidden {
    display: none !important;
}

/* --- Tab Navigation --- */
.tab-navigation {
    display: flex;
    justify-content: space-between;
    background-color: var(--input-background);
    padding: 0 0.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.tab-button {
    flex-grow: 1;
    padding: 1rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-bottom 0.2s;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.tab-button:hover {
    background-color: var(--secondary-accent);
    color: var(--text-dark);
}

.tab-button.active {
    background-color: var(--main-app-background);
    color: var(--primary-accent);
    border-bottom: 3px solid transparent; /* Remove solid border */
}

/* Glowing underline for active tab */
.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--lucid-gradient);
}


[data-permission="admin"] {
    display: none; /* Hide by default; JS will show them */
}

/* --- Tab Content & Section Headers --- */
.tab-content {
    padding: 2rem;
    display: none;
    flex-direction: column;
    gap: 1.5rem;
}

.tab-content.active {
    display: flex;
}

.section-header {
    font-size: 2.0rem;
    color: var(--primary-accent);
    margin: 0 0 1.2rem;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.8rem;
    animation: pulse-text-glow 5s infinite ease-in-out;
}

.sub-section-header {
    font-size: 1.5rem;
    color: var(--primary-accent);
    margin: 1.5rem 0 0.8rem;
    text-align: center;
    text-shadow: 0 0 8px rgba(138, 43, 226, 0.3);
}

.command-description {
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    color: var(--text-light);
    font-size: 0.95rem;
}

.mod-note {
    color: var(--red-danger);
    font-weight: 600;
    text-shadow: 0 0 5px rgba(230, 57, 70, 0.4);
    display: block;
    margin-bottom: 1rem;
}

/* --- Forms & Inputs --- */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1rem; /* Added default bottom margin */
}

label {
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-size: 1rem;
}

label i {
    margin-right: 8px;
    color: var(--secondary-accent);
}

select,
input[type="text"],
input[type="number"],
input[type="password"],
input[type="url"],
textarea {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: var(--dark-background);
    color: var(--text-light);
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:focus,
input:focus,
textarea:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.6);
    outline: none;
}

select[size] {
    height: auto;
    min-height: 100px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1rem 0;
    color: var(--text-light);
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-accent);
    cursor: pointer;
    border: 1px solid var(--border-color);
    background-color: var(--input-background);
    border-radius: 4px;
}

/* --- Buttons --- */
.button-group {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 1rem; /* Added top margin */
}

.button-group .btn {
    flex: 1;
    min-width: 150px;
}

.btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--lucid-gradient);
    background-size: 200% auto;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: background-position 0.4s, transform 0.1s, box-shadow 0.2s;
    animation: pulse-glow 4s infinite ease-in-out;
    display: inline-flex; /* Use flex for icon alignment */
    align-items: center;
    justify-content: center;
}

.btn i {
    margin-right: 8px;
}

.btn:hover {
    background-position: right center;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    background: #555555;
    color: #AAAAAA;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    animation: none;
}

.red-button {
    background: var(--red-danger) !important;
    animation: none !important;
    box-shadow: 0 0 12px rgba(230, 57, 70, 0.5);
}

.red-button:hover {
    background: var(--red-danger-hover) !important;
    box-shadow: 0 0 18px rgba(230, 57, 70, 0.8);
}

.blue-button {
    background: var(--illusion-blue) !important;
    animation: none !important;
    box-shadow: 0 0 12px rgba(37, 117, 252, 0.5);
}

.blue-button:hover {
    background: #4a8eff !important; /* Slightly lighter blue */
    box-shadow: 0 0 18px rgba(37, 117, 252, 0.8);
}

/* Added Success Button Style */
.success-button {
    background: var(--success-green) !important;
    animation: none !important;
    box-shadow: 0 0 12px rgba(42, 157, 143, 0.5);
}

.success-button:hover {
    background: #34c4b3 !important; /* Lighter green */
    box-shadow: 0 0 18px rgba(42, 157, 143, 0.8);
}

/* Added Purple Button Style */
.purple-button {
    background: var(--secondary-accent) !important; /* Use deep purple */
    animation: none !important;
    box-shadow: 0 0 12px rgba(74, 0, 224, 0.5);
}

.purple-button:hover {
    background: var(--primary-accent) !important; /* Lighter purple on hover */
    box-shadow: 0 0 18px rgba(138, 43, 226, 0.8);
}


/* --- Status Messages & Overlays --- */

#fixedStatusOverlay {
    position: fixed;
    top: -100px; /* Start off-screen */
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 25px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 1.1em;
    font-weight: 500;
    z-index: 9999;
    transition: top 0.4s ease-in-out;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    text-align: center;
    background-color: var(--input-background);
    color: var(--text-light);
    min-width: 250px;
    max-width: 90%;
}

#fixedStatusOverlay.visible {
    top: 20px;
}

#fixedStatusOverlay.success {
    background-color: #1a3a2a;
    border-color: #27a86a;
    color: #90e0b7;
}

#fixedStatusOverlay.error {
    background-color: #4d1c1c;
    border-color: #e53e3e;
    color: #feb2b2;
}

#fixedStatusOverlay.info {
    background-color: #1e3a5f;
    border-color: #4299e1;
    color: #bee3f8;
}

#fixedStatusOverlay.warning {
    background-color: #4a3313;
    border-color: #ecc94b;
    color: #f6e05e;
}

.status-message {
    padding: 1rem;
    text-align: center;
    background-color: var(--input-background);
    border-radius: 6px;
    font-weight: 500;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    word-break: break-word;
    line-height: 1.4;
    color: var(--text-light);
    margin-top: 1rem;
}

.status-message:not(:empty) {
    display: flex;
}

.status-message.error {
    color: var(--red-danger);
    border-color: var(--red-danger);
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.6);
}

.status-message.success {
    color: var(--success-green);
    border-color: var(--success-green);
    box-shadow: 0 0 10px rgba(42, 157, 143, 0.6);
}

.status-message.info {
    color: #bee3f8;
    border-color: #4299e1;
    box-shadow: 0 0 10px rgba(66, 153, 225, 0.6);
}

.status-message.warning {
    color: #f6e05e;
    border-color: #ecc94b;
    box-shadow: 0 0 10px rgba(236, 201, 75, 0.6);
}

/* --- Universal Card & Grid Styles --- */
.shop-grid,
.kit-grid,
.kit-cards-container,
#kits-container,
#player-kits-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.item-card, .shop-item, .kit-card {
    background-color: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    text-align: center;
    box-sizing: border-box;
}

.kit-description {
    min-height: 40px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem !important;
    color: #C0C0C0 !important;
    text-shadow: 0 0 1px #000;
}

.item-card h3, .shop-item h3, .kit-card h3, .item-card h4 {
    font-size: 1.3rem;
    color: var(--primary-accent);
    margin: 0 0 0.6rem;
    text-shadow: 0 0 8px rgba(138, 43, 226, 0.4);
    border-bottom: 2px solid var(--primary-accent);
    padding-bottom: 0.5rem;
}

.item-card p, .shop-item p, .kit-card p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #C0C0C0 !important;
    text-shadow: 0 0 1px #000;
}

.item-card .btn, .shop-item .btn, .kit-card .btn {
    padding: 0.9rem;
    font-size: 1.05rem;
    margin-top: auto;
}

.shop-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.shop-item-price-display, .kit-details, .modal-price {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--points-color);
    margin-top: 0.8rem;
}

.kit-details {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* --- Card-Specific Input Styles --- */
.item-card .input-group, .shop-item .input-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.item-card label, .shop-item label {
    margin: 0;
    font-size: 0.95rem;
    flex-basis: 40%;
    text-align: left;
    color: var(--secondary-accent);
}

.item-card input, .item-card select, .shop-item input, .shop-item select {
    padding: 0.75rem;
    font-size: 0.95rem;
    background-color: var(--dark-background);
}

.item-card .checkbox-group label, .shop-item .checkbox-group label {
    color: var(--text-light);
}

/* --- Player & Shop Header --- */
.shop-header, .player-info-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
}

.shop-header h2, .player-name-display {
    font-size: 1.5rem;
    color: var(--primary-accent);
    margin: 0;
    flex-basis: 100%;
}

.points-display {
    font-size: 1.2rem;
    font-weight: 500;
    flex-grow: 1;
    text-align: center;
}

/* --- Player Management Specifics --- */
#selectedPlayerInfoDisplay {
    background-color: var(--input-background);
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1.8rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    border: 1px solid var(--border-color);
}

#selectedPlayerInfoDisplay p {
    margin: 0.2rem 0;
}

#selectedPlayerInfoDisplay strong {
    color: var(--primary-accent);
}

#clearSelectedPlayerBtn {
    margin-top: 1rem;
    width: fit-content;
    align-self: center;
}

/* --- Server Restart & Payment Sections --- */
.restart-section, .payment-section {
    background-color: var(--input-background);
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

#countdownDisplay {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-accent);
    margin-top: 0.8rem;
    animation: pulse-text-glow 4s infinite ease-in-out;
}

.donation-button {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    max-width: 300px;
    margin-top: 1rem;
}

/* --- Tables --- */
.table-container {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 1rem;
}

.points-table, .kit-table {
    width: 100%;
    border-collapse: collapse;
}

.points-table th, .kit-table th, .points-table td, .kit-table td {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    text-align: left;
    word-break: break-word;
}

.points-table th, .kit-table th {
    background-color: var(--input-background);
    color: var(--primary-accent);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.points-table .points-positive {
    color: var(--success-green);
    font-weight: bold;
}

.points-table .points-negative {
    color: var(--red-danger);
    font-weight: bold;
}

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.visible {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--main-app-background);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 25px rgba(138, 43, 226, 0.6);
    text-align: center;
    max-width: 450px;
    width: 90%;
    border: 1px solid var(--border-color);
    position: relative;
}

.modal-content.large {
    max-width: 80vw;
}

.modal-message {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-buttons .btn {
    flex: 1;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.2s ease;
    color: var(--text-light);
}

.close-button:hover {
    color: var(--red-danger);
}

/* --- Misc & Footer --- */
.version-display {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: #888;
    text-align: center;
}

/* Section container for consistent spacing and borders */
.section-container {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* --- Responsive Media Queries --- */
@media (max-width: 768px) {
    body { padding: 1rem; }
    h1 { font-size: 2.2rem; }
    .tab-button { font-size: 0.8rem; padding: 0.8rem 0.6rem; }
    .tab-content { padding: 1.5rem; }
    .section-header { font-size: 1.6rem; }
    .btn { padding: 1rem; font-size: 1rem; }
    .button-group { flex-direction: column; gap: 0.8rem; }
    .shop-header, .player-info-content { flex-direction: column; }
}

@media (max-width: 480px) {
    body { padding: 0.5rem; }
    h1 { font-size: 1.8rem; }
    .tab-navigation { padding: 0; }
    .tab-button { font-size: 0.7rem; padding: 0.6rem 0.4rem; }
    .tab-content { padding: 1rem; }
    .section-header { font-size: 1.4rem; }
    .modal-content { padding: 1.5rem; }
}

/* --- Component Specific Styles --- */

.kit-claim-card {
  background-color: var(--input-background);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  margin: 20px auto;
  max-width: 800px;
  box-shadow: 0 0 10px rgba(138, 43, 226, 0.2);
  color: var(--text-light);
}

.kit-claim-card h2 {
  margin-top: 0;
  font-size: 1.5em;
  color: var(--primary-accent);
}

.cooldown-timer {
  display: block;
  color: var(--red-danger);
  font-weight: bold;
  margin-top: 6px;
}

.claim-button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  background: #555 !important;
  animation: none !important;
  box-shadow: none !important;
}

#dailyRewardToggle {
  accent-color: var(--primary-accent);
}

#dailyRewardToggleContainer label {
  color: var(--text-light);
  font-weight: bold;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

#dailyRewardToggle:hover {
  cursor: pointer;
}

#dailyRewardToggleContainer {
  display: flex;
  align-items: center;
  visibility: visible;
  opacity: 1;
  flex-grow: 1;
  justify-content: center;
}

/* ========================================= */
/* TOGGLE SWITCH (FIXED + SMOOTH)            */
/* ========================================= */

.toggle-switch-container {
    position: relative;
    width: 60px;
    height: 30px;
    display: inline-block;
}

/* REAL checkbox (clickable area) */
.toggle-switch-input {
    position: absolute;
    width: 60px;
    height: 30px;
    opacity: 0;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

/* background track */
.toggle-switch-slider {
    position: absolute;
    inset: 0;
    background-color: var(--input-background);
    border-radius: 30px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

/* ===== THE KNOB (YOU WERE MISSING THIS) ===== */
.toggle-switch-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-light);
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* ON STATE */
.toggle-switch-input:checked + .toggle-switch-slider {
    background-color: var(--success-green);
    border-color: var(--success-green);
    box-shadow: 0 0 10px rgba(42,157,143,.4);
}

/* MOVE KNOB */
.toggle-switch-input:checked + .toggle-switch-slider::before {
    transform: translateX(30px);
    background-color: var(--text-dark);
}

/* focus glow */
.toggle-switch-input:focus + .toggle-switch-slider {
    box-shadow: 0 0 8px var(--success-green);
}


/* --- Search Dropdown Styles --- */
.search-select-container {
    position: relative;
    width: 100%;
    z-index: 1001;
}

.search-select-container input[type="text"] {
    width: 100%;
    position: relative;
    z-index: 10;
}

.custom-dropdown-list,
#recipientDropdown,
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background-color: var(--dark-background);
    border: 1px solid var(--primary-accent);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    border-radius: 0 0 6px 6px;
}

.custom-dropdown-list div,
#recipientDropdown div,
.search-dropdown option {
    padding: 0.75rem 1rem;
    color: var(--text-light);
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}
.custom-dropdown-list div:last-child,
#recipientDropdown div:last-child {
    border-bottom: none;
}


.custom-dropdown-list div:hover,
#recipientDropdown div:hover,
.search-dropdown option:hover {
    background-color: var(--secondary-accent);
    color: var(--text-dark);
}


/* --- Ban-on-Sight Section Styles --- */

#banOnSightSection {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

#banOnSightSection h3 {
    font-size: 1.5rem;
    color: var(--primary-accent);
    margin-bottom: 0.8rem;
    text-align: center;
}

#banOnSightSection p.command-description {
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    color: var(--text-light);
    font-size: 0.95rem;
}

#banOnSightSection p strong {
    color: var(--red-danger);
}

#addBanOnSightBtn {
    width: 100%;
    margin-top: 1rem;
}

#banOnSightSection hr {
    border-color: var(--border-color);
    margin: 2rem 0;
}

#refreshBanOnSightListBtn {
    margin-bottom: 1rem;
    width: auto;
    display: inline-block;
}

#banOnSightListContainer {
    background-color: var(--input-background);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 6px;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

#banOnSightListStatus {
    margin: 0;
    padding: 1rem;
    text-align: center;
    /* Uses .status-message styles */
}
#banOnSightListStatus.error {
    color: var(--red-danger);
}


#banOnSightListUL {
    list-style: none;
    padding: 0;
    margin: 0;
}

#banOnSightListUL li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--main-app-background);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    color: var(--text-light);
}

#banOnSightListUL li strong {
    color: var(--primary-accent);
    margin-right: 0.5rem;
}

#banOnSightListUL li em {
    font-style: normal;
    font-size: 0.85em;
    color: #a0aec0; /* Lighter grey */
    margin-left: 0.5rem; /* Space between name and reason */
    flex-grow: 1; /* Allow reason to take space */
    text-align: left; /* Align reason text */
    overflow: hidden; /* Prevent long reasons breaking layout */
    text-overflow: ellipsis;
    white-space: nowrap;
}


#banOnSightListUL .remove-bos-player-btn {
    padding: 0.3rem 0.8rem !important;
    font-size: 0.9rem !important;
    width: auto !important;
    flex-shrink: 0;
    background: var(--red-danger) !important;
    animation: none !important;
    box-shadow: 0 0 8px rgba(230, 57, 70, 0.4);
}

#banOnSightListUL .remove-bos-player-btn:hover {
    background: var(--red-danger-hover) !important;
    box-shadow: 0 0 12px rgba(230, 57, 70, 0.7);
}

/* Hide the unreliable RCON Index self-target feature */
#myCharacterIndex,
label[for="myCharacterIndex"],
.centered-toggle label[for="targetSelf"], /* Target specific label */
.centered-toggle .toggle-switch-container input#targetSelf + label.toggle-switch-slider /* Target specific slider */
{
    display: none !important; /* Force hiding */
}

/* Optional: Hide the whole centered toggle container if nothing else uses it */
.input-group.centered-toggle:has(#targetSelf) {
     display: none !important;
}

/* Optional: Hide the H2 header if nothing else is under it */
/* Be careful with this selector if other things are added later */
h2.section-header + .input-group > label[for="myCharacterIndex"] {
   /* Select the H2 preceding the RCON index input */
   display: none;
}
/* Or more simply, if you add an ID to the H2: */
/* #adminSelfTargetHeader { display: none; } */


/* --- Claim Kits Smoothing --- */

/* Add transition to the container for potential future use */
#claim-kits-container {
    transition: opacity 0.3s ease-in-out;
}

/* Style for individual kit cards with transitions */
.kit-card {
    /* Add existing styles like background, border, padding etc. here if not already inherited */
    opacity: 1; /* Start fully visible */
    transition: opacity 0.5s ease-in-out, transform 0.3s ease-out; /* Fade-in and slight scale */
    transform: scale(1);
}

/* Define a state for when cards are loading/initially hidden */
.kit-card.loading {
    opacity: 0;
    transform: scale(0.95); /* Slightly smaller when loading */
}

/* Style for the claim button transitions */
.kit-card .btn.claim-kit-btn { /* Target claim buttons specifically */
    /* Add existing button styles here */
    transition: background-color 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease, transform 0.1s ease; /* Add opacity to transitions */
}

/* Style for disabled claim buttons (uses existing disabled style generally) */
.kit-card .btn.claim-kit-btn:disabled {
    opacity: 0.5; /* Make disabled buttons clearly faded */
    cursor: not-allowed;
    /* Ensure background/animation overrides from general .btn:disabled are applied */
    background: #555 !important;
    animation: none !important;
    box-shadow: none !important;
    transform: none !important;
}

/* 2. This makes each day's container a stacking context */
#dailyRewardFormContainer .input-group {
    position: relative;
    z-index: 1;
    overflow: visible; /* Ensure dropdown isn't clipped */
}

/* This class will be added by JavaScript to the day you're currently searching in */
#dailyRewardFormContainer .input-group.search-active {
    z-index: 100; /* Brings the active container to the front */
}

#dailyRewardFormContainer .search-dropdown {
    position: absolute;
    top: 100%; /* Positions it right below its wrapper */
    left: 0;
    width: 100%;
    z-index: 101; /* Sits on top of its active container */
    /* It will inherit other .search-dropdown styles (color, border) */
}

#dailyRewardFormContainer .search-dropdown-wrapper {
    position: relative;
    width: 100%;
}

/* ========================================= */
/* PRO TOGGLE SWITCH (Daily Rewards)         */
/* ========================================= */
.theme-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #3f3f46; /* Dark grey when off */
  transition: .3s;
  border: 1px solid #52525b;
}

.theme-switch .slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.theme-switch input:checked + .slider {
  background-color: #a855f7; /* Purple when on */
  border-color: #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.theme-switch input:checked + .slider:before {
  transform: translateX(24px);
}

/* Rounded sliders */
.theme-switch .slider.round {
  border-radius: 34px;
}

.theme-switch .slider.round:before {
  border-radius: 50%;
}

/* =====================================================
   TIMEZONE CLOCK — ILLUSION LUCID THEME (BAKED IN)
===================================================== */

.timezone-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Clock Card */
.clock-card {
    background: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    width: 320px;
    text-align: center;
    position: relative;

    box-shadow:
        0 0 12px rgba(138,43,226,0.25),
        inset 0 0 10px rgba(0,0,0,0.4);

    transition: transform .25s ease,
                box-shadow .25s ease;
}

.clock-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 0 25px rgba(138,43,226,0.6),
        0 0 45px rgba(37,117,252,0.3);
}

/* Header */
.clock-card h3 {
    margin-bottom: 12px;
    color: var(--primary-accent);
    font-weight: 600;
    letter-spacing: .5px;
    text-shadow: 0 0 8px rgba(138,43,226,.4);
}

/* Dropdown */
.clock-card select {
    width: 100%;
    padding: 0.7rem;
    margin-bottom: 14px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--dark-background);
    color: var(--text-light);
    transition: box-shadow .2s;
}

.clock-card select:focus {
    box-shadow: 0 0 10px rgba(138,43,226,.6);
    outline: none;
}

/* ===== CLOCK DISPLAY ===== */

.clock-time {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-dark);

    animation: pulse-text-glow 4s infinite ease-in-out;
}

.clock-meta {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
    font-size: 0.85rem;
}

.clock-zone {
    color: var(--illusion-blue);
    font-weight: 600;
}

.clock-label {
    opacity: .7;
}

.clock-date {
    margin-top: 6px;
    font-size: 0.8rem;
    opacity: .6;
}

/* subtle animated underline */
.clock-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: var(--lucid-gradient);
    border-radius: 0 0 10px 10px;
    opacity: .7;
}


/* ========================================= */
/* UNIVERSAL TOGGLE SWITCH (FINAL FIX)       */
/* ========================================= */

.toggle-switch-container {
    position: relative;
    width: 60px;
    height: 30px;
    display: inline-block;
}

/* REAL checkbox (clickable area) */
.toggle-switch-input {
    position: absolute;
    width: 60px;
    height: 30px;
    opacity: 0;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

/* slider track */
.toggle-switch-slider {
    position: absolute;
    inset: 0;
    background-color: var(--input-background);
    border-radius: 30px;
    border: 2px solid var(--border-color);
    transition: all 0.25s ease;
}

/* knob */
.toggle-switch-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-light);
    border-radius: 50%;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

/* ON STATE */
.toggle-switch-input:checked + .toggle-switch-slider {
    background-color: var(--success-green);
    border-color: var(--success-green);
    box-shadow: 0 0 12px rgba(42,157,143,.45);
}

/* MOVE KNOB */
.toggle-switch-input:checked + .toggle-switch-slider::before {
    transform: translateX(30px);
    background-color: var(--text-dark);
}

/* focus glow */
.toggle-switch-input:focus + .toggle-switch-slider {
    box-shadow: 0 0 8px var(--success-green);
}
