/* ================================================================
   CRUXFADE-MICRO STYLESHEET
   Sectioned with index for easy navigation and modification
   ================================================================ */

/* 
   SECTION INDEX:
   1. CSS CUSTOM PROPERTIES (Theme System)
   2. RESET & BASE STYLES
   3. MAIN CONTAINER & LAYOUT SYSTEM
   4. EXPLORATION AREA (Top Left - 4x4 Grid)
   5. PARTY STATUS (Top Right - Stats & Cards Combined)
   6. PARTY CARDS (Bottom Left - Overlapping Cards)  
   7. ENCOUNTERS (Bottom Right - Combat & Events)
   8. OVERLAY SYSTEM (Dice, Combat Popups)
   9. UI COMPONENTS (Buttons, Chips, Cards)
   10. RESPONSIVE ADJUSTMENTS
   11. ANIMATIONS & TRANSITIONS
   12. CARD OVERFLOW OVERLAY STYLES
   13. EQUIPMENT DISPLAY STYLES
   14. EQUIPMENT MANAGEMENT STYLES

*/

/* ================================================================
   1. CSS CUSTOM PROPERTIES (Theme System)
   ================================================================ */
:root {
  /* Base Colors */
  --bg: #0f0f13;
  --ink: #e8e6e3;
  --muted: #9aa0a6;
  --accent: #6ea7ff;
  --good: #68d391;
  --bad: #ef6b73;
  --warning: #f6d55c;
  
  /* Game-Specific Colors */
  --crux: #5b1f5e;
  --frag: #3a845a;
  --exit: #b08900;
  --ward: #27506a;
  --tile: #1a1d24;
  --tileHi: #232731;
  
  /* Surface Colors */
  --surface: #141926;
  --surface-border: #263047;
  --surface-light: #1e2332;
  
  /* Layout Variables */
  --container-max: 1200px;
  --gap-main: 16px;
  --gap-cards: 10px;
  --gap-mobile: 12px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-full: 999px;
  
  /* Typography */
  --font-body: system-ui, -apple-system, sans-serif;
  --font-mono: 'SF Mono', Consolas, monospace;
}

/* Make seed clickable */
#run-seed {
    text-decoration: underline;
    transition: color 0.2s ease;
}

#run-seed:hover {
    color: var(--accent);
}

/* ================================================================
   2. RESET & BASE STYLES
   ================================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: 0.02em;
}

h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }

button {
  font-family: inherit;
  font-size: inherit;
  transition: all 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
}

/* ================================================================
   3. MAIN CONTAINER & LAYOUT SYSTEM
   ================================================================ */

/* Main wrapper - use more vertical space */
.wrap {
  width: min(var(--container-max), 94vw);
  margin-inline: auto;
  margin-block: 1vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 2.5fr 1fr; 
  gap: var(--gap-main);
  height: 95vh; /* Use fixed height instead of aspect ratio */
  max-height: 95vh;
}

/* Grid areas for 4-section layout */
.exploration-area { 
  grid-area: 1 / 1; /* Top Left */
}

.encounters { 
  grid-area: 1 / 2; /* Top Right - contains both party status and encounters */
}

.event-log { 
  grid-area: 2 / 1; /* Bottom Left */
}

.party-hand-section { 
  grid-area: 2 / 2; /* Bottom Right - dedicated party hand */
}


/* Section base styling */
section {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Section headers */
.grid-header,
.status-header,
.cards-header,
.encounter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--surface-border);
}

/* ================================================================
   4. EXPLORATION AREA (Top Left - 4x4 Grid)
   ================================================================ */

.exploration-area {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center; /* Center the grid */
}

.grid-stats {
  display: flex;
  gap: 8px;
}

/* 4x4 Game Board - Takes up most of the section */
/* 4x4 Game Board */
.board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 10px;
  width: 480px;
  height: 480px;
  margin: 20px auto;
  padding: 0;
}

/* Individual tile styling */
.tile {
  background: var(--tile);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, box-shadow 0.2s ease;
  font-size: 1.8rem;
  min-height: 0; /* Reset any conflicting min-height */
  min-width: 0; /* Reset any conflicting min-width */
}

.tile:hover {
  background: var(--tileHi);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* Player position indicator */
.tile.player-tile {
  background: var(--accent);
  border: 2px solid var(--accent);
  color: white;
  font-weight: bold;
  box-shadow: 0 0 0 2px var(--accent) inset, 0 0 12px rgba(110, 167, 255, 0.35);
  cursor: default;
}

/* Adjacent clickable tiles */
.tile.adjacent {
  cursor: pointer;
  border: 2px solid var(--accent);
}

.tile.player-tile::before {
  content: '◉';
}

/* Tile type indicators */
.tile.fight::before { content: '⚔️'; }
.tile.hazard::before { content: '⚡'; }
.tile.item::before { content: '📦'; }
.tile.ally::before { content: '🤝'; }
.tile.key::before { content: '🗝️'; }
.tile.door::before { content: '🚪'; }
.tile.empty::before { content: '·'; color: var(--muted); }

/* Revealed tile styling */
.tile.revealed {
  border-color: var(--accent);
  opacity: 1;
}

.tile:not(.revealed) {
  opacity: 0.6;
}

/* ================================================================
   5. PARTY STATUS (Top Right - Stats & Cards Combined)
   ================================================================ */

.party-status {
  gap: 16px;
}

.run-info {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* Party member display - HORIZONTAL and COMPACT */
.party-stats {
  display: flex;
  flex-direction: row;
  gap: 10px;
  overflow-x: auto;
  padding: 4px;
}

.party-member {
  /* Much more compact card dimensions */
  width: 120px;
  min-width: 120px;
  
  /* Vertical layout for card content */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  
  /* Card styling */
  padding: 8px 6px;
  background: var(--surface-light);
  border-radius: var(--radius);
  border: 1px solid var(--surface-border);
  
  /* Hover effect */
  transition: all 0.2s ease;
  cursor: pointer;
  
  /* Compact proportions - much shorter */
  height: 165px; /* Fixed height instead of aspect ratio */
}

.party-member:hover {
  background: var(--surface);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(110, 167, 255, 0.2);
}

.party-member:active {
  transform: translateY(0px);
  box-shadow: 0 2px 8px rgba(110, 167, 255, 0.3);
}

.member-portrait {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tile);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  margin-bottom: 2px;
}

.member-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-fallback {
  font-size: 0.9rem;
  display: none;
}

/* Member name and stats - very compact */
.member-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
  gap: 2px;
}

.member-info strong {
  font-size: 0.85rem;
  margin-bottom: 2px;
  line-height: 1;
}

/* Stats - HP on one line, ATK+MAG on next line */
.stats {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 4px;
  line-height: 1;
}

.stats .hp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

/* ATK and MAG on same line */
.stats .atk-mag-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.stats span {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Equipment display - very compact, icon + "None" */
.equipment-display {
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
}

.equipment-slot {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.65rem;
  padding: 1px 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  height: 16px; /* Fixed small height */
}

.slot-icon {
  width: 10px;
  text-align: center;
  font-size: 0.7rem;
}

.equipment-name {
  color: var(--muted);
  font-size: 0.6rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Leader marker - very small */
.leader-marker {
  background: var(--accent);
  color: white;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  font-size: 0.45rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1px;
  margin-bottom: 1px;
  line-height: 1;
}

/* Different slot styling - very subtle */
.weapon-slot {
  border-left: 2px solid #ff6b6b;
}

.armor-slot {
  border-left: 2px solid #4ecdc4;
}

.accessory-slot {
  border-left: 2px solid #ffe66d;
}

/* Mobile responsive */
@media (max-width: 700px) {
  .party-stats {
    gap: 8px;
  }
  
  .party-member {
    width: 110px;
    min-width: 110px;
    height: 125px;
  }
}

/* ================================================================
   5.5. EVENT LOG AREA (Bottom Left - Moved from Party Status)
   ================================================================ */

.event-log-area {
  display: flex;
  flex-direction: column;
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--surface-border);
}

/* Reuse existing .log styles but make it take full space */
.event-log-area .log {
  flex: 1;
}

.log {
  background: #11141b;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 10px;
  color: #cbd5e1;
  font-size: 0.85rem;
  flex: 1;
  overflow-y: auto; /* Ensure scrolling is enabled */
  line-height: 1.4;
  max-height: 140px; /* Set a max height */
  scroll-behavior: smooth; /* Smooth scrolling */
}

/* Add this to the existing .log section */
.log p {
  margin-bottom: 4px;
}

.log p:last-child {
  margin-bottom: 0;
}

/* New styles for log entries */
.log-entry {
  transition: all 0.3s ease;
  opacity: 0.8;
}

.log-entry.current-entry {
  font-size: 0.95rem; /* Larger than the base 0.85rem */
  font-weight: 600;   /* Bolder */
  opacity: 1;         /* Full opacity */
  color: var(--ink);  /* Brighter color */
  margin-bottom: 6px; /* Extra spacing below */
  padding: 2px 0;     /* Slight padding */
}

/* Older entries are more subdued */
.log-entry:not(.current-entry) {
  font-size: 0.8rem;  /* Slightly smaller */
  opacity: 0.7;       /* More faded */
  color: var(--muted); /* Dimmer color */
}

/* ================================================================
   6. PARTY CARDS (Bottom Left - Overlapping Cards)
   ================================================================ */

.party-cards {
  position: relative;
  min-height: 100px; /* Card Size */
}

.deck-info {
  display: flex;
  gap: 8px;
}

/* Overlapping hand display */
.party-hand {
  display: flex;
  margin-left: 20px;
  flex: 1;
  align-items: flex-start;
  min-height: 100px; /* Card Size */
}

.party-card {
  width: 120px;
  height: 150px; 
  margin-left: -15px;
  transition: transform 0.2s ease, z-index 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.party-card:first-child {
  margin-left: 0;
}

.party-card.leader {
  transform: translateY(-8px);
  z-index: 10;
}

.party-card:hover {
  transform: translateY(-4px);
  z-index: 5;
}

/* Card structure */
.party-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.party-card:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.card-portrait {
  width: 100%;
  height: 100px;
  background: var(--tile);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.card-content h4 {
  font-size: 0.9rem;
  margin-bottom: 6px;
  text-align: center;
}

.card-skills {
  text-align: center;
}

.skill {
  display: inline-block;
  background: var(--surface-border);
  color: var(--muted);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  margin: 2px;
}

/* ================================================================
   7. ENCOUNTERS (Bottom Right - Combat & Events)
   ================================================================ */

.encounters {
  position: relative;
}

.encounter-content {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.encounter-placeholder {
  padding: 20px;
}

.encounter-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

/* Combat interface styling */
.combat-status {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
  padding: 12px;
  background: var(--surface-light);
  border-radius: var(--radius-sm);
}

.combatant {
  text-align: center;
  font-size: 0.9rem;
}

.combatant strong {
  display: block;
  margin-bottom: 4px;
}

.vs {
  font-weight: bold;
  color: var(--muted);
  font-size: 1.1rem;
}

.enemy-preview {
  text-align: center;
  padding: 12px;
  background: var(--surface-light);
  border-radius: var(--radius-sm);
  margin: 12px 0;
  font-size: 0.9rem;
}

.enemy-preview strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

/* ================================================================
   8. OVERLAY SYSTEM (Dice, Combat Popups)
   ================================================================ */

.overlay-system {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.overlay-content {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 400px;
  width: 90vw;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

/* Dice overlay specific */
.dice-display {
  margin: 20px 0;
}

.die {
  width: 60px;
  height: 60px;
  background: var(--accent);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: bold;
  color: white;
  margin: 0 auto;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.die:hover {
  transform: scale(1.1);
}

/* Combat overlay specific */
.combat-participants {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin: 20px 0;
}

.participant {
  text-align: center;
}

.participant-hp {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 4px;
}

.vs {
  font-weight: bold;
  color: var(--muted);
}

.combat-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

/* ================================================================
   9. UI COMPONENTS (Buttons, Chips, Cards)
   ================================================================ */

/* Chips for displaying stats/info */
.chip {
  background: #141820;
  color: #c9d1f3;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--surface-border);
  font-size: 0.8rem;
  white-space: nowrap;
}

.chip strong {
  color: var(--ink);
}

/* Button system */
button {
  background: #162236;
  color: #e7ecff;
  border: 1px solid #2a3b5f;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.15s ease;
}

button:hover:not(:disabled) {
  filter: brightness(1.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  transition: all 0.2s ease;
}

button:active:not(:disabled) {
  transform: translateY(0px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.1s ease;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.btn-secondary {
  background: var(--surface-border);
  border-color: var(--muted);
  color: var(--ink);
}

.btn-danger {
  background: var(--bad);
  border-color: var(--bad);
  color: white;
}

.btn-success {
  background: var(--good);
  border-color: var(--good);
  color: white;
}

/* ================================================================
   10. RESPONSIVE ADJUSTMENTS
   ================================================================ */

@media (max-width: 900px) {
  :root {
    --container-max: 95vw;
    --gap-main: var(--gap-mobile);
  }
  
  .wrap {
    margin-block: 1vh;
    max-height: 95vh;
  }
  
  section {
    padding: 12px;
  }
}

@media (max-width: 700px) {
  .wrap {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    aspect-ratio: unset;
    gap: var(--gap-mobile);
  }
  
  .exploration-area { grid-area: 1; }
  .party-status { grid-area: 2; }
  .party-cards { grid-area: 3; }
  .encounters { grid-area: 4; }
  
  .party-hand {
    margin-left: 0;
  }
  
  .party-card {
    width: 100px;
    margin-left: -10px;
  }
  
  .party-card:first-child {
    margin-left: 0;
  }
}

/* ================================================================
   11. ANIMATIONS & TRANSITIONS
   ================================================================ */

/* Flash effects for game feedback */
.tile.flash-hurt {
  box-shadow: 0 0 0 2px var(--bad) inset, 0 0 18px rgba(239, 107, 115, 0.35);
  animation: flash-damage 0.5s ease;
}

.tile.flash-heal {
  box-shadow: 0 0 0 2px var(--good) inset, 0 0 18px rgba(104, 211, 145, 0.35);
  animation: flash-heal 0.5s ease;
}

@keyframes flash-damage {
  0%, 100% { background: var(--tile); }
  50% { background: rgba(239, 107, 115, 0.2); }
}

@keyframes flash-heal {
  0%, 100% { background: var(--tile); }
  50% { background: rgba(104, 211, 145, 0.2); }
}

/* Hover lift effects */
.tile,
.party-card,
button,
.die {
  transition: transform 0.08s ease;
}

/* Smooth state transitions */
.overlay {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* ================================================================
   CARD OVERFLOW OVERLAY STYLES
   ================================================================ */

/* Card overflow specific overlay content */
.card-overflow-content {
    max-width: 600px;
    width: 95vw;
    max-height: 80vh;
    overflow-y: auto;
}

/* New card preview area */
.new-card-preview {
    margin: 16px 0;
    text-align: center;
}

.overflow-new-card {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    display: inline-block;
    max-width: 200px;
    opacity: 0.9;
}

/* Instruction text */
.overflow-instruction {
    margin: 20px 0 12px 0;
    font-weight: 600;
    text-align: center;
    color: var(--accent);
}

/* Hand of cards to choose from */
.overflow-hand {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

/* Discard option cards */
.overflow-discard-option {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid var(--surface-border);
}

.overflow-discard-option:hover {
    transform: translateY(-4px);
    border-color: var(--bad);
    box-shadow: 0 8px 24px rgba(239, 107, 115, 0.3);
    background: rgba(239, 107, 115, 0.1);
}

/* Card styling for overflow cards */
.card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

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

.card-type {
    background: var(--surface-border);
    color: var(--muted);
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
}

.card-description {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.4;
}

/* Mobile responsive */
@media (max-width: 700px) {
    .overflow-hand {
        grid-template-columns: 1fr;
    }
    
    .card-overflow-content {
        max-width: 95vw;
        padding: 16px;
    }
}

/* ================================================================
   EQUIPMENT DISPLAY STYLES
   ================================================================ */

/* Equipment display container */
.equipment-display {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Individual equipment slots */
.equipment-slot {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    padding: 2px 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

/* Equipment slot icons */
.slot-icon {
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
}

/* Equipment names */
.equipment-name {
    color: var(--muted);
    font-size: 0.75rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Equipped item styling */
.equipment-slot:has(.equipment-name:not([data-empty])) .equipment-name {
    color: var(--ink);
    font-weight: 500;
}

/* Different slot styling */
.weapon-slot {
    border-left: 3px solid #ff6b6b;
}

.armor-slot {
    border-left: 3px solid #4ecdc4;
}

.accessory-slot {
    border-left: 3px solid #ffe66d;
}

/* Empty slot styling */
.equipment-slot .equipment-name {
    color: var(--muted);
    font-style: italic;
    opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 700px) {
    .equipment-display {
        margin-top: 6px;
        gap: 3px;
    }
    
    .equipment-slot {
        font-size: 0.75rem;
        padding: 1px 3px;
    }
    
    .equipment-name {
        font-size: 0.7rem;
    }
}

/* ================================================================
   EQUIPMENT MANAGEMENT STYLES
   ================================================================ */

/* Clickable equipment slots */
.clickable-slot {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.clickable-slot:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.clickable-slot:active {
    transform: translateY(0);
}

/* Equipment management overlay content */
.equipment-management-content {
    max-width: 500px;
    width: 95vw;
    max-height: 80vh;
    overflow-y: auto;
}

/* Current equipment section */
.current-equipment {
    margin-bottom: 20px;
}

.current-equipment h4 {
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 0.95rem;
}

/* Available equipment section */
.available-equipment {
    margin-bottom: 20px;
}

.available-equipment h4 {
    margin-bottom: 8px;
    color: var(--good);
    font-size: 0.95rem;
}

.equipment-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Equipment item display */
.equipment-item {
    background: var(--surface-light);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.equipment-item.current-item {
    border-color: var(--accent);
    background: rgba(110, 167, 255, 0.1);
}

.equipment-item.available-item {
    border-color: var(--good);
    background: rgba(104, 211, 145, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.equipment-item.available-item:hover {
    border-color: var(--good);
    background: rgba(104, 211, 145, 0.2);
    transform: translateY(-2px);
}

.equipment-item.empty-slot {
    border-style: dashed;
    border-color: var(--muted);
    color: var(--muted);
    font-style: italic;
    text-align: center;
}

/* Item header */
.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.item-header strong {
    color: var(--ink);
    font-size: 0.95rem;
}

/* Item rarity */
.item-rarity {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
}

.item-rarity.common {
    background: #666;
    color: white;
}

.item-rarity.uncommon {
    background: #4ecdc4;
    color: white;
}

.item-rarity.rare {
    background: #ffe66d;
    color: #333;
}

.item-rarity.legendary {
    background: #ff6b6b;
    color: white;
}

/* Item description */
.item-description {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.4;
    margin-bottom: 8px;
}

/* Item stats */
.item-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.stat-bonus {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.stat-bonus.positive {
    background: rgba(104, 211, 145, 0.2);
    color: var(--good);
}

.stat-bonus.negative {
    background: rgba(239, 107, 115, 0.2);
    color: var(--bad);
}

/* Equipment action buttons */
.unequip-btn {
    background: var(--bad);
    border-color: var(--bad);
    color: white;
}

.equip-btn {
    background: var(--good);
    border-color: var(--good);
    color: white;
}

.equipment-actions {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

/* Mobile responsive */
@media (max-width: 700px) {
    .equipment-management-content {
        max-width: 95vw;
        padding: 12px;
    }
    
    .equipment-item {
        padding: 8px;
    }
    
    .item-stats {
        gap: 6px;
    }
}

/* End of Stylesheet */
