/* Final Fantasy CSS Library v2.0 - Bundled */

/* --- fonts.css --- */
/* 
  Final Fantasy CSS - Typography
  Custom fonts for authentic game aesthetics
*/
/* Google Fonts - Import for other themes */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Roboto:wght@300;400;500;700&family=Cinzel:wght@400;700&family=Rajdhani:wght@300;400;600&family=Share+Tech+Mono&display=swap');

/* FF6 Font - Already included in project */
@font-face {
  font-family: 'Final Fantasy VI';
  src: url('../FF6/fonts/final_fantasy_36_font.woff') format('woff'),
    url('../FF6/fonts/final_fantasy_36_font.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* 
  Font Stack Reference:
  - FF1: Courier New (8-bit NES style, readable)
  - FF4: 'Final Fantasy VI' (reuse, similar era)
  - FF6: 'Final Fantasy VI' (original)
  - FF7: System sans-serif (modern, clean)
  - FF8: 'Rajdhani' (tech, futuristic)
  - FF9: 'Cinzel' (fantasy, medieval)
  - FF13: 'Roboto' (modern, clean, readable)
  - FF15: 'Rajdhani' (modern, sleek)
*/


/* --- _breakpoints.css --- */
/* Breakpoint System - Mobile First */
/* Following Bootstrap 5 conventions with IE11 support */

:root {
    /* Breakpoint values */
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;

    /* Container max-widths */
    --container-sm: 540px;
    --container-md: 720px;
    --container-lg: 960px;
    --container-xl: 1140px;

    /* Spacing scale (mobile-first) */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

/* Media Query Mixins (as comments for reference) */
/*
  Mobile First Approach:
  - Base styles = mobile (0px+)
  - @media (min-width: 576px) = sm and up
  - @media (min-width: 768px) = md and up
  - @media (min-width: 992px) = lg and up
  - @media (min-width: 1200px) = xl and up
*/

/* --- core.css --- */
/* Mobile-First Core Styles - v2.0 */

:root {
  /* Responsive Typography - Mobile First */
  --font-size-base: 16px;
  /* Mobile base (was 24px) */
  --font-size-sm: 14px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;

  /* Heading sizes - Mobile */
  --h1-size: 1.75rem;
  /* 28px */
  --h2-size: 1.5rem;
  /* 24px */
  --h3-size: 1.25rem;
  /* 20px */
  --h4-size: 1.125rem;
  /* 18px */
  --h5-size: 1rem;
  /* 16px */
  --h6-size: 0.875rem;
  /* 14px */

  /* Colors */
  --text-color: #ecedee;
  --bg-color: #181820;
  --highlight-color: #edd758;

  /* Touch-friendly spacing */
  --touch-target-min: 44px;
  --spacing-touch: 8px;
}

/* Scale up typography on larger screens */
@media (min-width: 768px) {
  :root {
    --font-size-base: 18px;
    --h1-size: 2rem;
    /* 36px */
    --h2-size: 1.75rem;
    /* 31.5px */
    --h3-size: 1.5rem;
    /* 27px */
  }
}

@media (min-width: 992px) {
  :root {
    --font-size-base: 20px;
    --h1-size: 2.25rem;
    /* 45px */
    --h2-size: 2rem;
    /* 40px */
  }
}

/* Font Face */
@font-face {
  font-family: "Final Fantasy 3/6 Font Regular";
  src: url("../FF6/fonts/final_fantasy_36_font.eot?") format("eot"),
    url("../FF6/fonts/final_fantasy_36_font.woff") format("woff"),
    url("../FF6/fonts/final_fantasy_36_font.ttf") format("truetype"),
    url("../FF6/fonts/final_fantasy_36_font.svg#Final-Fantasy-3/6-Font") format("svg");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Reset & Base Styles */
html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  font-family: "Final Fantasy 3/6 Font Regular", monospace;
  color: var(--text-color);
  font-size: var(--font-size-base);
  line-height: 1.5;
  height: 100%;
  /* Prevent horizontal scroll */
  overflow-x: hidden;
  max-width: 100%;
}

* {
  box-sizing: border-box;
}

/* Responsive Typography */
h1 {
  font-size: var(--h1-size);
  margin: 0.67em 0;
}

h2 {
  font-size: var(--h2-size);
  margin: 0.75em 0;
}

h3 {
  font-size: var(--h3-size);
  margin: 0.83em 0;
}

h4 {
  font-size: var(--h4-size);
  margin: 1em 0;
}

h5 {
  font-size: var(--h5-size);
  margin: 1.17em 0;
}

h6 {
  font-size: var(--h6-size);
  margin: 1.33em 0;
}

/* Window wrapper sizing */
.ff-window,
.ff-window-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: visible;
}

.ff-window {
  max-width: 100%;
  overflow: hidden;
}

/* Ensure images/media are responsive */
img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utility Classes */
.container {
  /* Overridden by _grid.css but keeping for backwards compat */
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px;
  width: 90%;
}

.hidden {
  display: none !important;
}

/* --- Components --- */

/* Buttons - Mobile First */
.ff-btn {
  /* Mobile: Large, touch-friendly, full-width */
  display: block;
  width: 100%;
  min-height: var(--touch-target-min);
  padding: 14px 20px;

  background: transparent;
  border: none;
  color: var(--text-color);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  transition: transform 0.1s, opacity 0.2s;
  text-align: center;

  /* Prevent text selection on touch */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  /* Touch action */
  touch-action: manipulation;
}

/* Tablet and up: inline buttons */
@media (min-width: 576px) {
  .ff-btn {
    display: inline-block;
    width: auto;
    padding: 12px 18px;
  }
}

/* Desktop: compact buttons */
@media (min-width: 992px) {
  .ff-btn {
    padding: 8px 16px;
    min-height: auto;
  }
}

/* Disable hover effects on touch devices */
@media (hover: hover) and (pointer: fine) {
  .ff-btn:hover {
    transform: scale(1.05);
    color: var(--highlight-color, #edd758);
  }
}

.ff-btn:active {
  transform: scale(0.95);
}

.ff-btn:disabled,
.ff-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.ff-btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.ff-btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid var(--text-color);
  border-radius: 50%;
  border-top-color: transparent;
  animation: ff-spin 0.6s linear infinite;
}

@keyframes ff-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Badges */
.ff-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  margin-left: 5px;
  white-space: nowrap;
}

/* Progress Bars (HP/MP) - Fluid */
.ff-progress {
  width: 100%;
  max-width: 100%;
  height: 12px;
  background: #333;
  border: 1px solid #fff;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

@media (min-width: 768px) {
  .ff-progress {
    height: 10px;
  }
}

.ff-progress-bar {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}

.ff-progress.hp .ff-progress-bar {
  background: linear-gradient(to right, #ff9999, #ff0000);
}

.ff-progress.mp .ff-progress-bar {
  background: linear-gradient(to right, #99ff99, #00ff00);
}


/* --- _utilities.css --- */
/* Responsive Utility Classes - Mobile First */

/* Display utilities */
.d-none {
    display: none !important;
}

.d-inline {
    display: inline !important;
}

.d-inline-block {
    display: inline-block !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

.d-inline-flex {
    display: inline-flex !important;
}

/* Responsive display - sm (576px+) */
@media (min-width: 576px) {
    .d-sm-none {
        display: none !important;
    }

    .d-sm-inline {
        display: inline !important;
    }

    .d-sm-inline-block {
        display: inline-block !important;
    }

    .d-sm-block {
        display: block !important;
    }

    .d-sm-flex {
        display: flex !important;
    }

    .d-sm-inline-flex {
        display: inline-flex !important;
    }
}

/* Responsive display - md (768px+) */
@media (min-width: 768px) {
    .d-md-none {
        display: none !important;
    }

    .d-md-inline {
        display: inline !important;
    }

    .d-md-inline-block {
        display: inline-block !important;
    }

    .d-md-block {
        display: block !important;
    }

    .d-md-flex {
        display: flex !important;
    }

    .d-md-inline-flex {
        display: inline-flex !important;
    }
}

/* Responsive display - lg (992px+) */
@media (min-width: 992px) {
    .d-lg-none {
        display: none !important;
    }

    .d-lg-inline {
        display: inline !important;
    }

    .d-lg-inline-block {
        display: inline-block !important;
    }

    .d-lg-block {
        display: block !important;
    }

    .d-lg-flex {
        display: flex !important;
    }

    .d-lg-inline-flex {
        display: inline-flex !important;
    }
}

/* Width utilities */
.w-25 {
    width: 25% !important;
}

.w-50 {
    width: 50% !important;
}

.w-75 {
    width: 75% !important;
}

.w-100 {
    width: 100% !important;
}

.w-auto {
    width: auto !important;
}

/* Max-width utilities */
.mw-100 {
    max-width: 100% !important;
}

/* Height utilities */
.h-25 {
    height: 25% !important;
}

.h-50 {
    height: 50% !important;
}

.h-75 {
    height: 75% !important;
}

.h-100 {
    height: 100% !important;
}

.h-auto {
    height: auto !important;
}

/* Overflow utilities */
.overflow-auto {
    overflow: auto !important;
}

.overflow-hidden {
    overflow: hidden !important;
}

.overflow-visible {
    overflow: visible !important;
}

.overflow-scroll {
    overflow: scroll !important;
}

/* Overflow-x */
.overflow-x-auto {
    overflow-x: auto !important;
}

.overflow-x-hidden {
    overflow-x: hidden !important;
}

.overflow-x-visible {
    overflow-x: visible !important;
}

.overflow-x-scroll {
    overflow-x: scroll !important;
}

/* Overflow-y */
.overflow-y-auto {
    overflow-y: auto !important;
}

.overflow-y-hidden {
    overflow-y: hidden !important;
}

.overflow-y-visible {
    overflow-y: visible !important;
}

.overflow-y-scroll {
    overflow-y: scroll !important;
}

/* Flex utilities */
.flex-row {
    flex-direction: row !important;
}

.flex-column {
    flex-direction: column !important;
}

.flex-row-reverse {
    flex-direction: row-reverse !important;
}

.flex-column-reverse {
    flex-direction: column-reverse !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

.flex-nowrap {
    flex-wrap: nowrap !important;
}

.flex-wrap-reverse {
    flex-wrap: wrap-reverse !important;
}

.justify-content-start {
    justify-content: flex-start !important;
}

.justify-content-end {
    justify-content: flex-end !important;
}

.justify-content-center {
    justify-content: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.justify-content-around {
    justify-content: space-around !important;
}

.align-items-start {
    align-items: flex-start !important;
}

.align-items-end {
    align-items: flex-end !important;
}

.align-items-center {
    align-items: center !important;
}

.align-items-baseline {
    align-items: baseline !important;
}

.align-items-stretch {
    align-items: stretch !important;
}

/* Spacing utilities */
.m-0 {
    margin: 0 !important;
}

.m-1 {
    margin: 0.25rem !important;
}

.m-2 {
    margin: 0.5rem !important;
}

.m-3 {
    margin: 1rem !important;
}

.m-4 {
    margin: 1.5rem !important;
}

.m-5 {
    margin: 3rem !important;
}

.m-auto {
    margin: auto !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

.mt-auto {
    margin-top: auto !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.mb-auto {
    margin-bottom: auto !important;
}

.p-0 {
    padding: 0 !important;
}

.p-1 {
    padding: 0.25rem !important;
}

.p-2 {
    padding: 0.5rem !important;
}

.p-3 {
    padding: 1rem !important;
}

.p-4 {
    padding: 1.5rem !important;
}

.p-5 {
    padding: 3rem !important;
}

.pt-0 {
    padding-top: 0 !important;
}

.pt-1 {
    padding-top: 0.25rem !important;
}

.pt-2 {
    padding-top: 0.5rem !important;
}

.pt-3 {
    padding-top: 1rem !important;
}

.pt-4 {
    padding-top: 1.5rem !important;
}

.pt-5 {
    padding-top: 3rem !important;
}

.pb-0 {
    padding-bottom: 0 !important;
}

.pb-1 {
    padding-bottom: 0.25rem !important;
}

.pb-2 {
    padding-bottom: 0.5rem !important;
}

.pb-3 {
    padding-bottom: 1rem !important;
}

.pb-4 {
    padding-bottom: 1.5rem !important;
}

.pb-5 {
    padding-bottom: 3rem !important;
}

/* Text utilities */
.text-left {
    text-align: left !important;
}

.text-right {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

@media (min-width: 576px) {
    .text-sm-left {
        text-align: left !important;
    }

    .text-sm-right {
        text-align: right !important;
    }

    .text-sm-center {
        text-align: center !important;
    }
}

@media (min-width: 768px) {
    .text-md-left {
        text-align: left !important;
    }

    .text-md-right {
        text-align: right !important;
    }

    .text-md-center {
        text-align: center !important;
    }
}

/* Visibility utilities */
.visible {
    visibility: visible !important;
}

.invisible {
    visibility: hidden !important;
}

/* --- _grid.css --- */
/* Responsive Grid System - Flexbox (IE11 Compatible) */
/* 12-column grid following Bootstrap conventions */

/* Container */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Responsive container max-widths */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Fluid container */
.container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Row */
.row {
    display: -ms-flexbox;
    /* IE10 */
    display: flex;
    -ms-flex-wrap: wrap;
    /* IE10 */
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

/* No gutters variant */
.no-gutters {
    margin-right: 0;
    margin-left: 0;
}

.no-gutters>.col,
.no-gutters>[class*="col-"] {
    padding-right: 0;
    padding-left: 0;
}

/* Base column */
.col {
    -ms-flex-preferred-size: 0;
    /* IE10 */
    flex-basis: 0;
    -ms-flex-positive: 1;
    /* IE10 */
    flex-grow: 1;
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

/* Auto-width columns */
.col-auto {
    -ms-flex: 0 0 auto;
    /* IE10 */
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

/* Mobile-first columns (base = all sizes) */
.col-1 {
    -ms-flex: 0 0 8.333333%;
    /* IE10 */
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-2 {
    -ms-flex: 0 0 16.666667%;
    /* IE10 */
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-3 {
    -ms-flex: 0 0 25%;
    /* IE10 */
    flex: 0 0 25%;
    max-width: 25%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-4 {
    -ms-flex: 0 0 33.333333%;
    /* IE10 */
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-5 {
    -ms-flex: 0 0 41.666667%;
    /* IE10 */
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-6 {
    -ms-flex: 0 0 50%;
    /* IE10 */
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-7 {
    -ms-flex: 0 0 58.333333%;
    /* IE10 */
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-8 {
    -ms-flex: 0 0 66.666667%;
    /* IE10 */
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-9 {
    -ms-flex: 0 0 75%;
    /* IE10 */
    flex: 0 0 75%;
    max-width: 75%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-10 {
    -ms-flex: 0 0 83.333333%;
    /* IE10 */
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-11 {
    -ms-flex: 0 0 91.666667%;
    /* IE10 */
    flex: 0 0 91.666667%;
    max-width: 91.666667%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-12 {
    -ms-flex: 0 0 100%;
    /* IE10 */
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

/* Small devices (576px and up) */
@media (min-width: 576px) {
    .col-sm {
        -ms-flex-preferred-size: 0;
        flex-basis: 0;
        -ms-flex-positive: 1;
        flex-grow: 1;
        max-width: 100%;
    }

    .col-sm-auto {
        -ms-flex: 0 0 auto;
        flex: 0 0 auto;
        width: auto;
        max-width: 100%;
    }

    .col-sm-1 {
        -ms-flex: 0 0 8.333333%;
        flex: 0 0 8.333333%;
        max-width: 8.333333%;
    }

    .col-sm-2 {
        -ms-flex: 0 0 16.666667%;
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }

    .col-sm-3 {
        -ms-flex: 0 0 25%;
        flex: 0 0 25%;
        max-width: 25%;
    }

    .col-sm-4 {
        -ms-flex: 0 0 33.333333%;
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .col-sm-5 {
        -ms-flex: 0 0 41.666667%;
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }

    .col-sm-6 {
        -ms-flex: 0 0 50%;
        flex: 0 0 50%;
        max-width: 50%;
    }

    .col-sm-7 {
        -ms-flex: 0 0 58.333333%;
        flex: 0 0 58.333333%;
        max-width: 58.333333%;
    }

    .col-sm-8 {
        -ms-flex: 0 0 66.666667%;
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }

    .col-sm-9 {
        -ms-flex: 0 0 75%;
        flex: 0 0 75%;
        max-width: 75%;
    }

    .col-sm-10 {
        -ms-flex: 0 0 83.333333%;
        flex: 0 0 83.333333%;
        max-width: 83.333333%;
    }

    .col-sm-11 {
        -ms-flex: 0 0 91.666667%;
        flex: 0 0 91.666667%;
        max-width: 91.666667%;
    }

    .col-sm-12 {
        -ms-flex: 0 0 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
    .col-md {
        -ms-flex-preferred-size: 0;
        flex-basis: 0;
        -ms-flex-positive: 1;
        flex-grow: 1;
        max-width: 100%;
    }

    .col-md-auto {
        -ms-flex: 0 0 auto;
        flex: 0 0 auto;
        width: auto;
        max-width: 100%;
    }

    .col-md-1 {
        -ms-flex: 0 0 8.333333%;
        flex: 0 0 8.333333%;
        max-width: 8.333333%;
    }

    .col-md-2 {
        -ms-flex: 0 0 16.666667%;
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }

    .col-md-3 {
        -ms-flex: 0 0 25%;
        flex: 0 0 25%;
        max-width: 25%;
    }

    .col-md-4 {
        -ms-flex: 0 0 33.333333%;
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .col-md-5 {
        -ms-flex: 0 0 41.666667%;
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }

    .col-md-6 {
        -ms-flex: 0 0 50%;
        flex: 0 0 50%;
        max-width: 50%;
    }

    .col-md-7 {
        -ms-flex: 0 0 58.333333%;
        flex: 0 0 58.333333%;
        max-width: 58.333333%;
    }

    .col-md-8 {
        -ms-flex: 0 0 66.666667%;
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }

    .col-md-9 {
        -ms-flex: 0 0 75%;
        flex: 0 0 75%;
        max-width: 75%;
    }

    .col-md-10 {
        -ms-flex: 0 0 83.333333%;
        flex: 0 0 83.333333%;
        max-width: 83.333333%;
    }

    .col-md-11 {
        -ms-flex: 0 0 91.666667%;
        flex: 0 0 91.666667%;
        max-width: 91.666667%;
    }

    .col-md-12 {
        -ms-flex: 0 0 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Large devices (992px and up) */
@media (min-width: 992px) {
    .col-lg {
        -ms-flex-preferred-size: 0;
        flex-basis: 0;
        -ms-flex-positive: 1;
        flex-grow: 1;
        max-width: 100%;
    }

    .col-lg-auto {
        -ms-flex: 0 0 auto;
        flex: 0 0 auto;
        width: auto;
        max-width: 100%;
    }

    .col-lg-1 {
        -ms-flex: 0 0 8.333333%;
        flex: 0 0 8.333333%;
        max-width: 8.333333%;
    }

    .col-lg-2 {
        -ms-flex: 0 0 16.666667%;
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }

    .col-lg-3 {
        -ms-flex: 0 0 25%;
        flex: 0 0 25%;
        max-width: 25%;
    }

    .col-lg-4 {
        -ms-flex: 0 0 33.333333%;
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .col-lg-5 {
        -ms-flex: 0 0 41.666667%;
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }

    .col-lg-6 {
        -ms-flex: 0 0 50%;
        flex: 0 0 50%;
        max-width: 50%;
    }

    .col-lg-7 {
        -ms-flex: 0 0 58.333333%;
        flex: 0 0 58.333333%;
        max-width: 58.333333%;
    }

    .col-lg-8 {
        -ms-flex: 0 0 66.666667%;
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }

    .col-lg-9 {
        -ms-flex: 0 0 75%;
        flex: 0 0 75%;
        max-width: 75%;
    }

    .col-lg-10 {
        -ms-flex: 0 0 83.333333%;
        flex: 0 0 83.333333%;
        max-width: 83.333333%;
    }

    .col-lg-11 {
        -ms-flex: 0 0 91.666667%;
        flex: 0 0 91.666667%;
        max-width: 91.666667%;
    }

    .col-lg-12 {
        -ms-flex: 0 0 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Extra large devices (1200px and up) */
@media (min-width: 1200px) {
    .col-xl {
        -ms-flex-preferred-size: 0;
        flex-basis: 0;
        -ms-flex-positive: 1;
        flex-grow: 1;
        max-width: 100%;
    }

    .col-xl-auto {
        -ms-flex: 0 0 auto;
        flex: 0 0 auto;
        width: auto;
        max-width: 100%;
    }

    .col-xl-1 {
        -ms-flex: 0 0 8.333333%;
        flex: 0 0 8.333333%;
        max-width: 8.333333%;
    }

    .col-xl-2 {
        -ms-flex: 0 0 16.666667%;
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }

    .col-xl-3 {
        -ms-flex: 0 0 25%;
        flex: 0 0 25%;
        max-width: 25%;
    }

    .col-xl-4 {
        -ms-flex: 0 0 33.333333%;
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .col-xl-5 {
        -ms-flex: 0 0 41.666667%;
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }

    .col-xl-6 {
        -ms-flex: 0 0 50%;
        flex: 0 0 50%;
        max-width: 50%;
    }

    .col-xl-7 {
        -ms-flex: 0 0 58.333333%;
        flex: 0 0 58.333333%;
        max-width: 58.333333%;
    }

    .col-xl-8 {
        -ms-flex: 0 0 66.666667%;
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }

    .col-xl-9 {
        -ms-flex: 0 0 75%;
        flex: 0 0 75%;
        max-width: 75%;
    }

    .col-xl-10 {
        -ms-flex: 0 0 83.333333%;
        flex: 0 0 83.333333%;
        max-width: 83.333333%;
    }

    .col-xl-11 {
        -ms-flex: 0 0 91.666667%;
        flex: 0 0 91.666667%;
        max-width: 91.666667%;
    }

    .col-xl-12 {
        -ms-flex: 0 0 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* --- ff-button.css --- */
/* Buttons - Mobile First */
.ff-btn {
    /* Mobile: Large, touch-friendly, full-width */
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: var(--touch-target-min);
    padding: 14px 20px;
    box-sizing: border-box;

    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    transition: transform 0.1s, opacity 0.2s;
    text-align: center;
    white-space: normal;

    /* Prevent text selection on touch */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    /* Touch action */
    touch-action: manipulation;
}

/* Tablet and up: inline buttons */
@media (min-width: 576px) {
    .ff-btn {
        display: inline-block;
        width: auto;
        max-width: 100%;
        min-width: 0;
        padding: 12px 18px;
    }
}

/* Desktop: compact buttons */
@media (min-width: 992px) {
    .ff-btn {
        padding: 8px 16px;
        min-height: auto;
    }
}

/* Disable hover effects on touch devices */
@media (hover: hover) and (pointer: fine) {
    .ff-btn:hover {
        transform: scale(1.05);
        color: var(--highlight-color, #edd758);
    }
}

.ff-btn:active {
    transform: scale(0.95);
}

.ff-btn:disabled,
.ff-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

.ff-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.ff-btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid var(--text-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: ff-spin 0.6s linear infinite;
}

@keyframes ff-spin {
    to {
        transform: rotate(360deg);
    }
}


/* --- ff-badge.css --- */
/* Badges */
.ff-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    margin-left: 5px;
    white-space: nowrap;
}

/* --- ff-progress.css --- */
/* Progress Bars (HP/MP) - Fluid */
.ff-progress {
    width: 100%;
    max-width: 100%;
    height: 12px;
    background: #333;
    border: 1px solid #fff;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

@media (min-width: 768px) {
    .ff-progress {
        height: 10px;
    }
}

.ff-progress-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.ff-progress.hp .ff-progress-bar {
    background: linear-gradient(to right, #ff9999, #ff0000);
}

.ff-progress.mp .ff-progress-bar {
    background: linear-gradient(to right, #99ff99, #00ff00);
}

/* --- ff-navbar.css --- */
/* --- Navbar - True Mobile-First --- */
.ff-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  position: relative;
  z-index: 10000;
}

.ff-navbar-brand {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  z-index: 1002;
  /* Above the drawer backdrop */
}

/* 
   Mobile Drawer Menu 
   Fixed position overlay that slides in.
*/
.ff-navbar-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 75%;
  /* Drawer width */
  max-width: 300px;
  background: #1a1a2e;
  /* Fallback */
  background: var(--window-bg, linear-gradient(to bottom, #000044, #000022));
  border-left: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  padding: 60px 20px 20px 20px;
  gap: 10px;
  filter: none;
  backdrop-filter: none;
  transform: translateX(100%);
  /* Hidden by default */
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  z-index: 10001 !important;
  list-style: none;
  margin: 0;
}


/* Open state for drawer */
.ff-navbar.expanded .ff-navbar-nav {
  transform: translateX(0);
}

/* Backdrop for drawer (optional, can be added via pseudo-element on nav) */
/* Clickable backdrop helper (used when JS inserts an element instead of pseudo) */
.ff-navbar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: none;
  z-index: 9995;
}

.ff-navbar-toggle {
  display: block;
  background: none;
  border: none;
  color: inherit;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  z-index: 1002;
  /* Above drawer */
}

.ff-navbar .ff-nav-link {
  display: block;
  padding: 12px 16px;
  border-radius: 4px;
  color: var(--nav-link-color, var(--text-color, inherit));
  text-decoration: none;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.2s;
}

.ff-navbar .ff-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ff-navbar .ff-nav-link.active {
  background: rgba(255, 255, 255, 0.15);
  border-left: 4px solid var(--highlight-color, #fff);
}

/* 
   Desktop View 
   Reset to horizontal layout
*/
@media (min-width: 768px) {
  .ff-navbar-nav {
    position: static;
    width: auto;
    max-width: none;
    height: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    flex-direction: row;
    padding: 0;
    gap: 5px;
    transform: none;
    display: flex !important;
    /* Override inline style if any */
  }

  .ff-navbar.expanded::before {
    display: none;
    /* No backdrop on desktop */
  }

  .ff-navbar-toggle {
    display: none;
  }

  .ff-navbar .ff-nav-link {
    padding: 8px 12px;
    font-size: 1rem;
    border-bottom: none;
    border-radius: 4px;
  }

  .ff-navbar .ff-nav-link.active {
    border-left: none;
    background: rgba(255, 255, 255, 0.2);
  }
}


/* --- ff-breadcrumb.css --- */
/* --- Breadcrumbs --- */
.ff-breadcrumb {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    font-size: 0.9em;
}

.ff-breadcrumb-item+.ff-breadcrumb-item::before {
    content: ">";
    padding: 0 8px;
    opacity: 0.5;
}

/* --- ff-pagination.css --- */
/* --- Pagination --- */
.ff-pagination {
    /* Mobile: Centered with wrapping */
    display: flex;
    flex-direction: row;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 15px 0;
    gap: 3px;
    flex-wrap: wrap;
}

/* Desktop: Normal spacing */
@media (min-width: 577px) {
    .ff-pagination {
        justify-content: flex-start;
        gap: 5px;
    }
}

.ff-page-item {
    display: inline-block;
}

.ff-page-link {
    display: block;
    /* Mobile: Smaller padding and touch targets */
    padding: 8px 10px;
    min-width: 36px;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

/* Desktop: Larger padding */
@media (min-width: 577px) {
    .ff-page-link {
        padding: 8px 12px;
        min-width: 40px;
    }
}

.ff-page-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--highlight-color, #fff);
}

.ff-page-item.active .ff-page-link {
    background: rgba(255, 255, 255, 0.3);
    border-color: var(--highlight-color, #fff);
    font-weight: bold;
}

.ff-page-item.disabled .ff-page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- ff-card.css --- */
/* --- Cards --- */
.ff-card {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    /* Mobile default */
    margin-bottom: 15px;
    position: relative;
}

/* Desktop: more padding */
@media (min-width: 577px) {
    .ff-card {
        padding: 15px;
    }
}

.ff-card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.1em;
}

/* --- ff-accordion.css --- */
/* --- Accordion --- */
.ff-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.ff-accordion-item {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  overflow: hidden;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.ff-accordion-header {
  width: 100%;
  padding: 16px 20px;
  /* Larger touch target (approx 50px+ height) */
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-bottom: 1px solid transparent;
  color: inherit;
  text-align: left;
  font-family: inherit;
  font-size: 1.05rem;
  /* Slightly larger text */
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
  min-height: 48px;
  /* Enforce touch target size */
  word-break: break-word;
}

.ff-accordion-header:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ff-accordion-header:focus {
  outline: 2px dashed rgba(255, 255, 255, 0.5);
  outline-offset: -4px;
}

.ff-accordion-header::after {
  content: "▼";
  font-size: 0.8em;
  transition: transform 0.3s;
  opacity: 0.7;
}

.ff-accordion-item.active .ff-accordion-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.15);
}

.ff-accordion-item.active .ff-accordion-header::after {
  transform: rotate(180deg);
}

.ff-accordion-body {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 320ms cubic-bezier(.2, .9, .3, 1), padding 320ms cubic-bezier(.2, .9, .3, 1);
  background: rgba(0, 0, 0, 0.1);
  /* Slight contrast for body */
  width: 100%;
  box-sizing: border-box;
  word-break: break-word;
}

.ff-accordion-item.active .ff-accordion-body {
  padding: 20px;
  max-height: 1000px;
  /* Increased max-height to be safe */
}

/* Small screens: tighten padding to avoid overflow */
@media (max-width: 480px) {
  .ff-accordion-header {
    padding: 14px 16px;
    font-size: 1rem;
  }
  .ff-accordion-item.active .ff-accordion-body {
    padding: 12px 14px;
  }
}


/* --- ff-tabs.css --- */
/* --- Tabs (tablist + tabs + panels) --- */
.ff-tabs {
  width: 100%;
}

/* 
   Mobile First Tab List 
   Horizontal scrolling container
*/
.ff-tablist {
  display: flex;
  flex-wrap: nowrap;
  /* Prevent wrapping */
  overflow-x: auto;
  /* Enable horizontal scroll */
  -webkit-overflow-scrolling: touch;
  /* Smooth scroll on iOS */
  gap: 8px;
  list-style: none;
  padding: 0 4px 8px 4px;
  /* Padding for scrollbar space/touch */
  margin: 0 0 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);

  /* Hide scrollbar for cleaner look (optional, but good for "app" feel) */
  scrollbar-width: none;
  /* Firefox */
}

.ff-tablist::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.ff-tab {
  flex: 0 0 auto;
  /* Don't shrink */
  padding: 10px 16px;
  /* Larger touch target */
  cursor: pointer;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  background: transparent;
  white-space: nowrap;
  font-size: 1rem;
  color: inherit;
  transition: background 0.2s, border-color 0.2s;
}

.ff-tab[aria-selected="true"],
.ff-tab.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.06);
  border-bottom-color: var(--highlight-color, #fff);
  font-weight: bold;
}

.ff-tabpanel {
  display: none;
  padding: 12px 0;
  animation: fadeIn 0.3s ease;
}

.ff-tabpanel[hidden="false"],
.ff-tabpanel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* keyboard focus ring */
.ff-tab:focus {
  outline: 2px dashed rgba(255, 255, 255, 0.15);
  outline-offset: -2px;
}

/* Desktop enhancements */
@media (min-width: 768px) {
  .ff-tab {
    padding: 8px 16px;
    /* Slightly more compact on desktop */
  }
}

/* --- ff-modal.css --- */
/* --- Modals - Native <dialog> --- */

dialog.ff-modal {
    padding: 0;
    border: none;
    background: transparent;
    /* Mobile: Fullscreen by default */
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    color: inherit;
    position: fixed;
    inset: 0;
}

/* Desktop: Sized modals */
@media (min-width: 577px) {
    dialog.ff-modal {
        max-width: 500px;
        width: 95%;
        height: auto;
        margin: auto;
    }
}

/* Backdrop styling */
dialog.ff-modal::backdrop {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: none;
}

/* Animation for open state */
dialog.ff-modal[open] {
    animation: modalFadeIn 0.3s ease-out forwards;
}

dialog.ff-modal[open]::backdrop {
    animation: backdropFadeIn 0.3s ease-out forwards;
}

/* Closing animation class (applied via JS before close) */
dialog.ff-modal.closing {
    animation: modalFadeOut 0.2s ease-in forwards;
}

dialog.ff-modal.closing::backdrop {
    animation: backdropFadeOut 0.2s ease-in forwards;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes backdropFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

@keyframes backdropFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* Fullscreen variant for mobile */
dialog.ff-modal-fullscreen-sm .ff-window-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

dialog.ff-modal-fullscreen-sm .ff-modal-body {
    flex: 1;
    overflow-y: auto;
}

/* Header & Close Button */
.ff-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.ff-close-btn {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
}

.ff-close-btn:hover {
    opacity: 1;
}

/* Modal surface tokens: themed via inheriting background/border/text */
.ff-modal-surface {
    background: var(--content-bg-gradient, rgba(0, 0, 0, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.theme-ff1 .ff-modal-surface {
    background: var(--content-bg-gradient, #0000bc);
    border: 3px solid #fff;
    box-shadow: none;
    color: #fff;
}

.theme-ff4 .ff-modal-surface {
    background: var(--content-bg-gradient, linear-gradient(to bottom, #000080 0%, #000040 100%));
    border: 2px solid #a0a0a0;
}

.theme-ff6 .ff-modal-surface {
    background: var(--content-bg-gradient, #21217c);
    border: 1px solid #555;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.theme-ff7 .ff-modal-surface {
    background: var(--content-bg-gradient, linear-gradient(to bottom, #002040, #001020));
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-ff8 .ff-modal-surface {
    background: var(--content-bg-gradient, linear-gradient(to bottom, #2a2a2a 0%, #1a1a1a 100%));
    border: 1px solid #777;
}

.theme-ff9 .ff-modal-surface {
    background: var(--content-bg-gradient, linear-gradient(to bottom, #505060, #303040));
    border: 2px solid #6a6a7a;
    color: #f7f2e8;
}

.theme-ff13 .ff-modal-surface {
    background: var(--content-bg-gradient, rgba(255, 255, 255, 0.95));
    border: 1px solid rgba(160, 192, 224, 0.4);
    color: #1a1a1a;
}

.theme-ff15 .ff-modal-surface {
    background: var(--content-bg-gradient, rgba(10, 10, 15, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}


/* --- ff-alert.css --- */
/* --- Alerts --- */
.ff-alert {
    padding: 10px 15px;
    margin-bottom: 15px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ff-alert-info {
    border-color: #00d0ff;
    background: rgba(0, 208, 255, 0.1);
}

.ff-alert-warning {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.ff-alert-danger {
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

/* --- ff-toast.css --- */
/* --- Toast --- */
.ff-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1070;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.ff-toast {
  width: 350px;
  max-width: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  background-clip: padding-box;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  opacity: 0;
  transform: translateX(20px) scale(.995);
  transition: opacity 360ms cubic-bezier(.2,.9,.3,1), transform 360ms cubic-bezier(.2,.9,.3,1);
  pointer-events: auto;
}

.ff-toast.show {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.ff-toast-header {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  color: inherit;
  background-color: rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-top-left-radius: calc(4px - 1px);
  border-top-right-radius: calc(4px - 1px);
}

.ff-toast-body {
  padding: 12px;
}

.ff-toast-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1.2em;
  cursor: pointer;
  opacity: 0.7;
  line-height: 1;
}

.ff-toast-close:hover {
  opacity: 1;
}

/* --- ff-popover.css --- */
/* --- Popover --- */
.ff-popover {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1060;
  display: block;
  max-width: 276px;
  font-family: inherit;
  font-style: normal;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  text-decoration: none;
  text-shadow: none;
  text-transform: none;
  letter-spacing: normal;
  word-break: normal;
  word-spacing: normal;
  white-space: normal;
  line-break: auto;
  font-size: 0.875rem;
  word-wrap: break-word;
  background-color: rgba(0, 0, 0, 0.9);
  background-clip: padding-box;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  /* Animations: use opacity + transform so shows can animate smoothly */
  opacity: 0;
  transform: translateY(-6px) scale(0.995);
  transition: opacity 220ms cubic-bezier(.2,.9,.3,1), transform 220ms cubic-bezier(.2,.9,.3,1);
  pointer-events: none;
}

.ff-popover-header {
  padding: 8px 12px;
  margin-bottom: 0;
  font-size: 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  border-top-left-radius: calc(4px - 1px);
  border-top-right-radius: calc(4px - 1px);
}

.ff-popover-body {
  padding: 8px 12px;
  color: inherit;
}

.ff-popover-arrow {
  position: absolute;
  display: block;
  width: 1rem;
  height: 0.5rem;
  margin: 0 0.3rem;
}

.ff-popover-arrow::before,
.ff-popover-arrow::after {
  position: absolute;
  display: block;
  content: "";
  border-color: transparent;
  border-style: solid;
}

/* Show state (component-level) - themes may control visibility but this provides the animation hook */
.ff-popover.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Simple arrow implemented via pseudo-element when an arrow element is present */
.ff-popover .ff-popover-arrow {
  left: 12px;
  top: -6px;
}
.ff-popover .ff-popover-arrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: rgba(0,0,0,0.95) transparent transparent transparent;
}
.ff-popover .ff-popover-arrow::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 1px;
  border-width: 5px 5px 0 5px;
  border-style: solid;
  border-color: rgba(255,255,255,0.05) transparent transparent transparent;
}

/* --- ff-tooltip.css --- */
/* --- Tooltips --- */
.ff-tooltip {
    position: relative;
    display: inline-block;
}

.ff-tooltip-text {
    visibility: hidden;
    position: absolute;
    z-index: 1001;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    font-size: 0.85em;
    opacity: 0;
    transition: opacity 0.2s;
}

.ff-tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.95) transparent transparent transparent;
}

.ff-tooltip:hover .ff-tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* --- ff-spinner.css --- */
/* --- Spinner --- */
.ff-spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: text-bottom;
  border: 0.25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ff-spinner-border .75s linear infinite;
}

.ff-spinner-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.2em;
}

@keyframes ff-spinner-border {
  to {
    transform: rotate(360deg);
  }
}

.ff-spinner-grow {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: text-bottom;
  background-color: currentColor;
  border-radius: 50%;
  opacity: 0;
  animation: ff-spinner-grow .75s linear infinite;
}

.ff-spinner-grow-sm {
  width: 1rem;
  height: 1rem;
}

@keyframes ff-spinner-grow {
  0% {
    transform: scale(0);
  }

  50% {
    opacity: 1;
    transform: none;
  }
}

/* --- ff-table.css --- */
/* --- Tables - True Mobile-First --- */

/*
   Mobile Default: Card View
   We hide the thead and render rows as block-level cards.
*/
.ff-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  margin-bottom: 15px;
  display: block;
  /* Table becomes block for cards */
  border: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

.ff-table thead {
  display: none;
  /* Hide headers on mobile */
}

.ff-table tbody {
  display: block;
  width: 100%;
}

.ff-table tr {
  display: block;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  overflow: hidden;
  width: 100%;
}

.ff-table td {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: right;
  min-height: 44px;
  /* Touch target size */
  box-sizing: border-box;
  max-width: 100%;
  gap: 8px;
  word-break: break-word;
  white-space: normal;
  flex-wrap: wrap;
}

.ff-table td:last-child {
  border-bottom: none;
}

/*
   Data Label Injection
   Use data-label attribute on td to show column name on mobile
*/
.ff-table td::before {
  content: attr(data-label);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.85em;
  margin-right: 0.75rem;
  text-align: left;
  color: var(--highlight-color, #edd758);
  flex-shrink: 0;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  align-self: center;
}

/* Striped variant for cards */
.ff-table-striped tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.05);
}

/*
   Desktop View: Standard Table
   Restores table layout on screens larger than 768px
*/
@media (min-width: 768px) {
  .ff-table {
    display: table;
    background: rgba(0, 0, 0, 0.2);
    border: none;
  }

  .ff-table thead {
    display: table-header-group;
  }

  .ff-table tbody {
    display: table-row-group;
  }

  .ff-table tr {
    display: table-row;
    margin-bottom: 0;
    border: none;
    background: transparent;
    box-shadow: none;
  }

  .ff-table th,
  .ff-table td {
    display: table-cell;
    padding: 12px 16px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: auto;
  }

  .ff-table td::before {
    display: none;
    /* Hide data labels on desktop */
  }

  .ff-table th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: bold;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* Hover effects */
  .ff-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .ff-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.1);
  }

  .ff-table-striped tbody tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.02);
  }

  .ff-table-striped tbody tr:nth-child(even) {
    background: transparent;
  }
}

/* Wrapper for horizontal scroll if needed (mostly legacy support now) */
.ff-table-wrapper {
  width: 100%;
  margin-bottom: 15px;
}

/* Small text on very small screens */
@media (max-width: 480px) {

  .ff-table th,
  .ff-table td {
    padding: 10px 10px;
    font-size: 0.9em;
  }

  .ff-table th {
    font-size: 0.85em;
  }

  .ff-table tr {
    margin-bottom: 0.75rem;
  }

  .ff-table {
    overflow-x: hidden;
  }

  .ff-table td {
    flex-wrap: nowrap;
  }
}


/* --- ff-list-group.css --- */
/* --- List Groups --- */
.ff-list-group {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.ff-list-group-item {
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.ff-list-group-item:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.ff-list-group-item:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.ff-list-group-item.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--highlight-color, #fff);
    font-weight: bold;
}

.ff-list-group-item:hover {
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transform: translateX(5px);
    border-left: 3px solid var(--highlight-color, #fff);
    padding-left: 12px;
}

/* --- ff-avatar.css --- */
/* --- Avatar --- */
.ff-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  font-weight: bold;
  font-size: 1.2em;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 40px;
  min-height: 40px;
}

.ff-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sizes */
.ff-avatar.sm {
  width: 24px;
  height: 24px;
  font-size: 0.8em;
}

.ff-avatar.lg {
  width: 64px;
  height: 64px;
  font-size: 1.5em;
  min-width: 64px;
  min-height: 64px;
}

.ff-avatar.square {
  border-radius: 4px;
}

/* Status Indicator */
.ff-avatar-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.5);
}

.ff-avatar-status.online {
  background-color: #2ecc71;
}

.ff-avatar-status.offline {
  background-color: #95a5a6;
}

.ff-avatar-status.busy {
  background-color: #e74c3c;
}


/* --- ff-chips.css --- */
/* --- Chips / Tags / Pills --- */
.ff-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.ff-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: inherit;
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 0.9em;
}

.ff-chip .ff-chip-label {
  display: inline-block;
}

.ff-chip .ff-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.03);
  cursor: pointer;
  font-size: 0.85em;
  line-height: 1;
}

.ff-chip--accent {
  background: linear-gradient(to bottom, rgba(120,176,255,0.14), rgba(120,176,255,0.06));
  border-color: rgba(120,176,255,0.2);
}

.ff-chip--small {
  padding: 4px 8px;
  font-size: 0.8em;
}

.ff-chip--outline {
  background: transparent;
}


/* --- ff-forms.css --- */
/* Form Inputs - Mobile First */

/* Text inputs, selects, textareas */
.ff-input,
.ff-select,
.ff-textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    font-size: 16px;
    /* Prevents iOS zoom */
    font-family: inherit;
    color: inherit;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    min-height: 44px;
    /* Touch target */
}

@media (min-width: 768px) {

    .ff-input,
    .ff-select {
        max-width: 400px;
        /* Constrain on desktop */
    }

    .ff-input,
    .ff-select,
    .ff-textarea {
        font-size: 1rem;
        /* Can be smaller on desktop */
    }
}

.ff-input:focus,
.ff-select:focus,
.ff-textarea:focus {
    outline: 2px solid var(--highlight-color, #fff);
    outline-offset: 2px;
    border-color: var(--highlight-color, #fff);
}

.ff-input:disabled,
.ff-select:disabled,
.ff-textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Checkboxes and Radios - Touch Friendly */
.ff-form-check {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    min-height: 44px;
    /* Touch target */
}

.ff-form-check-input {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    /* Prevent squishing */
}

.ff-form-check-label {
    cursor: pointer;
    user-select: none;
    line-height: 1.5;
    display: flex;
    align-items: center;
}

/* Custom checkbox styling */
input[type="checkbox"].ff-form-check-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    position: relative;
}

input[type="checkbox"].ff-form-check-input:checked {
    background: var(--highlight-color, #fff);
    border-color: var(--highlight-color, #fff);
}

input[type="checkbox"].ff-form-check-input:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 14px;
    font-weight: bold;
}

/* Custom radio styling */
input[type="radio"].ff-form-check-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: relative;
}

input[type="radio"].ff-form-check-input:checked {
    border-color: var(--highlight-color, #fff);
}

input[type="radio"].ff-form-check-input:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--highlight-color, #fff);
    border-radius: 50%;
}

/* Focus states for accessibility */
input[type="checkbox"].ff-form-check-input:focus,
input[type="radio"].ff-form-check-input:focus {
    outline: 2px solid var(--highlight-color, #fff);
    outline-offset: 2px;
}

/* Form groups */
.ff-form-group {
    margin-bottom: 20px;
}

.ff-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

/* Helper text */
.ff-form-text {
    font-size: 0.875em;
    opacity: 0.7;
    margin-top: 4px;
}

/* Validation states */
.ff-input.is-invalid,
.ff-select.is-invalid,
.ff-textarea.is-invalid {
    border-color: #ff4444;
}

.ff-input.is-valid,
.ff-select.is-valid,
.ff-textarea.is-valid {
    border-color: #44ff44;
}

.ff-invalid-feedback {
    color: #ff4444;
    font-size: 0.875em;
    margin-top: 4px;
}

.ff-valid-feedback {
    color: #44ff44;
    font-size: 0.875em;
    margin-top: 4px;
}

/* --- ff-input-group.css --- */
/* --- Input Groups --- */
.ff-input-group {
  /* Mobile: Stack vertically by default */
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 10px;
}

.ff-input-group-text {
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: inherit;
  white-space: nowrap;
  text-align: center;
}

.ff-input-group input,
.ff-input-group select,
.ff-input-group textarea {
  flex: 1;
  min-width: 0;
}

/* Desktop: Horizontal layout */
@media (min-width: 577px) {
  .ff-input-group {
    flex-direction: row;
  }

  .ff-input-group.ff-responsive {
    flex-direction: column;
  }
}

/* Input prepend/append */
.ff-input-group-prepend,
.ff-input-group-append {
  display: flex;
}

.ff-input-group-prepend+input,
.ff-input-group-prepend+select {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.ff-input-group-append {
  margin-left: -1px;
}

input+.ff-input-group-append,
select+.ff-input-group-append {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* --- ff-dropdown.css --- */
/* --- Dropdowns --- */
.ff-dropdown {
    position: relative;
    display: inline-block;
}

.ff-dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.ff-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10020;
    min-width: 160px;
    padding: 5px 0;
    margin: 2px 0 0;
    list-style: none;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: none;
}

.ff-dropdown-menu.ff-dropdown-portal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    margin: 0;
    width: 100%;
    max-width: 100%;
    display: block !important;
}

.ff-dropdown.show .ff-dropdown-menu {
    display: block;
}

.ff-dropdown-item {
    display: block;
    padding: 8px 15px;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.ff-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ff-dropdown-divider {
    height: 1px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.1);
}

/* Clickable backdrop for mobile sheet */
.ff-dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10010;
}

/* Mobile Bottom Sheet */
@media (max-width: 576px) {
    .ff-dropdown.show .ff-dropdown-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        margin: 0;
        z-index: 10020;
        border-radius: 12px 12px 0 0;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-bottom: none;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
        animation: slideUp 0.3s ease-out;
        max-height: 60vh;
        overflow-y: auto;
        padding-bottom: 20px;
        /* Safe area */
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    /* Larger touch targets for mobile */
    .ff-dropdown-item {
        padding: 12px 20px;
        font-size: 1.1em;
    }
}


/* --- ff-battle-menu.css --- */
/* --- Battle Menu (ATB) --- */
.ff-battle-menu {
    margin-top: 10px;
}

.ff-atb-gauge {
    height: 10px;
    background: #333;
    border: 1px solid #777;
    margin-bottom: 10px;
    border-radius: 2px;
    overflow: hidden;
}

.ff-atb-bar {
    height: 100%;
    background: linear-gradient(to right, #888, #fff);
    width: 0%;
    transition: width 0.5s linear;
    animation: atb-fill 3s infinite linear;
}

@keyframes atb-fill {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* --- ff-materia.css --- */
/* --- Materia Slots (FF7) --- */
.ff-materia-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.ff-materia-slots {
    display: flex;
    align-items: center;
    background: #222;
    padding: 5px;
    border-radius: 20px;
    box-shadow: inset 0 0 5px #000;
    gap: 5px;
}

.ff-materia-slots.linked {
    gap: 15px;
    /* Space for link */
    position: relative;
}

.ff-materia-slots.linked::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 4px;
    background: #555;
    z-index: 0;
}

.ff-materia-slot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #111;
    box-shadow: inset 0 0 3px #000;
    border: 1px solid #444;
    position: relative;
    z-index: 1;
}

.ff-materia-slot.filled-green {
    background: radial-gradient(circle at 30% 30%, #8f8, #060);
    box-shadow: 0 0 5px #0f0;
}

.ff-materia-slot.filled-blue {
    background: radial-gradient(circle at 30% 30%, #88f, #006);
    box-shadow: 0 0 5px #00f;
}

.ff-materia-slot.filled-red {
    background: radial-gradient(circle at 30% 30%, #f88, #600);
    box-shadow: 0 0 5px #f00;
}

.ff-materia-slot.filled-yellow {
    background: radial-gradient(circle at 30% 30%, #ff8, #660);
    box-shadow: 0 0 5px #ff0;
}

.ff-materia-slot.filled-purple {
    background: radial-gradient(circle at 30% 30%, #f8f, #606);
    box-shadow: 0 0 5px #f0f;
}

/* --- ff-junction.css --- */
/* --- Junction Display (FF8) --- */
.ff-junction-display {
    margin-top: 10px;
    font-family: sans-serif;
    /* Tech font usually */
}

.ff-junction-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ff-junction-stat {
    color: #aaa;
}

.ff-junction-spell {
    color: #fff;
    text-shadow: 0 0 2px #fff;
}

/* --- ff1.css --- */
/* FF1 Theme Variables (NES Style) */
.theme-ff1 {
    --window-border-radius: 4px;
    --window-bg-color: #000000;

    /* Solid Blue Background (No gradient for authentic NES feel) */
    --content-bg-gradient: #0000bc;

    --border-color-outer: #ffffff;
    --border-color-inner: #ffffff;

    --highlight-color: #fcfc30;
    /* Classic NES yellow cursor */
    --font-family: 'Courier New', 'Consolas', monospace;
    --text-shadow-color: #000;
}

.theme-ff1 {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.5;
    font-weight: bold;
}

/* Navbar / drawer */
.theme-ff1 .ff-navbar {
    background: var(--content-bg-gradient);
    border: 3px solid var(--border-color-outer);
    box-shadow: none;
    font-family: var(--font-family);
}

.theme-ff1 .ff-navbar-nav {
    background: var(--content-bg-gradient);
    border-left: 3px solid var(--border-color-outer);
    box-shadow: none;
}

.theme-ff1 .ff-navbar .ff-nav-link {
    color: var(--border-color-outer);
    font-family: var(--font-family);
}

.theme-ff1 .ff-navbar .ff-nav-link.active {
    background: var(--highlight-color);
    color: #000;
    border-left: 3px solid var(--border-color-outer);
}

.theme-ff1 .ff-window {
    border-radius: var(--window-border-radius);
    padding: 4px;
    background: #000;
    border: 4px solid #fff;
    /* Thick white border */
    box-shadow: none;
    image-rendering: pixelated;
}

.theme-ff1 .ff-window-content {
    background: var(--content-bg-gradient);
    padding: 15px;
    border: none;
}

/* --- FF1 Component Overrides --- */

/* Sliders: Simple 8-bit style */
.theme-ff1 input[type=range].ff-range::-webkit-slider-runnable-track {
    background: #0000bc;
    border: 2px solid #fff;
    height: 8px;
}

.theme-ff1 input[type=range].ff-range::-webkit-slider-thumb {
    background: #fcfc30;
    border: 2px solid #fff;
    border-radius: 0;
    width: 16px;
    height: 16px;
    margin-top: -6px;
}

/* Navs */
/* FF1 Theme Variables (NES Style) */
.theme-ff1 {
    --window-border-radius: 4px;
    --window-bg-color: #000000;

    /* Solid Blue Background (No gradient for authentic NES feel) */
    --content-bg-gradient: #0000bc;

    --border-color-outer: #ffffff;
    --border-color-inner: #ffffff;

    --highlight-color: #fcfc30;
    /* Classic NES yellow cursor */
    --font-family: 'Courier New', 'Consolas', monospace;
    --text-shadow-color: #000;
}

.theme-ff1 {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.5;
    font-weight: bold;
}

.theme-ff1 .ff-window {
    border-radius: var(--window-border-radius);
    padding: 4px;
    background: #000;
    border: 4px solid #fff;
    /* Thick white border */
    box-shadow: none;
    image-rendering: pixelated;
}

.theme-ff1 .ff-window-content {
    background: var(--content-bg-gradient);
    padding: 15px;
    border: none;
}

/* --- FF1 Component Overrides --- */

/* Sliders: Simple 8-bit style */
.theme-ff1 input[type=range].ff-range::-webkit-slider-runnable-track {
    background: #0000bc;
    border: 2px solid #fff;
    height: 8px;
}

.theme-ff1 input[type=range].ff-range::-webkit-slider-thumb {
    background: #fcfc30;
    border: 2px solid #fff;
    border-radius: 0;
    width: 16px;
    height: 16px;
    margin-top: -6px;
}

/* Navs */
.theme-ff1 .ff-nav-link.active {
    background: #fcfc30;
    color: #000;
    border: 2px solid #fff;
}

/* Cards */
.theme-ff1 .ff-card {
    border: 3px solid #fff;
    background: #0000bc;
}

/* Dropdowns */
.theme-ff1 .ff-dropdown-menu {
    background: #0000bc;
    border: 3px solid #fff;
    box-shadow: none;
    border-radius: 0;
}

.theme-ff1 .ff-dropdown-item:hover {
    background: #fcfc30;
    color: #000;
}

/* Tooltips */
.theme-ff1 .ff-tooltip-text {
    background: #0000bc;
    border: 2px solid #fff;
    border-radius: 0;
}

.theme-ff1 .ff-tooltip-text::after {
    border-color: #0000bc transparent transparent transparent;
}

/* List Groups */
.theme-ff1 .ff-list-group-item {
    border: 2px solid #fff;
    margin-bottom: -2px;
    /* Overlap borders */
    border-radius: 0 !important;
}

.theme-ff1 .ff-list-group-item.active {
    background: #fcfc30;
    color: #000;
    border-color: #fff;
}

/* Pagination */
.theme-ff1 .ff-page-link {
    background: #0000bc;
    border: 2px solid #fff;
    color: #fff;
    border-radius: 0;
}

.theme-ff1 .ff-page-link:hover,
.theme-ff1 .ff-page-item.active .ff-page-link {
    background: #fcfc30;
    color: #000;
    border-color: #fff;
}

/* Modals */
.theme-ff1 .ff-modal .ff-window {
    border: 4px solid #fff;
    box-shadow: none;
}

/* Alerts */
.theme-ff1 .ff-alert {
    border: 2px solid #fff;
    background: #0000bc;
}


/* --- ff4.css --- */
/* FF4 Theme Variables (SNES Style) */
.theme-ff4 {
    --window-border-radius: 8px;
    --window-bg-color: #000000;

    /* Deep Blue Gradient */
    --content-bg-gradient: linear-gradient(to bottom, #000080 0%, #000040 100%);

    --border-color-outer: #e0e0e0;
    --border-color-inner: #a0a0a0;

    --highlight-color: #ffffff;
    --font-family: 'Final Fantasy VI', 'Georgia', serif;
}

.theme-ff4 {
    font-family: var(--font-family);
    font-size: 18px;
    line-height: 1.6;
    letter-spacing: -0.5px;
    /* Tighten spacing for CRT effect */
}

/* Navbar / drawer */
.theme-ff4 .ff-navbar {
    background: var(--content-bg-gradient);
    border: 1px solid var(--border-color-outer);
    box-shadow: none;
    font-family: var(--font-family);
}

.theme-ff4 .ff-navbar-nav {
    background: var(--content-bg-gradient);
    border-left: 2px solid var(--border-color-inner);
    box-shadow: none;
}

.theme-ff4 .ff-navbar .ff-nav-link {
    color: #f8f8ff;
    font-family: var(--font-family);
}

.theme-ff4 .ff-navbar .ff-nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    border-left: 3px solid var(--highlight-color);
}

.theme-ff4 .ff-window {
    border-radius: var(--window-border-radius);
    padding: 4px;
    background: #fff;
    border: 3px solid #a0a0a0;
    /* Checkered/Marble border simulation */
    box-shadow:
        0 0 0 2px #505050,
        inset 0 0 0 2px #505050;
}

.theme-ff4 .ff-window-content {
    background: var(--content-bg-gradient);
    padding: 15px;
    border: 1px solid #fff;
    border-radius: 4px;
}

/* --- FF4 Component Overrides --- */

/* Sliders: SNES style */
.theme-ff4 input[type=range].ff-range::-webkit-slider-runnable-track {
    background: #000040;
    border: 1px solid #a0a0a0;
    height: 6px;
}

.theme-ff4 input[type=range].ff-range::-webkit-slider-thumb {
    background: #fff;
    border: 1px solid #505050;
    width: 14px;
    height: 14px;
    margin-top: -5px;
}

/* FF4 Theme Variables (SNES Style) */
.theme-ff4 {
    --window-border-radius: 8px;
    --window-bg-color: #000000;

    /* Deep Blue Gradient */
    --content-bg-gradient: linear-gradient(to bottom, #000080 0%, #000040 100%);

    --border-color-outer: #e0e0e0;
    --border-color-inner: #a0a0a0;

    --highlight-color: #ffffff;
    --font-family: 'Final Fantasy VI', 'Georgia', serif;
}

.theme-ff4 {
    font-family: var(--font-family);
    font-size: 18px;
    line-height: 1.6;
    letter-spacing: -0.5px;
    /* Tighten spacing for CRT effect */
}

.theme-ff4 .ff-window {
    border-radius: var(--window-border-radius);
    padding: 4px;
    background: #fff;
    border: 3px solid #a0a0a0;
    /* Checkered/Marble border simulation */
    box-shadow:
        0 0 0 2px #505050,
        inset 0 0 0 2px #505050;
}

.theme-ff4 .ff-window-content {
    background: var(--content-bg-gradient);
    padding: 15px;
    border: 1px solid #fff;
    border-radius: 4px;
}

/* --- FF4 Component Overrides --- */

/* Sliders: SNES style */
.theme-ff4 input[type=range].ff-range::-webkit-slider-runnable-track {
    background: #000040;
    border: 1px solid #a0a0a0;
    height: 6px;
}

.theme-ff4 input[type=range].ff-range::-webkit-slider-thumb {
    background: #fff;
    border: 1px solid #505050;
    width: 14px;
    height: 14px;
    margin-top: -5px;
}

/* Navs */
.theme-ff4 .ff-nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    border-bottom: 2px solid #fff;
}

/* Cards */
.theme-ff4 .ff-card {
    border: 2px solid #a0a0a0;
    background: rgba(0, 0, 64, 0.8);
}

.theme-ff4 .ff-nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    border-bottom: 2px solid #fff;
}

/* Dropdowns */
.theme-ff4 .ff-dropdown-menu {
    background: #000040;
    background: linear-gradient(to bottom, #000080 0%, #000040 100%);
    border: 2px solid #a0a0a0;
    box-shadow: 0 0 0 1px #505050, inset 0 0 0 1px #505050;
    border-radius: 4px;
}

.theme-ff4 .ff-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Tooltips */
.theme-ff4 .ff-tooltip-text {
    background: #000040;
    border: 2px solid #a0a0a0;
    border-radius: 4px;
}

.theme-ff4 .ff-tooltip-text::after {
    border-color: #000040 transparent transparent transparent;
}

/* List Groups */
.theme-ff4 .ff-list-group-item {
    border-color: #a0a0a0;
}

.theme-ff4 .ff-list-group-item.active {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.2), transparent);
    border-color: #fff;
}

/* Pagination */
.theme-ff4 .ff-page-link {
    background: #000040;
    border-color: #a0a0a0;
    border-radius: 4px;
}

.theme-ff4 .ff-page-link:hover,
.theme-ff4 .ff-page-item.active .ff-page-link {
    background: #000080;
    border-color: #fff;
}

/* Modals */
.theme-ff4 .ff-modal .ff-window {
    box-shadow: 0 0 0 2px #505050;
}

/* Alerts */
.theme-ff4 .ff-alert {
    border: 2px solid #a0a0a0;
    background: rgba(0, 0, 64, 0.8);
}


/* --- ff6.css --- */
/* FF6 Theme Variables */
.theme-ff6 {
    --window-border-radius: 5px;
    --window-bg-color: #21217c;

    /* Gradients for the complex border */
    --border-gradient-corners: #6b6e87, #71767e, #c2c1c5, #c9c9cb, #ccc9cc, #c8c4c0, #7c7874, #c0bcb3;
    --border-gradient-sides: #6b6e87, #71767e, #c2c1c5, #c9c9cb, #ccc9cc, #c8c4c0, #7c7874, #c0bcb3;

    /* Inner content background */
    --content-bg-gradient: linear-gradient(to bottom, #6d6db3, #5554ad, #5352a8, #3f4791, #354783, #32348d, #32328a, #313188, #222279, #14156d, #02045a, #040233, #020134, #020134);

    --highlight-color: #edd758;
    --font-family: 'Final Fantasy VI', 'Georgia', serif;
}

.theme-ff6 {
    font-family: var(--font-family);
    font-size: 18px;
    line-height: 1.6;
    letter-spacing: -0.5px;
    /* Tighten spacing for CRT effect */
}

/* Navbar / drawer */
.theme-ff6 .ff-navbar {
    background: var(--content-bg-gradient);
    border: 1px solid #555;
    box-shadow: none;
    font-family: var(--font-family);
}

.theme-ff6 .ff-navbar-nav {
    background: var(--content-bg-gradient);
    border-left: 2px solid var(--highlight-color);
    box-shadow: none;
}

.theme-ff6 .ff-navbar .ff-nav-link {
    color: #ecedee;
    font-family: var(--font-family);
}

.theme-ff6 .ff-navbar .ff-nav-link.active {
    background: rgba(237, 215, 88, 0.2);
    border-left: 3px solid var(--highlight-color);
}

.theme-ff6 .ff-window {
    border-radius: var(--window-border-radius);
    padding: calc(var(--window-border-radius) + 5px);
    background:
        /* Corners */
        radial-gradient(farthest-side at bottom right, var(--border-gradient-corners)) top left / var(--window-border-radius) var(--window-border-radius),
        radial-gradient(farthest-side at top right, var(--border-gradient-corners)) bottom left / var(--window-border-radius) var(--window-border-radius),
        radial-gradient(farthest-side at bottom left, var(--border-gradient-corners)) top right / var(--window-border-radius) var(--window-border-radius),
        radial-gradient(farthest-side at top left, var(--border-gradient-corners)) bottom right / var(--window-border-radius) var(--window-border-radius),
        /* Borders */
        linear-gradient(to top, var(--border-gradient-sides)) top / calc(100% - 2 * var(--window-border-radius)) var(--window-border-radius),
        linear-gradient(to bottom, var(--border-gradient-sides)) bottom / calc(100% - 2 * var(--window-border-radius)) var(--window-border-radius),
        linear-gradient(to right, var(--border-gradient-sides)) right / var(--window-border-radius) calc(100% - 2 * var(--window-border-radius)),
        linear-gradient(to left, var(--border-gradient-sides)) left / var(--window-border-radius) calc(100% - 2 * var(--window-border-radius));
    background-repeat: no-repeat;
    box-shadow: 0 0 0 1px #000;
    /* Outer black line */
    position: relative;
}

.theme-ff6 .ff-window-content {
    background: var(--content-bg-gradient);
    padding: 15px;
    border: 1px solid #555;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    /* Inner border effect */
}

/* --- FF6 Component Overrides --- */

/* Sliders: Classic grey style */
.theme-ff6 input[type=range].ff-range::-webkit-slider-runnable-track {
    background: #444;
    border: 1px solid #888;
    height: 6px;
}

.theme-ff6 input[type=range].ff-range::-webkit-slider-thumb {
    background: #edd758;
    border: 1px solid #fff;
    width: 12px;
    height: 12px;
    margin-top: -4px;
}

/* FF6 Theme Variables */
.theme-ff6 {
    --window-border-radius: 5px;
    --window-bg-color: #21217c;

    /* Gradients for the complex border */
    --border-gradient-corners: #6b6e87, #71767e, #c2c1c5, #c9c9cb, #ccc9cc, #c8c4c0, #7c7874, #c0bcb3;
    --border-gradient-sides: #6b6e87, #71767e, #c2c1c5, #c9c9cb, #ccc9cc, #c8c4c0, #7c7874, #c0bcb3;

    /* Inner content background */
    --content-bg-gradient: linear-gradient(to bottom, #6d6db3, #5554ad, #5352a8, #3f4791, #354783, #32348d, #32328a, #313188, #222279, #14156d, #02045a, #040233, #020134, #020134);

    --highlight-color: #edd758;
    --font-family: 'Final Fantasy VI', 'Georgia', serif;
}

.theme-ff6 {
    font-family: var(--font-family);
    font-size: 18px;
    line-height: 1.6;
    letter-spacing: -0.5px;
    /* Tighten spacing for CRT effect */
}

.theme-ff6 .ff-window {
    border-radius: var(--window-border-radius);
    padding: calc(var(--window-border-radius) + 5px);
    background:
        /* Corners */
        radial-gradient(farthest-side at bottom right, var(--border-gradient-corners)) top left / var(--window-border-radius) var(--window-border-radius),
        radial-gradient(farthest-side at top right, var(--border-gradient-corners)) bottom left / var(--window-border-radius) var(--window-border-radius),
        radial-gradient(farthest-side at bottom left, var(--border-gradient-corners)) top right / var(--window-border-radius) var(--window-border-radius),
        radial-gradient(farthest-side at top left, var(--border-gradient-corners)) bottom right / var(--window-border-radius) var(--window-border-radius),
        /* Borders */
        linear-gradient(to top, var(--border-gradient-sides)) top / calc(100% - 2 * var(--window-border-radius)) var(--window-border-radius),
        linear-gradient(to bottom, var(--border-gradient-sides)) bottom / calc(100% - 2 * var(--window-border-radius)) var(--window-border-radius),
        linear-gradient(to right, var(--border-gradient-sides)) right / var(--window-border-radius) calc(100% - 2 * var(--window-border-radius)),
        linear-gradient(to left, var(--border-gradient-sides)) left / var(--window-border-radius) calc(100% - 2 * var(--window-border-radius));
    background-repeat: no-repeat;
    box-shadow: 0 0 0 1px #000;
    /* Outer black line */
    position: relative;
}

.theme-ff6 .ff-window-content {
    background: var(--content-bg-gradient);
    padding: 15px;
    border: 1px solid #555;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    /* Inner border effect */
}

/* --- FF6 Component Overrides --- */

/* Sliders: Classic grey style */
.theme-ff6 input[type=range].ff-range::-webkit-slider-runnable-track {
    background: #444;
    border: 1px solid #888;
    height: 6px;
}

.theme-ff6 input[type=range].ff-range::-webkit-slider-thumb {
    background: #edd758;
    border: 1px solid #fff;
    width: 12px;
    height: 12px;
    margin-top: -4px;
}

/* Navs */
.theme-ff6 .ff-nav-link.active {
    background: rgba(237, 215, 88, 0.2);
    border-left: 3px solid #edd758;
}

/* Cards */
.theme-ff6 .ff-card {
    border: 1px solid #888;
    background: rgba(68, 68, 68, 0.8);
}

/* Dropdowns */
.theme-ff6 .ff-dropdown-menu {
    background: #21217c;
    background: linear-gradient(to bottom, #21217c, #14156d);
    border: 1px solid #fff;
    box-shadow: 0 0 0 1px #000;
    border-radius: 4px;
}

.theme-ff6 .ff-dropdown-item:hover {
    background: rgba(237, 215, 88, 0.2);
}

/* Tooltips */
.theme-ff6 .ff-tooltip-text {
    background: #21217c;
    border: 1px solid #fff;
    box-shadow: 0 0 0 1px #000;
    border-radius: 4px;
}

.theme-ff6 .ff-tooltip-text::after {
    border-color: #21217c transparent transparent transparent;
}

/* List Groups */
.theme-ff6 .ff-list-group-item {
    border-color: #888;
}

.theme-ff6 .ff-list-group-item.active {
    background: rgba(237, 215, 88, 0.2);
    border-color: #edd758;
}

/* Pagination */
.theme-ff6 .ff-page-link {
    background: #444;
    border-color: #888;
}

.theme-ff6 .ff-page-link:hover,
.theme-ff6 .ff-page-item.active .ff-page-link {
    background: #21217c;
    border-color: #edd758;
    color: #edd758;
}

/* Modals */
.theme-ff6 .ff-modal .ff-window {
    box-shadow: 0 0 0 1px #000;
}

/* Alerts */
.theme-ff6 .ff-alert {
    border: 1px solid #fff;
    background: rgba(33, 33, 124, 0.8);
    box-shadow: 0 0 0 1px #000;
}


/* --- ff7.css --- */
/* FF7 Theme Variables & Tokens */
.theme-ff7 {
    /* Colors */
    --ff7-win-top: #001850;
    --ff7-win-bot: #003080;
    --ff7-border-outer: #1A1A1A;
    --ff7-border-inner: #303030;
    --ff7-border-highlight: #E0E0E0;
    --ff7-text-main: #FFFFFF;
    --ff7-text-secondary: #C0C0C0;
    --ff7-text-active: #78B0FF;
    --ff7-warning-red: #FF3030;
    --ff7-slider-track: #707070;
    --ff7-slider-knob: #D0D0D0;

    /* Global Overrides */
    --window-border-radius: 3px;
    --content-bg-gradient: linear-gradient(to bottom, var(--ff7-win-top) 0%, var(--ff7-win-bot) 100%);
    --highlight-color: var(--ff7-text-active);
    --font-family: "Press Start 2P", "Pixel Operator", monospace;
}



/* Prefer Reactor7 for this theme when available */
.theme-ff7 {
    --font-family: "Press Start 2P", "Pixel Operator", monospace;
}

/* --- Window Component --- */
.theme-ff7 .ff-window {
    border-radius: var(--window-border-radius);
    padding: 2px;
    background: transparent;
    /* Tighter bevel: thin outer dark, thin inner light, subtle inner recess */
    border: 1px solid var(--ff7-border-outer);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06),
        /* inner light line */
        inset 0 -1px 0 rgba(0, 0, 0, 0.35),
        /* inner dark line */
        2px 2px 0 rgba(0, 0, 16, 0.6);
    /* small drop */
    margin: 4px;
}

.theme-ff7 .ff-window-content {
    background: var(--content-bg-gradient);
    border-radius: 1px;
    padding: 12px;
    color: var(--ff7-text-main);
    font-family: var(--font-family);
    letter-spacing: 0.5px;
    text-shadow: none;
    /* No shadow per spec */
    image-rendering: pixelated;
}

/* --- Typography --- */
.theme-ff7 h1,
.theme-ff7 h2,
.theme-ff7 h3,
.theme-ff7 h4,
.theme-ff7 .ff-card-header,
.theme-ff7 label {
    color: var(--ff7-text-active);
    /* Cyan/Blue for headers */
    text-transform: uppercase;
    text-shadow: 1px 1px 0 #000;
    /* Slight shadow for headers only for readability */
    /* font-size intentionally inherited to preserve visual hierarchy */
    letter-spacing: 1px;
}

.theme-ff7 p,
.theme-ff7 span,
.theme-ff7 div {
    color: var(--ff7-text-main);
}

.theme-ff7 .text-secondary {
    color: var(--ff7-text-secondary);
}

/* --- Cursor & List Items --- */
.theme-ff7 .ff-nav-link,
.theme-ff7 .ff-list-group-item,
.theme-ff7 .ff-dropdown-item,
.theme-ff7 .ff-page-link,
.theme-ff7 .ff-btn {
    position: relative;
    transition: none;
    border: 1px solid transparent;
    color: var(--ff7-text-secondary);
    cursor: default;
    /* Reset cursor to prevent persistence */
}

/* Active/Hover State */
.theme-ff7 .ff-nav-link:hover,
.theme-ff7 .ff-nav-link.active,
.theme-ff7 .ff-list-group-item:hover,
.theme-ff7 .ff-list-group-item.active,
.theme-ff7 .ff-dropdown-item:hover,
.theme-ff7 .ff-page-link:hover,
.theme-ff7 .ff-page-link.active,
.theme-ff7 .ff-btn:not(:disabled):hover {
    background: linear-gradient(to right, #004080, #0050A0);
    color: var(--ff7-text-main);
    border-radius: 2px;
    padding-left: 45px !important;
    /* Increased spacing to prevent text occlusion */
    text-shadow: none;
    cursor: default;
}

/* The Finger Cursor: only show for hovered item or an explicitly focused item */
.theme-ff7 .ff-nav-link::before,
.theme-ff7 .ff-list-group-item::before,
.theme-ff7 .ff-dropdown-item::before,
.theme-ff7 .ff-page-link::before,
.theme-ff7 .ff-btn::before {
    /* Default: hidden unless hovered or focused via JS */
    content: none;
    display: none;
}

.theme-ff7 .ff-nav-link:hover::before,
.theme-ff7 .ff-list-group-item:hover::before,
.theme-ff7 .ff-dropdown-item:hover::before,
.theme-ff7 .ff-page-link:hover::before,
.theme-ff7 .ff-btn:not(:disabled):hover::before,
.theme-ff7 .ff-cursor-focused::before {
    content: "☛";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4em;
    color: #FFFFFF;
    text-shadow: 2px 2px 0 #000;
    animation: ff7-cursor-bob 0.8s infinite alternate;
    display: block;
}

@keyframes ff7-cursor-bob {
    0% {
        transform: translateY(-50%) translateX(0);
    }

    100% {
        transform: translateY(-50%) translateX(4px);
    }
}

/* --- Sliders (Authentic Config Style) --- */
.theme-ff7 input[type=range].ff-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    height: 18px;
    /* allow room for thumb visual across browsers */
}

.theme-ff7 input[type=range].ff-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: linear-gradient(to bottom, #5a5a5a, #4a4a4a);
    border: 1px solid rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}

.theme-ff7 input[type=range].ff-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 12px;
    width: 12px;
    /* square-ish knob */
    background: linear-gradient(to bottom, #FFFFFF, #D8D8D8);
    border: 1px solid #888;
    /* darker edge for pixel bevel */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 1px 0 rgba(0, 0, 0, 0.5);
    cursor: pointer;
    margin-top: -2px;
    /* center over 8px track */
}

/* Firefox */
.theme-ff7 input[type=range].ff-range::-moz-range-track {
    height: 8px;
    background: linear-gradient(to bottom, #5a5a5a, #4a4a4a);
    border: 1px solid rgba(0, 0, 0, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}

.theme-ff7 input[type=range].ff-range::-moz-range-thumb {
    height: 12px;
    width: 12px;
    background: linear-gradient(to bottom, #FFFFFF, #D8D8D8);
    border: 1px solid #888;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 1px 0 rgba(0, 0, 0, 0.5);
}

/* IE/Edge (legacy) */
.theme-ff7 input[type=range].ff-range::-ms-fill-lower,
.theme-ff7 input[type=range].ff-range::-ms-fill-upper {
    background: linear-gradient(to bottom, #5a5a5a, #4a4a4a);
    border: 1px solid rgba(0, 0, 0, 0.6);
}

.theme-ff7 input[type=range].ff-range:focus {
    outline: none;
}

/* --- Inputs & Forms --- */
.theme-ff7 .ff-input,
.theme-ff7 .ff-select,
.theme-ff7 .ff-textarea {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #555;
    color: var(--ff7-text-main);
    font-family: var(--font-family);
    box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.theme-ff7 .ff-input:focus,
.theme-ff7 .ff-select:focus,
.theme-ff7 .ff-textarea:focus {
    border-color: var(--ff7-text-active);
    background: rgba(0, 0, 0, 0.6);
}

/* --- Warning Dialog --- */
.theme-ff7 .ff-alert {
    background: linear-gradient(to bottom, #800000, #400000);
    /* Red gradient for alerts */
    border: 1px solid #FF0000;
    box-shadow: 0 0 0 1px #FFF, 0 0 0 2px #500000;
    color: #FFF;
}

/* --- Mini Panels (Time, Gil) --- */
.theme-ff7 .ff-card {
    border: 1px solid #444;
    box-shadow: inset 1px 1px 0 #000, 1px 1px 0 #FFF;
    /* Mini bevel */
    background: rgba(0, 0, 0, 0.2);
    padding: 8px;
}

.theme-ff7 .ff-card-header {
    border-bottom: none;
    margin-bottom: 5px;
    color: var(--ff7-text-active);
}

/* --- Navbar Override --- */
.theme-ff7 .ff-navbar {
    background: linear-gradient(to bottom, #002040, #001020);
    border-bottom: 1px solid #555;
}

/* Fix: align in-theme nav flush with window content (neutralize content padding) */
.theme-ff7 .ff-nav {
    margin-left: -12px;
    padding-left: 0;
}

/* --- Table Override --- */
.theme-ff7 .ff-table th {
    color: var(--ff7-text-active);
    border-bottom: 1px solid #555;
}

.theme-ff7 .ff-table td {
    color: var(--ff7-text-main);
}

.theme-ff7 .ff-table-striped tbody tr:nth-of-type(odd) {
    background: rgba(255, 255, 255, 0.05);
}

/* --- Popover Styling (FF7 theme) --- */
.theme-ff7 .ff-popover {
    /* Use opacity/transform transitions for smooth popover animation.
       Positioning is applied by JS inline styles so we avoid hard-coding left/top here. */
    position: absolute !important;
    z-index: 2000 !important;
    left: 0 !important;
    top: 0 !important;
    margin: 0 !important;
    opacity: 0;
    /* start hidden */
    transform: translateY(-6px) scale(0.995);
    transition: opacity 220ms cubic-bezier(.2, .9, .3, 1), transform 220ms cubic-bezier(.2, .9, .3, 1);
    pointer-events: none;
}

.theme-ff7 .ff-popover.show {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
}

/* --- Materia Slots (Preserved) --- */
.theme-ff7 .ff-materia-slots {
    background: #2a2a2a;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.8), 1px 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid #111;
    border-radius: 20px;
}

.theme-ff7 .ff-materia-slot {
    background: #111;
    border: 1px solid #444;
    box-shadow: inset 1px 1px 3px #000;
}

.theme-ff7 .ff-materia-slots.linked::after {
    background: #555;
    height: 4px;
    border: 1px solid #333;
    box-shadow: inset 0 1px 1px #000;
}

/* Tabs color overrides for better legibility on FF7 background */
.theme-ff7 .ff-tab {
    color: var(--ff7-text-active);
}

.theme-ff7 .ff-tab[aria-selected="true"],
.theme-ff7 .ff-tab.active {
    color: var(--ff7-text-main);
}

.theme-ff7,
.showcase-area,
.container {
    z-index: auto !important;
    transform: none !important;
}

/* --- ff8.css --- */
/* FF8 Theme Variables */
.theme-ff8 {
    --window-border-radius: 0px;
    /* Sharp corners */
    --window-bg-color: #2a2a2a;

    /* FF8 Grey/Gunmetal Gradient */
    --content-bg-gradient: linear-gradient(to bottom, #2a2a2a 0%, #1a1a1a 100%);

    --border-color-outer: #777;
    --border-color-inner: #333;

    --highlight-color: #00ff00;
    /* Green highlight */
    --font-family: 'Share Tech Mono', monospace;
}

.theme-ff8 {
    font-family: var(--font-family);
}

.theme-ff8 .ff-window {
    border-radius: var(--window-border-radius);
    padding: 2px;
    background: #555;
    border: 1px solid #777;
    box-shadow:
        0 0 0 1px #111,
        inset 0 0 0 1px #777;
    position: relative;
}

/* Scanline effect overlay */
.theme-ff8 .ff-window::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1;
}

.theme-ff8 .ff-window-content {
    background: var(--content-bg-gradient);
    padding: 15px;
    border: 1px solid #333;
    position: relative;
    z-index: 2;
}

/* --- FF8 Component Overrides --- */

/* Sliders: Tech/Industrial look */
.theme-ff8 input[type=range].ff-range::-webkit-slider-runnable-track {
    background: #333;
    border: 1px solid #777;
    height: 6px;
}

.theme-ff8 input[type=range].ff-range::-webkit-slider-thumb {
    background: #00ff00;
    border: 2px solid #fff;
    border-radius: 0;
    /* Square thumb */
    width: 12px;
    height: 20px;
    margin-top: -8px;
    box-shadow: 0 0 5px #00ff00;
}

/* Navs */
.theme-ff8 .ff-navbar {
    background: var(--content-bg-gradient);
    border: 1px solid #777;
    box-shadow: none;
    font-family: var(--font-family);
}

.theme-ff8 .ff-navbar-nav {
    background: var(--content-bg-gradient);
    border-left: 2px solid var(--highlight-color);
    box-shadow: none;
}

.theme-ff8 .ff-navbar .ff-nav-link {
    color: #ccc;
    font-family: var(--font-family);
}

.theme-ff8 .ff-navbar .ff-nav-link.active {
    background: rgba(0, 255, 0, 0.18);
    border-bottom: 2px solid var(--highlight-color);
    color: #fff;
}

/* Cards */
.theme-ff8 .ff-card {
    border: 1px solid #555;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

/* Dropdowns */
.theme-ff8 .ff-dropdown-menu {
    background: #2a2a2a;
    border: 1px solid #777;
    box-shadow: 0 0 0 1px #111, inset 0 0 0 1px #777;
}

.theme-ff8 .ff-dropdown-item:hover {
    background: rgba(0, 255, 0, 0.2);
    color: #fff;
}

/* Tooltips */
.theme-ff8 .ff-tooltip-text {
    background: #2a2a2a;
    border: 1px solid #777;
    box-shadow: 0 0 5px #00ff00;
}

.theme-ff8 .ff-tooltip-text::after {
    border-color: #2a2a2a transparent transparent transparent;
}

/* List Groups */
.theme-ff8 .ff-list-group-item {
    border-color: #555;
    background: rgba(0, 0, 0, 0.6);
}

.theme-ff8 .ff-list-group-item.active {
    background: rgba(0, 255, 0, 0.15);
    border-color: #00ff00;
    box-shadow: inset 0 0 5px rgba(0, 255, 0, 0.3);
}

/* Pagination */
.theme-ff8 .ff-page-link {
    background: #333;
    border-color: #555;
    border-radius: 0;
    /* Square buttons */
}

.theme-ff8 .ff-page-link:hover,
.theme-ff8 .ff-page-item.active .ff-page-link {
    background: #444;
    border-color: #00ff00;
    color: #00ff00;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

/* Modals */
.theme-ff8 .ff-modal .ff-window {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

/* Alerts */
.theme-ff8 .ff-alert {
    border-left: 4px solid;
    background: rgba(0, 0, 0, 0.7);
}

/* --- FF8 Game Specific --- */

/* Junction Display */
.theme-ff8 .ff-junction-display {
    font-family: 'Share Tech Mono', monospace;
    color: #ccc;
}

.theme-ff8 .ff-junction-row {
    border-bottom: 1px solid #444;
}

.theme-ff8 .ff-junction-stat {
    color: #888;
    text-transform: uppercase;
}

.theme-ff8 .ff-junction-spell {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Battle Menu */
.theme-ff8 .ff-atb-bar {
    background: linear-gradient(to right, #555, #aaa, #fff);
}

.theme-ff8 .ff-battle-menu .ff-list-group-item.active {
    background: rgba(0, 255, 0, 0.2);
    border-left: 4px solid #00ff00;
}


/* --- ff9.css --- */
/* FF9 Theme Variables */
.theme-ff9 {
    --window-border-radius: 4px;
    --window-bg-color: #3a3a4a;

    /* Stone/Slate Gradient - More texture/noise feel */
    --content-bg-gradient: linear-gradient(to bottom, #505060, #303040);

    --border-color-gold: #d4af37;
    /* Richer gold */
    --border-color-shadow: #1a1a2a;

    --highlight-color: #ffd700;
    --font-family: 'Cinzel', serif;
}

.theme-ff9 {
    font-family: var(--font-family);
}

/* Navbar / drawer */
.theme-ff9 .ff-navbar {
    background: var(--content-bg-gradient);
    border: 2px solid #6a6a7a;
    box-shadow: none;
    font-family: var(--font-family);
}

.theme-ff9 .ff-navbar-nav {
    background: var(--content-bg-gradient);
    border-left: 2px solid #6a6a7a;
    box-shadow: none;
}

.theme-ff9 .ff-navbar .ff-nav-link {
    color: #f7f2e8;
    font-family: var(--font-family);
}

.theme-ff9 .ff-navbar .ff-nav-link.active {
    background: rgba(212, 175, 55, 0.2);
    border-left: 3px solid var(--highlight-color);
}

.theme-ff9 .ff-window {
    border-radius: var(--window-border-radius);
    padding: 5px;
    background: #2a2a3a;
    border: 3px solid #6a6a7a;
    /* Complex double border for that "framed" look */
    box-shadow:
        0 0 0 2px #1a1a2a,
        inset 0 0 0 1px #1a1a2a;
    position: relative;
}

.theme-ff9 .ff-window-content {
    background: var(--content-bg-gradient);
    padding: 15px;
    border: 1px solid #5a5a6a;
    background-image: radial-gradient(circle at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
    /* Texture overlay simulation */
}

/* Corner decorations (pseudo-elements) */
.theme-ff9 .ff-window::before,
.theme-ff9 .ff-window::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--border-color-gold);
    border-radius: 50%;
    z-index: 3;
}

.theme-ff9 .ff-window::before {
    top: -4px;
    left: -4px;
    box-shadow: calc(100% + 8px) 0 0 0 var(--border-color-gold);
    /* Top right */
}

.theme-ff9 .ff-window::after {
    bottom: -4px;
    right: -4px;
    box-shadow: calc(-100% - 8px) 0 0 0 var(--border-color-gold);
    /* Bottom left */
}

/* --- FF9 Component Overrides --- */

/* Sliders: Ornate fantasy style */
.theme-ff9 input[type=range].ff-range::-webkit-slider-runnable-track {
    background: #303040;
    border: 2px solid #6a6a7a;
    height: 6px;
}

.theme-ff9 input[type=range].ff-range::-webkit-slider-thumb {
    background: #d4af37;
    border: 2px solid #fff;
    width: 14px;
    height: 14px;
    margin-top: -6px;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

/* Navs */
/* FF9 Theme Variables */
.theme-ff9 {
    --window-border-radius: 4px;
    --window-bg-color: #3a3a4a;

    /* Stone/Slate Gradient - More texture/noise feel */
    --content-bg-gradient: linear-gradient(to bottom, #505060, #303040);

    --border-color-gold: #d4af37;
    /* Richer gold */
    --border-color-shadow: #1a1a2a;

    --highlight-color: #ffd700;
    --font-family: 'Cinzel', serif;
}

.theme-ff9 {
    font-family: var(--font-family);
}

.theme-ff9 .ff-window {
    border-radius: var(--window-border-radius);
    padding: 5px;
    background: #2a2a3a;
    border: 3px solid #6a6a7a;
    /* Complex double border for that "framed" look */
    box-shadow:
        0 0 0 2px #1a1a2a,
        inset 0 0 0 1px #1a1a2a;
    position: relative;
}

.theme-ff9 .ff-window-content {
    background: var(--content-bg-gradient);
    padding: 15px;
    border: 1px solid #5a5a6a;
    background-image: radial-gradient(circle at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
    /* Texture overlay simulation */
}

/* Corner decorations (pseudo-elements) */
.theme-ff9 .ff-window::before,
.theme-ff9 .ff-window::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--border-color-gold);
    border-radius: 50%;
    z-index: 3;
}

.theme-ff9 .ff-window::before {
    top: -4px;
    left: -4px;
    box-shadow: calc(100% + 8px) 0 0 0 var(--border-color-gold);
    /* Top right */
}

.theme-ff9 .ff-window::after {
    bottom: -4px;
    right: -4px;
    box-shadow: calc(-100% - 8px) 0 0 0 var(--border-color-gold);
    /* Bottom left */
}

/* --- FF9 Component Overrides --- */

/* Sliders: Ornate fantasy style */
.theme-ff9 input[type=range].ff-range::-webkit-slider-runnable-track {
    background: #303040;
    border: 2px solid #6a6a7a;
    height: 6px;
}

.theme-ff9 input[type=range].ff-range::-webkit-slider-thumb {
    background: #d4af37;
    border: 2px solid #fff;
    width: 14px;
    height: 14px;
    margin-top: -6px;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

/* Navs */
.theme-ff9 .ff-nav-link.active {
    background: rgba(212, 175, 55, 0.2);
    border-bottom: 2px solid #d4af37;
    color: #ffd700;
}

/* Cards */
.theme-ff9 .ff-card {
    border: 2px solid #6a6a7a;
    background: linear-gradient(to bottom, #505060, #303040);
}

/* Dropdowns */
.theme-ff9 .ff-dropdown-menu {
    background: #303040;
    border: 2px solid #6a6a7a;
    box-shadow: 0 0 0 1px #1a1a2a, inset 0 0 0 1px #1a1a2a;
    border-radius: 4px;
}

.theme-ff9 .ff-dropdown-item:hover {
    background: rgba(212, 175, 55, 0.2);
    color: #ffd700;
}

/* Tooltips */
.theme-ff9 .ff-tooltip-text {
    background: #303040;
    border: 2px solid #6a6a7a;
    box-shadow: 0 0 0 1px #1a1a2a;
    border-radius: 4px;
}

.theme-ff9 .ff-tooltip-text::after {
    border-color: #303040 transparent transparent transparent;
}

/* List Groups */
.theme-ff9 .ff-list-group-item {
    border-color: #6a6a7a;
    background: rgba(48, 48, 64, 0.8);
}

.theme-ff9 .ff-list-group-item.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: #d4af37;
    color: #ffd700;
}

/* Pagination */
.theme-ff9 .ff-page-link {
    background: #303040;
    border-color: #6a6a7a;
}

.theme-ff9 .ff-page-link:hover,
.theme-ff9 .ff-page-item.active .ff-page-link {
    background: #404050;
    border-color: #d4af37;
    color: #ffd700;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

/* Modals */
.theme-ff9 .ff-modal .ff-window {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Alerts */
.theme-ff9 .ff-alert {
    border: 1px solid #6a6a7a;
    background: rgba(48, 48, 64, 0.9);
    border-left: 4px solid #d4af37;
}


/* --- ff13.css --- */
/* FF13 Theme Variables (Crystal/Future) */
.theme-ff13 {
    --window-border-radius: 20px 0 20px 0;
    /* Asymmetric curves */
    --window-bg-color: rgba(255, 255, 255, 0.8);

    /* Light/Glassy Gradient */
    --content-bg-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(230, 240, 255, 0.8) 100%);

    --border-color-outer: #a0c0e0;
    --highlight-color: #00aaff;
    --text-color: #1a1a1a;
    /* Even darker for better readability */
    --font-family: 'Roboto', 'Segoe UI', sans-serif;
}

.theme-ff13 {
    color: var(--text-color);
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0.3px;
}

.theme-ff13 .ff-navbar {
    background: var(--content-bg-gradient);
    border: 1px solid rgba(160, 192, 224, 0.4);
    box-shadow: none;
    font-family: var(--font-family);
}

.theme-ff13 .ff-navbar-nav {
    background: var(--content-bg-gradient);
    border-left: 1px solid rgba(160, 192, 224, 0.4);
    box-shadow: none;
}

.theme-ff13 .ff-navbar .ff-nav-link {
    color: #1a1a1a;
    font-family: var(--font-family);
}

.theme-ff13 .ff-navbar .ff-nav-link.active {
    background: rgba(0, 170, 255, 0.15);
    border-left: 3px solid var(--highlight-color);
}

.theme-ff13 .ff-window {
    border-radius: var(--window-border-radius);
    padding: 1px;
    /* Thin borders */
    background: linear-gradient(45deg, #fff, #c0e0ff);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: none;
}

.theme-ff13 .ff-window-content {
    background: var(--content-bg-gradient);
    padding: 20px;
    border-radius: var(--window-border-radius);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.theme-ff13 .ff-btn {
    color: #005588;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.theme-ff13 .ff-btn:hover {
    background: rgba(0, 170, 255, 0.3);
    border-radius: 15px;
    color: #003366;
}

/* --- FF13 Component Overrides --- */

/* Sliders: Crystal/elegant style */
.theme-ff13 input[type=range].ff-range::-webkit-slider-runnable-track {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(160, 192, 224, 0.5);
    height: 4px;
}

.theme-ff13 input[type=range].ff-range::-webkit-slider-thumb {
    background: linear-gradient(135deg, #fff, #c0e0ff);
    border: 1px solid #00aaff;
    width: 16px;
    height: 16px;
    margin-top: -6px;
    box-shadow: 0 2px 8px rgba(0, 170, 255, 0.3);
}

/* Navs */
.theme-ff13 .ff-nav-link {
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 1px;
}

/* FF13 Theme Variables (Crystal/Future) */
.theme-ff13 {
    --window-border-radius: 20px 0 20px 0;
    /* Asymmetric curves */
    --window-bg-color: rgba(255, 255, 255, 0.8);

    /* Light/Glassy Gradient */
    --content-bg-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(230, 240, 255, 0.8) 100%);

    --border-color-outer: #a0c0e0;
    --highlight-color: #00aaff;
    --text-color: #1a1a1a;
    /* Even darker for better readability */
    --font-family: 'Roboto', 'Segoe UI', sans-serif;
}

.theme-ff13 {
    color: var(--text-color);
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0.3px;
}

.theme-ff13 .ff-window {
    border-radius: var(--window-border-radius);
    padding: 1px;
    /* Thin borders */
    background: linear-gradient(45deg, #fff, #c0e0ff);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: none;
}

.theme-ff13 .ff-window-content {
    background: var(--content-bg-gradient);
    padding: 20px;
    border-radius: var(--window-border-radius);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.theme-ff13 .ff-btn {
    color: #005588;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.theme-ff13 .ff-btn:hover {
    background: rgba(0, 170, 255, 0.3);
    border-radius: 15px;
    color: #003366;
}

/* --- FF13 Component Overrides --- */

/* Sliders: Crystal/elegant style */
.theme-ff13 input[type=range].ff-range::-webkit-slider-runnable-track {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(160, 192, 224, 0.5);
    height: 4px;
}

.theme-ff13 input[type=range].ff-range::-webkit-slider-thumb {
    background: linear-gradient(135deg, #fff, #c0e0ff);
    border: 1px solid #00aaff;
    width: 16px;
    height: 16px;
    margin-top: -6px;
    box-shadow: 0 2px 8px rgba(0, 170, 255, 0.3);
}

/* Navs */
.theme-ff13 .ff-nav-link {
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 1px;
}

.theme-ff13 .ff-nav-link.active {
    background: rgba(0, 170, 255, 0.2);
    border-bottom: 2px solid #00aaff;
    color: #005588;
}

/* Cards */
.theme-ff13 .ff-card {
    border: 1px solid rgba(160, 192, 224, 0.4);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(230, 240, 255, 0.7));
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Dropdowns */
.theme-ff13 .ff-dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #a0c0e0;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #222;
}

.theme-ff13 .ff-dropdown-item:hover {
    background: rgba(0, 170, 255, 0.1);
    color: #005588;
}

/* Tooltips */
.theme-ff13 .ff-tooltip-text {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #a0c0e0;
    color: #222;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.theme-ff13 .ff-tooltip-text::after {
    border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
}

/* List Groups */
.theme-ff13 .ff-list-group-item {
    border-color: rgba(160, 192, 224, 0.4);
    background: rgba(255, 255, 255, 0.5);
}

.theme-ff13 .ff-list-group-item:first-child {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.theme-ff13 .ff-list-group-item:last-child {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.theme-ff13 .ff-list-group-item.active {
    background: linear-gradient(to right, rgba(0, 170, 255, 0.2), transparent);
    border-color: #00aaff;
    color: #005588;
}

/* Pagination */
.theme-ff13 .ff-page-link {
    background: rgba(255, 255, 255, 0.6);
    border-color: #a0c0e0;
    border-radius: 50%;
    /* Circular buttons */
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
}

.theme-ff13 .ff-page-link:hover,
.theme-ff13 .ff-page-item.active .ff-page-link {
    background: #00aaff;
    color: #fff;
    border-color: #00aaff;
    box-shadow: 0 2px 8px rgba(0, 170, 255, 0.4);
}

/* Modals */
.theme-ff13 .ff-modal .ff-window {
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Alerts */
.theme-ff13 .ff-alert {
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
}


/* --- ff15.css --- */
/* FF15 Theme Variables (Modern/Regalia) */
.theme-ff15 {
    --window-border-radius: 0px;
    --window-bg-color: rgba(0, 0, 0, 0.85);

    /* Dark semi-transparent background */
    --content-bg-gradient: rgba(10, 10, 15, 0.85);

    --border-color-outer: #444;
    --highlight-color: #00d0ff;
    /* Neon blue highlight */
    --font-family: 'Rajdhani', sans-serif;
}

.theme-ff15 {
    font-family: var(--font-family);
    font-weight: 300;
}

.theme-ff15 .ff-navbar {
    background: var(--content-bg-gradient);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
    font-family: var(--font-family);
}

.theme-ff15 .ff-navbar-nav {
    background: var(--content-bg-gradient);
    border-left: 2px solid var(--highlight-color);
    box-shadow: none;
}

.theme-ff15 .ff-navbar .ff-nav-link {
    color: #fff;
    font-family: var(--font-family);
}

.theme-ff15 .ff-navbar .ff-nav-link.active {
    background: rgba(0, 208, 255, 0.15);
    border-left: 3px solid var(--highlight-color);
}

.theme-ff15 .ff-window {
    border-radius: var(--window-border-radius);
    padding: 0;
    background: transparent;
    border: none;
    border-left: 4px solid rgba(255, 255, 255, 0.2);
    /* Left border accent */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: none;
}

.theme-ff15 .ff-window-content {
    background: var(--content-bg-gradient);
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-ff15 .ff-btn {
    text-transform: uppercase;
    font-weight: 300;
    letter-spacing: 2px;
    transition: all 0.2s;
}

.theme-ff15 .ff-btn:hover {
    background: linear-gradient(to right, rgba(0, 208, 255, 0.2), transparent);
    padding-left: 20px;
    /* Slide effect */
    color: #fff;
    text-shadow: 0 0 10px #00d0ff;
}

/* --- FF15 Component Overrides --- */

/* Sliders: Sleek/Modern */
.theme-ff15 input[type=range].ff-range::-webkit-slider-runnable-track {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    height: 2px;
}

.theme-ff15 input[type=range].ff-range::-webkit-slider-thumb {
    background: transparent;
    /* Transparent background */
    border: 2px solid #00d0ff;
    /* Glowing border */
    box-shadow: 0 0 10px #00d0ff, 0 0 20px #00d0ff, inset 0 0 5px rgba(0, 208, 255, 0.3);
    width: 15px;
    height: 15px;
    margin-top: -6px;
    border-radius: 50%;
    /* Make it circular */
}

/* Navs */
.theme-ff15 .ff-nav-link {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8em;
}

.theme-ff15 .ff-nav-link.active {
    color: #00d0ff;
    border-bottom: 1px solid #00d0ff;
    background: transparent;
    text-shadow: 0 0 10px #00d0ff;
}

/* Cards */
.theme-ff15 .ff-card {
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

/* Dropdowns */
.theme-ff15 .ff-dropdown-menu {
    background: rgba(10, 10, 15, 0.95);
    border: none;
    border-left: 2px solid #00d0ff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
    border-radius: 0;
}

.theme-ff15 .ff-dropdown-item:hover {
    background: linear-gradient(to right, rgba(0, 208, 255, 0.2), transparent);
    color: #fff;
    padding-left: 20px;
    /* Slide effect */
    text-shadow: 0 0 10px #00d0ff;
}

/* Tooltips */
.theme-ff15 .ff-tooltip-text {
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 2px solid #00d0ff;
    border-radius: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.theme-ff15 .ff-tooltip-text::after {
    border-color: rgba(10, 10, 15, 0.95) transparent transparent transparent;
}

/* List Groups */
.theme-ff15 .ff-list-group-item {
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    transition: all 0.2s;
}

.theme-ff15 .ff-list-group-item:hover {
    background: rgba(255, 255, 255, 0.05);
    padding-left: 20px;
}

.theme-ff15 .ff-list-group-item.active {
    background: linear-gradient(to right, rgba(0, 208, 255, 0.2), transparent);
    border-left: 2px solid #00d0ff;
    color: #00d0ff;
    text-shadow: 0 0 10px #00d0ff;
}

/* Pagination */
.theme-ff15 .ff-page-link {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
}

.theme-ff15 .ff-page-link:hover,
.theme-ff15 .ff-page-item.active .ff-page-link {
    background: rgba(0, 208, 255, 0.2);
    border-color: #00d0ff;
    color: #00d0ff;
    box-shadow: 0 0 10px rgba(0, 208, 255, 0.3);
}

/* Modals */
.theme-ff15 .ff-modal .ff-window {
    border-left: 4px solid #00d0ff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

/* Alerts */
.theme-ff15 .ff-alert {
    background: rgba(10, 10, 15, 0.9);
    border: none;
    border-left: 4px solid;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}


