@import url("./base.css");
@import url("./layout.css");

.update-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0 18px;
    padding: 10px 14px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #1b2b1b 0%, #1a1f1a 100%);
    color: #c7f0cf;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.update-banner.hidden {
    display: none;
}

.update-banner-message {
    font-weight: 600;
    color: #d8f7df;
}

.update-banner .action-button {
    padding: 6px 12px;
    font-size: 0.85em;
}

@media (max-width: 640px) {
    .update-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}

.raptor-wave-dropdown-container {

    background: var(--color-surface-strong);
    border: 1px solid var(--color-border-strong);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 20px;
}

.raptor-wave-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.raptor-wave-radio-option {
    cursor: pointer;
    user-select: none;
}

.raptor-wave-radio-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.raptor-wave-radio-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--color-border-soft);
    border-radius: 999px;
    background: #151515;
    color: var(--color-text-muted);
    font-size: 0.92em;
    line-height: 1.1;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.raptor-wave-radio-label::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--color-text-muted);
    box-sizing: border-box;
}

.raptor-wave-radio-option:hover .raptor-wave-radio-label {
    background: var(--color-hover);
    color: var(--color-text);
    border-color: var(--color-border-strong);
    transform: translateY(-1px);
}

.raptor-wave-radio-input:checked + .raptor-wave-radio-label {
    background: linear-gradient(180deg, var(--color-accent-strong) 0%, var(--color-accent) 100%);
    color: #fff;
    border-color: var(--color-accent-dark);
    box-shadow: inset 0 0 0 1px rgba(76, 175, 80, 0.35);
    transform: none;
}

.raptor-wave-radio-input:checked + .raptor-wave-radio-label::before {
    background: #fff;
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.raptor-wave-radio-input:focus-visible + .raptor-wave-radio-label {
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 187, 106, 0.35);
}

.command-output-section {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    margin-bottom: 10px;
}
.command-output-section h3 { margin-top: 0; margin-bottom: 5px; }
.command-output-section textarea {
    width: 100%; box-sizing: border-box; padding: 10px;
    border: 1px solid var(--color-border-soft); border-radius: 4px;
    font-family: monospace; white-space: pre-wrap; word-wrap: break-word;
    resize: vertical; background-color: var(--color-panel); color: var(--color-text);
}
.copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-accent-strong) 100%);
    color: #fff;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95em;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-align: center;
    position: relative;
    margin-bottom: 10px;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), 0 6px 12px rgba(0, 0, 0, 0.25);
    transition: background-color 0.2s ease, transform 0.12s ease, box-shadow 0.2s ease;
}
.copy-button:hover {
    background: linear-gradient(180deg, var(--color-accent-hover) 0%, var(--color-accent) 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4), 0 8px 16px rgba(0, 0, 0, 0.3);
}
.copy-button:active {
    background: var(--color-accent-dark);
    transform: translateY(0);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}
.copy-button:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 2px rgba(76, 175, 80, 0.25),
        0 2px 0 rgba(0, 0, 0, 0.35),
        0 6px 12px rgba(0, 0, 0, 0.25);
}
.copy-button:disabled {
    background: var(--color-border-soft);
    color: #1b1b1b;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 0.8;
}

.copy-button.slot-copy-button {
    padding: 4px 8px;
    font-size: 0.8em;
    margin-bottom: 0;
    line-height: 1.1;
}

.copy-button.slot-copy-button:disabled {
    background: var(--color-border-soft);
    color: #1b1b1b;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 0.75;
}

/* Enhanced tooltip styling */
.copy-button[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    white-space: nowrap;
    margin-bottom: 8px;
    z-index: 1000;
    pointer-events: none;
    animation: tooltipFadeIn 0.3s ease;
}

  .copy-button[title]:hover::before {
      content: "";
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      border: 6px solid transparent;
      border-top-color: rgba(0, 0, 0, 0.9);
      margin-bottom: -4px;
      z-index: 1000;
      pointer-events: none;
      animation: tooltipFadeIn 0.3s ease;
  }
  /* Match action button sizing when copy buttons sit in action rows */
  .action-buttons-container .copy-button {
      padding: 8px 14px;
      margin-bottom: 0;
  }

.slot-usage-card {
    padding: 10px;
    background: #1a1a1a;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    margin-top: 10px;
}

.slot-usage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    font-size: 0.9em;
}

.slot-usage-column {
    color: var(--color-text-dim);
    border-right: 1px solid var(--color-border-strong);
    padding-right: 15px;
}

.slot-usage-column:last-child {
    border-right: none;
    padding-right: 0;
}

.slot-usage-header {
    margin-bottom: 8px;
    font-size: 1.1em;
}

.slot-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.slot-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}

.slot-row-text {
    color: #ddd;
    font-size: 0.9em;
    line-height: 1.4;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(5px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.lobby-name-output {
    margin-top: 20px; padding: 10px; border: 1px dashed var(--color-border-soft);
    background-color: var(--color-border); font-family: monospace; word-break: break-all;
}
#custom-tweaks-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
    table-layout: fixed;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-panel);
}
#custom-tweaks-table th, #custom-tweaks-table td {
    border-right: 1px solid var(--color-border-strong);
    border-bottom: 1px solid var(--color-border-strong);
    padding: 9px 10px;
    text-align: left;
    vertical-align: top;
    font-family: var(--font-mono);
}
#custom-tweaks-table th {
    background: linear-gradient(180deg, #2a2a2a 0%, #1f1f1f 100%);
    color: var(--color-text);
    font-weight: 700;
}
#custom-tweaks-table tr:nth-child(even) { background-color: var(--color-surface); }
#custom-tweaks-table tr:hover td { background-color: #232323; }
#custom-tweaks-table td {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#custom-tweaks-table th:last-child, #custom-tweaks-table td:last-child { border-right: none; }
#custom-tweaks-table tr:last-child td { border-bottom: none; }
#custom-tweaks-table th:first-child, #custom-tweaks-table td:first-child { width: 25%; }
#custom-tweaks-table th:nth-child(2), #custom-tweaks-table td:nth-child(2) { width: 15%; }
#custom-tweaks-table th:nth-child(3), #custom-tweaks-table td:nth-child(3) { width: 45%; }
#custom-tweaks-table th:last-child, #custom-tweaks-table td:last-child { width: 15%; text-align: center; }

#custom-tweaks-table td:nth-child(3) { 
    white-space: normal; overflow: visible; 
}

.command-cell-wrapper {
    display: flex; justify-content: space-between;
    align-items: flex-start; width: 100%; overflow: hidden;
}
.command-text {
    white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; flex-grow: 1;
}
.copy-row-button, .delete-tweak-btn {
    padding: 5px 9px;
    font-size: 0.8em;
    margin-left: 10px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #3e3e3e 0%, var(--color-input) 100%);
    color: var(--color-text-body);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    transition: background-color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}
.copy-row-button:hover, .delete-tweak-btn:hover {
    background: linear-gradient(180deg, #505050 0%, #3f3f3f 100%);
    transform: translateY(-1px);
}
.copy-row-button:active, .delete-tweak-btn:active {
    transform: translateY(0);
}
.delete-tweak-btn { background: linear-gradient(180deg, #2f2f2f 0%, var(--color-hover) 100%); }
.delete-tweak-btn:hover { background: linear-gradient(180deg, #3c3c3c 0%, var(--color-input) 100%); }
#links-tab h2, #links-tab h3 { margin-top: 20px; border-bottom: 1px solid var(--color-border-strong); padding-bottom: 5px; }
#links-tab code { background-color: var(--color-border); padding: 2px 5px; border-radius: 3px; font-family: monospace; }
#links-tab ul { padding-left: 20px; }
#links-tab li { margin-bottom: 10px; }
  .custom-adders {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
      gap: 16px;
      margin-bottom: 30px;
  }

  .custom-add-form {
      display: grid;
      grid-template-columns: 160px 1fr;
      gap: 10px;
      align-items: center;
      padding: 14px;
      border: 1px solid var(--color-border-soft);
      border-radius: var(--radius-md);
      background: linear-gradient(180deg, var(--color-surface) 0%, #242424 100%);
      box-shadow: var(--shadow-sm);
  }

  .custom-add-form h3 {
      grid-column: 1 / -1;
      margin: 0 0 4px 0;
  }

  .custom-add-form label { text-align: right; padding-right: 10px; color: var(--color-text-body); }
  .custom-add-form input, .custom-add-form select, .custom-add-form textarea {
      width: 100%;
      box-sizing: border-box;
      background-color: #151515;
      color: var(--color-text);
      border: 1px solid var(--color-border-soft);
      border-radius: var(--radius-sm);
      padding: 7px 9px;
      font-family: var(--font-body);
      transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  }
  .custom-add-form select {
      padding-right: 32px;
  }
  .custom-add-form input:focus-visible, .custom-add-form select:focus-visible, .custom-add-form textarea:focus-visible {
      border-color: var(--color-accent-hover);
      box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.18);
      outline: none;
  }
  
  .custom-add-form textarea { resize: vertical; min-height: 80px; font-family: var(--font-mono); }
  .custom-add-form button {
      grid-column: 2;
      background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-accent-strong) 100%);
      color: #fff;
      border: 1px solid transparent;
      border-radius: var(--radius-sm);
      cursor: pointer;
      font-family: var(--font-heading);
      font-weight: 700;
      letter-spacing: 0.01em;
      transition: background-color 0.2s ease, transform 0.12s ease, box-shadow 0.2s ease;
      width: auto; 
      justify-self: start; 
      box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), 0 6px 12px rgba(0, 0, 0, 0.25);
  }
  .custom-add-form button:hover {
      background: linear-gradient(180deg, var(--color-accent-hover) 0%, var(--color-accent) 100%);
      transform: translateY(-1px);
      box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4), 0 8px 16px rgba(0, 0, 0, 0.3);
  }
  .custom-add-form button:active {
      transform: translateY(0);
      box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
  }
  .custom-add-form button:focus-visible {
      outline: none;
      box-shadow:
          0 0 0 2px rgba(76, 175, 80, 0.25),
          0 2px 0 rgba(0, 0, 0, 0.35),
          0 6px 12px rgba(0, 0, 0, 0.25);
  }

  .custom-helper {
      grid-column: 1 / -1;
      margin: 0;
      color: var(--color-text-muted);
      font-size: 0.9em;
  }

#slot-warning-messages p {
    color: var(--color-text-dim);
    text-align: left;
    font-size: 0.9em;
    margin: 10px 0 0 0;
}
.custom-option-type-display {
    font-size: 0.85em;
    color: var(--color-text-dim);
    margin-left: 4px;
}
.action-buttons-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--color-border-strong);
}
.action-buttons-container.with-copy { justify-content: space-between; }
.action-buttons-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.action-button {
    padding: 8px 14px;
    background: linear-gradient(180deg, #3e3e3e 0%, var(--color-input) 100%);
    color: var(--color-text);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88em;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45), 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.18s ease, transform 0.12s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.action-button:hover {
    background: linear-gradient(180deg, #505050 0%, #3f3f3f 100%);
    border-color: var(--color-border-strong);
    transform: translateY(-1px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5), 0 6px 14px rgba(0, 0, 0, 0.28);
}
.action-button:active {
    transform: translateY(0);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.55);
}
.action-button:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 2px rgba(76, 175, 80, 0.18),
        0 1px 0 rgba(0, 0, 0, 0.45),
        0 4px 10px rgba(0, 0, 0, 0.2);
}
.action-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

/* Dynamic Tweaks - File-level Checkboxes */
.file-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    margin-bottom: 4px;
}

.sections-info {
    font-size: 0.85em;
    color: var(--color-text-dim);
    padding-left: 24px;
    margin-top: 4px;
    line-height: 1.4;
}

/* Dynamic Tweaks - Nested Checkboxes */
.dynamic-tweak-container {
    border: 1px solid var(--color-border-soft);
    border-radius: 5px;
    padding: 6px;
    margin-bottom: 5px;
    background-color: var(--color-surface-strong);
}

.dynamic-tweak-header {
    font-weight: bold;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.tweak-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.tweak-header-left label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
}

.tweak-header-left:hover {
    background-color: #2d2d2d;
    padding: 4px;
    margin: -4px;
    border-radius: 4px;
}

.expand-button {
    background-color: var(--color-hover);
    border: 1px solid var(--color-border-soft);
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: var(--color-accent);
    transition: all 0.2s ease;
}

.expand-button:hover {
    background-color: var(--color-input);
    border-color: var(--color-accent);
}

.expand-button.collapsed::before {
    content: '▸';
}

.expand-button.expanded::before {
    content: '▾';
}

.dynamic-tweak-sub-options {
    margin-left: 30px;
    margin-top: 4px;
    padding-left: 10px;
    border-left: 2px solid var(--color-accent);
}

.dynamic-tweak-sub-options label {
    margin-bottom: 2px;
    font-size: 0.90em;
}

.dynamic-tweak-info {
    font-size: 0.82em;
    color: var(--color-text-dim);
    margin-top: 4px;
    margin-left: 30px;
    padding: 4px 6px;
    background-color: #1a1a1a;
    border-radius: 4px;
    border-left: 3px solid var(--color-accent);
}

.tweak-display-name {
    color: var(--color-text-body);
    font-size: 1em;
}

/* Game Multipliers Styling */
.multipliers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .multipliers-grid {
        grid-template-columns: 1fr;
    }
}

.multiplier-section {
    background: linear-gradient(145deg, #1c1c1c 0%, #222 100%);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #353535;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.multiplier-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
    border-color: var(--color-accent);
}

.multiplier-section .section-tagline {
    display: block;
    color: #a5cbb0;
    font-size: 0.85em;
    margin-top: -8px;
    margin-bottom: 12px;
    letter-spacing: 0.01em;
}

.multiplier-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.05em;
    color: #c2f5cb;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
    letter-spacing: 0.01em;
}

.multiplier-control {
    margin-bottom: 15px;
}

.multiplier-control label {
    display: block;
    margin-bottom: 6px;
    color: var(--color-text-body);
    font-weight: bold;
    font-size: 0.95em;
}

.multiplier-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.multiplier-controls input[type="range"] {
    flex: 1;
    height: 6px;
    background: linear-gradient(90deg, #2f2f2f 0%, var(--color-hover) 100%);
    border-radius: 3px;
    outline: none;
    accent-color: var(--color-accent);
}

.multiplier-controls input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--color-accent);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
}

.multiplier-controls input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--color-accent-hover);
}

.multiplier-controls input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--color-accent);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
}

.multiplier-controls input[type="range"]::-moz-range-thumb:hover {
    background: var(--color-accent-hover);
}

.multiplier-input {
    width: 80px;
    padding: 6px 8px;
    background-color: #101010;
    color: var(--color-text);
    border: 1px solid #3d3d3d;
    border-radius: 6px;
    font-size: 0.95em;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.multiplier-input:focus {
    border-color: var(--color-accent-hover);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.22);
    outline: none;
}

/* Hide native number input spinners */
.multiplier-input::-webkit-outer-spin-button,
.multiplier-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

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

/* Custom Spinner Wrapper */
.input-spinner-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}

.input-spinner-wrapper input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    flex: 1;
}

/* Spinner Buttons Container */
.spinner-buttons {
    display: flex;
    flex-direction: column;
    background-color: var(--color-hover);
    border: 1px solid var(--color-border-soft);
    border-left: none;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    overflow: hidden;
    height: auto;
}

.spinner-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 20px;
    background-color: var(--color-hover);
    color: #b0b0b0;
    border: none;
    border-right: 1px solid transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    padding: 0;
    transition: all 0.15s ease;
    user-select: none;
}

.spinner-button:hover {
    background-color: var(--color-accent);
    color: #fff;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.3);
}

.spinner-button:active {
    background-color: var(--color-accent-dark);
    transform: scale(0.98);
}

.spinner-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: var(--color-hover);
    color: #666;
}

.spinner-button:disabled:hover {
    background-color: var(--color-hover);
    color: #666;
    box-shadow: none;
}

.spinner-button-up {
    border-bottom: 1px solid var(--color-border-soft);
}

.spinner-button-down {
    border-top: 1px solid var(--color-border-soft);
}

/* 2-Column Checkbox Layout */
.checkbox-columns {
    display: block;
    column-count: 2;
    column-gap: 15px;
    margin: 15px 0;
}

/* File Group Styling - Compact and Modern */
.file-group {
    border: 1px solid var(--color-border-strong);
    border-radius: 6px;
    padding: 0;
    background: linear-gradient(135deg, var(--color-panel) 0%, var(--color-surface-strong) 100%);
    margin-bottom: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    break-inside: avoid-column;
    width: 100%;
    animation: cardRise 0.35s ease-out;
}

.file-group.main-group {
    background: linear-gradient(135deg, #1a2a1a 0%, #1f2d1f 100%);
    border-color: var(--color-accent-strong);
    opacity: 0.95;
}

.file-group.main-group .file-label {
    color: #b6d9c0;
    font-weight: 500;
}

.file-group.main-group input[type="checkbox"]:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.file-group:hover {
    border-color: var(--color-border-soft);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

/* File Header - Parent Checkbox Row */
.file-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--color-surface-strong);
    border-bottom: 1px solid var(--color-border-strong);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.file-header:hover {
    background: var(--color-border);
}

.file-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.file-parent-checkbox {
    margin: 0;
    cursor: pointer;
    accent-color: var(--color-accent);
    width: 1.3em;
    height: 1.3em;
}

.file-label {
    cursor: pointer;
    font-weight: 600;
    color: var(--color-text-body);
    font-size: 0.95em;
    margin: 0;
    flex: 1;
}

.file-label:hover {
    color: var(--color-accent);
}

/* Expand Button - File Level */
.file-header .expand-button {
    background-color: transparent;
    border: 1px solid var(--color-border-soft);
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: var(--color-accent);
    transition: all 0.2s ease;
    margin-left: 10px;
    flex-shrink: 0;
}

.file-header .expand-button:hover {
    background-color: var(--color-hover);
    border-color: var(--color-accent);
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.3);
}

/* Children Container - Compact Nested Styling */
.children-checkboxes {
    margin: 0;
    padding: 0 12px 0 40px;
    background: #1f1f1f;
    border-left: 2px solid var(--color-accent);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.25s ease, padding 0.2s ease;
    pointer-events: none;
}

.children-checkboxes.show {
    max-height: 900px;
    opacity: 1;
    padding: 10px 12px 10px 40px;
    pointer-events: auto;
}

.library-status {
    margin: 8px 0 12px;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--color-border-strong);
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-size: 0.9em;
}

.library-status.info {
    border-color: var(--color-accent-strong);
    color: #c6e3cb;
}

.library-status.success {
    border-color: var(--color-accent);
    color: #c7f0cf;
}

.library-status.error {
    border-color: var(--color-accent-dark);
    color: #c4d9c7;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes cardFloat {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes cardRise {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Section Checkbox - Child Items */
.section-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    margin: 2px 0;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.15s ease, transform 0.15s ease;
    color: #c0c0c0;
    font-size: 0.9em;
}

.section-checkbox:hover {
    background-color: #2d2d2d;
    color: var(--color-text-body);
    transform: translateX(2px);
}

.section-checkbox input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    accent-color: var(--color-accent-hover);
    width: 1.1em;
    height: 1.1em;
}

.section-checkbox span {
    cursor: pointer;
}

/* Indeterminate state styling */
.file-parent-checkbox:indeterminate {
    accent-color: #7cd889;
}

/* Responsive: Stack on small screens */
@media (max-width: 768px) {
    .checkbox-columns {
        column-count: 1;
        column-gap: 12px;
    }

    .children-checkboxes {
        padding: 8px 10px 8px 32px;
    }

    .file-header {
        padding: 8px 10px;
    }

    .section-checkbox {
        padding: 4px 6px;
        font-size: 0.85em;
    }
}
.sheet-sync-status {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--color-border-strong);
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-size: 0.85em;
    line-height: 1;
}

.sheet-sync-status.success {
    border-color: var(--color-accent);
    color: #c7f0cf;
}

.sheet-sync-status.error {
    border-color: var(--color-accent-dark);
    color: #c4d9c7;
}

.sheet-sync-status.pending {
    border-color: var(--color-accent-strong);
    color: #c6e3cb;
}

.tweaks-loader {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    font-size: 0.95em;
    padding: 6px 0;
}

.tweaks-loader .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-border-soft);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.tweaks-loader .text {
    opacity: 0.9;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.tweak-divider {
    border-top: 1px dashed #3d3d3d;
    margin: 16px 0 12px;
}

.maxthisunit-overrides {
    padding: 4px 0 12px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.maxthisunit-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
    padding-left: 4px;
}

.maxthisunit-header {
    font-weight: 800;
    color: #f5f7fa;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.95em;
}

.maxthisunit-helper {
    color: #b6c3b6;
    font-size: 0.9em;
    margin-bottom: 14px;
    padding-left: 4px;
}

.maxthisunit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px 16px;
}

.maxthisunit-field {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
    align-items: center;
    color: #e1e1e1;
    padding: 12px;
    border: 1px solid #2d2d2d;
    border-radius: 8px;
    background: linear-gradient(135deg, #1a1a1a 0%, #1f1f1f 100%);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.maxthisunit-input-shell {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: stretch;
    gap: 6px;
    width: 100%;
}

.maxthisunit-title {
    display: flex;
    flex-direction: column;
    gap: 3px;
    line-height: 1.2;
}

.maxthisunit-label {
    font-size: 1em;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #e4e8ec;
}

.maxthisunit-field input[type="number"] {
    background: #141414;
    border: 1px solid var(--color-hover);
    border-radius: 6px;
    color: var(--color-text);
    padding: 9px 10px;
    font-size: 0.95em;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.maxthisunit-field input[type="number"]::-webkit-outer-spin-button,
.maxthisunit-field input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

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

.maxthisunit-field input[type="number"]:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.18);
}

.maxthisunit-field:hover {
    border-color: var(--color-accent-dark);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
    transform: translateY(-1px);
}
.maxthisunit-field.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.maxthisunit-field:hover .maxthisunit-spin {
    border-color: var(--color-accent);
    color: #f5f7fa;
}

.maxthisunit-spinner-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.maxthisunit-spin {
    background: linear-gradient(135deg, #222222 0%, #1a1a1a 100%);
    border: 1px solid #3c3c3c;
    color: #f0f0f0;
    border-radius: 4px;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 0.8em;
    line-height: 1;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.maxthisunit-spin:hover {
    background: #1f2d1f;
    border-color: var(--color-accent);
}

.maxthisunit-spin:active {
    transform: translateY(1px);
}

.maxthisunit-status {
    font-size: 0.82em;
    color: #b6c3b6;
}

.maxthisunit-status[data-state="infinity"] {
    color: #9be7b6;
}

.maxthisunit-status[data-state="custom"] {
    color: #c6e3cb;
}

.maxthisunit-badge {
    background: linear-gradient(135deg, #1a2a1a 0%, #1e2f1e 100%);
    border: 1px solid #2f3f2f;
    color: #b6d9c0;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.82em;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
