/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2c2c2c;
  --bg-tertiary: #3d3d3d;
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --text-accent: #ffffff;
  --accent-primary: #10b981; /* Green */
  --accent-primary-darker: #059669;
  --accent-secondary: #3b82f6; /* Blue */
  --accent-positive: #22c55e; /* Bright Green */
  --accent-negative: #ef4444; /* Red */
  --border-color: #444444;
  --shadow-color: rgba(255, 255, 255, 0.08);
  --font-primary: 'Inter', Arial, sans-serif;
  --border-radius: 6px;
}

/* --- Base Styles --- */
body {
  font-family: var(--font-primary);
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
}

h2 {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 30px;
  color: var(--accent-primary);
  font-weight: 600;
}
h3 {
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 20px;
    margin-bottom: 10px;
}

.container {
  width: 85%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 15px;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}
a:hover {
  color: var(--accent-primary-darker);
  text-decoration: underline;
}

/* Error Message Style */
.error-message {
    color: var(--accent-negative);
    text-align: center;
    padding: 20px;
    font-weight: 500;
}

/* --- Navbar --- */
nav {
  background-color: var(--bg-secondary);
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 30px;
  text-align: center;
  position: relative;
  min-height: 60px;
}
nav ul { list-style-type: none; margin: 0; padding: 0; display: inline-block; }
nav ul li { display: inline; margin: 0 10px; }
nav ul li a { color: var(--text-secondary); text-decoration: none; font-size: 16px; font-weight: 500; padding: 8px 12px; border-radius: var(--border-radius); transition: color 0.3s ease, background-color 0.3s ease; display: inline-block; }
nav ul li a:hover { color: var(--text-accent); background-color: var(--bg-tertiary); text-decoration: none; }
nav ul li a.active { color: var(--text-accent); background-color: var(--accent-primary); font-weight: 600; }
nav ul li a.active:hover { background-color: var(--accent-primary-darker); }
.nav-disabled { color: var(--text-secondary); padding: 8px 12px; opacity: 0.6; cursor: default; display: inline-block; }
/* Optional Container within Nav (for Search on specific pages) */
nav .container { position: absolute; right: 3%; top: 50%; transform: translateY(-50%); width: auto; max-width: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 15px; }

/* --- Search, Filters & Controls --- */
.search-series-container { display: flex; flex-direction: column; gap: 15px; margin-bottom: 30px; }
#account-search-form { display: flex; align-items: center; }
#account-search, #player-search, #owner-search, #set-filter { padding: 10px 15px; border: 1px solid var(--border-color); background-color: var(--bg-tertiary); color: var(--text-primary); border-radius: var(--border-radius); font-size: 15px; transition: border-color 0.3s ease, box-shadow 0.3s ease; height: 42px; box-sizing: border-box; }
#account-search:focus, #player-search:focus, #owner-search:focus, #set-filter:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3); }
#account-search { min-width: 250px; flex-shrink: 0; margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
#player-search { min-width: 200px; flex-grow: 1; max-width: 400px; }
#owner-search { width: 100%; max-width: 400px; margin-bottom: 15px;}
#set-filter { flex-grow: 0; min-width: 180px; cursor: pointer; }
#player-search-result-count, #owner-search-result-count { font-weight: bold; color: var(--text-secondary); margin-left: 10px; }
.search-button, .series-btn, .add-button, .next-moment-button, .toggle-button, .trade-add-button { padding: 10px 20px; height: 42px; box-sizing: border-box; background-color: var(--accent-primary); color: var(--text-accent); border: none; border-radius: var(--border-radius); cursor: pointer; font-weight: 500; font-size: 15px; transition: background-color 0.3s ease; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
.search-button:hover, .series-btn:hover:not(.active), .add-button:hover, .next-moment-button:hover, .toggle-button:hover, .trade-add-button:hover { background-color: var(--accent-primary-darker); }
#account-search-form .search-button { border-top-left-radius: 0; border-bottom-left-radius: 0; flex-shrink: 0; }
.series-btn { background-color: var(--bg-tertiary); color: var(--text-primary); }
.series-btn.active { background-color: var(--accent-primary); color: var(--text-accent); font-weight: 600; }
.series-btn:hover:not(.active) { background-color: #555555; }
.toggle-button { background-color: var(--bg-tertiary); color: var(--text-primary); }
.toggle-button:hover { background-color: #555555; }
.trade-add-button { background-color: var(--accent-secondary); padding: 10px 25px; font-weight: 600; } /* Trader button style */
.trade-add-button:hover { background-color: #2563eb; } /* Trader button hover */
.search-container { display: flex; gap: 15px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; padding-top: 20px; }
.search-container label { color: var(--text-secondary); font-weight: 500; margin-left: 10px; }
.controls-area { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; }
.series-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }

/* --- Chart Container --- */
#fmv-chart-container { background-color: var(--bg-secondary); padding: 20px; margin-bottom: 30px; border-radius: var(--border-radius); box-shadow: 0 4px 15px var(--shadow-color); height: 300px; }

/* --- Info Boxes --- */
.moment-info, .user-info { background-color: var(--bg-secondary); padding: 20px 25px; margin-bottom: 30px; border-radius: var(--border-radius); box-shadow: 0 4px 15px var(--shadow-color); text-align: center; }
.moment-info:not(.account-summary) h2 { color: var(--text-accent); font-weight: 600; font-size: 1.6em; margin-top: 0; margin-bottom: 10px; border-bottom: none; padding-bottom: 0; }
.user-info h2 { color: var(--accent-primary); margin-top: 0; margin-bottom: 15px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; text-align: left; }
.moment-info p, .moment-info .moment-stats, .moment-info .badge-group { margin: 8px 0; padding: 0; line-height: 1.5; color: var(--text-primary); }
.moment-meta { font-size: 1.1em; color: var(--text-secondary); }
.moment-meta img { vertical-align: middle; height: 28px; margin-right: 5px; margin-bottom: 3px; }
.moment-pricing { font-size: 1.1em; font-weight: 500; }
.moment-pricing .dollar-amount { color: var(--accent-positive); font-weight: 600; }
.moment-pricing img.trend-arrow { vertical-align: middle; height: 16px; margin: 0 5px; }
.meta-separator { color: var(--border-color); margin: 0 8px; font-weight: 300; }
.badge-group { margin-top: 15px; margin-bottom: 15px; }
.badge-icon { width: 56px; height: 56px; margin: 0 5px; vertical-align: middle; }
.moment-stats { font-size: 0.95em; color: var(--text-secondary); margin-top: 15px; display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 15px; }
.stat-item { white-space: nowrap; }
.stat-label { font-weight: 500; color: var(--text-primary); margin-right: 4px; }
.moment-stats .boolean-icon { height: 18px; vertical-align: middle; margin-left: 3px; margin-bottom: 2px; }
/* Account Summary Box Layout */
.account-summary .info { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px 25px; text-align: center; }
.account-summary .info-item .label { display: block; font-weight: 500; color: var(--text-secondary); margin-bottom: 3px; font-size: 0.9em; text-transform: uppercase; }
.account-summary .info-item .value { display: block; font-size: 1.4em; font-weight: 600; }

/* --- Icons --- */
.boolean-icon { height: 24px; width: auto; vertical-align: middle; }
.player-status-icons { margin-bottom: 20px; text-align: center; }
.player-status-icons img.boolean-icon { height: 28px; margin: 0 2px 0 10px; }
.player-status-icons img.check-icon, .player-status-icons img.x-icon { height: 20px; vertical-align: middle; margin-right: 20px; }
.account-status-icons { text-align: center; margin-bottom: 25px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 25px; }
.account-status-icons span { display: inline-flex; align-items: center; gap: 5px; }
.account-status-icons .boolean-icon { height: 24px; }
.account-status-icons .count-amount { font-size: 1.1em; font-weight: 600; color: var(--text-accent); }
.jersey-icon { height: 24px; width: auto; vertical-align: middle; margin-right: 5px; }
td .check-icon, td .x-icon { height: 18px; vertical-align: middle; }
td img[alt="Fandom"], td img[alt="Core"], td img[alt="Limited"], td img[alt="Rare"], td img[alt="Epic"], td img[alt="Legendary"], td img[alt="Heroic"] { height: 28px; width: auto; vertical-align: middle; }
td img.trend-arrow { height: 16px; vertical-align: middle; }
.check-icon { color: var(--accent-positive); font-weight: bold; }

/* --- Links --- */
.player-preview-link { display: block; text-align: center; margin-bottom: 20px; font-weight: 500; }
.market-link { font-weight: 600; padding: 4px 8px; border-radius: 4px; background-color: var(--bg-tertiary); display: inline-block; transition: background-color 0.2s ease; }
.market-link:hover { background-color: #555; text-decoration: none; color: var(--accent-primary); }
.buy-link { color: var(--accent-positive); }
.view-link { color: var(--accent-primary); }

/* --- Table Styling --- */
table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 0.95em; box-shadow: 0 4px 15px var(--shadow-color); background-color: var(--bg-secondary); border-radius: var(--border-radius); overflow: hidden; }
th, td { padding: 15px 18px; text-align: left; color: var(--text-primary); border-bottom: 1px solid var(--border-color); vertical-align: middle; }
thead th { background-color: var(--bg-tertiary); color: var(--text-accent); font-weight: 600; text-transform: uppercase; font-size: 0.85em; letter-spacing: 0.5px; border-bottom: 2px solid var(--border-color); }
tbody tr { transition: background-color 0.2s ease; }
tbody tr.even { background-color: var(--bg-secondary); }
tbody tr.odd { background-color: rgba(0, 0, 0, 0.1); }
tbody tr:hover { background-color: var(--bg-tertiary); }
tbody tr:last-child td { border-bottom: none; }
.editions-cell { white-space: normal; font-size: 0.85em; line-height: 1.4; }
.no-data-cell { text-align: center; color: var(--text-secondary); padding: 30px 15px !important; font-style: italic; }
.player-cell a { display: inline-block; }
tr.highlight-gold { outline: 2px solid #f59e0b; outline-offset: -1px; }
tr.highlight-white { outline: 2px solid #ffffff; outline-offset: -1px; }
tr.highlight-purple { outline: 2px solid #a855f7; outline-offset: -1px; }
tr.highlight-blue { outline: 2px solid var(--accent-secondary); outline-offset: -1px; }
.dollar-amount { font-weight: 600; color: var(--accent-secondary); font-size: 1em; }
.dollar-amount-true { font-weight: 600; color: var(--accent-positive); font-size: 1em; }
.crisp-white, .count-amount { font-weight: 600; color: var(--text-accent); font-size: 1em; }
.offer-amount { font-weight: 700; color: var(--text-accent); font-size: 1.2em; }
.edition-amount { font-weight: 600; color: var(--accent-positive); font-size: 1em; } /* Base style */
.table-responsive-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 20px; }

/* --- Set Page Specific Styles --- */
.set-container { margin-top: 25px; margin-bottom: 25px; border: 1px solid var(--border-color); background-color: var(--bg-secondary); border-radius: var(--border-radius); box-shadow: 0 4px 15px var(--shadow-color); overflow: hidden; }
.set-container.set-complete .set-aggregate { /* Optional visual cue */ }
.set-aggregate { padding: 15px 20px; cursor: pointer; transition: background-color 0.2s ease; border-bottom: 1px solid var(--border-color); }
.set-container.expanded .set-aggregate { background-color: var(--bg-tertiary); }
.set-aggregate:hover { background-color: var(--bg-tertiary); }
.set-header-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; flex-wrap: wrap; }
.set-title-group { display: flex; align-items: center; gap: 10px; flex-grow: 1; }
.set-name { font-size: 1.3em; font-weight: 600; color: var(--text-accent); text-align: left; }
.set-header-complete-indicator { color: var(--accent-positive); font-weight: 600; font-size: 0.9em; padding: 3px 8px; border-radius: var(--border-radius); background-color: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.3); white-space: nowrap; }
.set-header-complete-indicator .check-icon { margin-right: 4px; }
.set-rarity img { height: 28px; vertical-align: middle; margin-left: 0; }
.set-controls-group { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.toggle-indicator { font-weight: bold; color: var(--text-secondary); font-size: 1.1em; margin-left: 0; }
.set-stats { font-size: 0.9em; color: var(--text-secondary); margin-top: 10px; margin-bottom: 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 15px; text-align: center; }
.set-stats .stat-item { white-space: nowrap; }
.set-stats .stat-label { font-weight: 500; color: var(--text-primary); margin-right: 4px; }
.set-stats .stat-value, .set-stats .edition-amount { font-weight: 600; font-size: 1.2em; color: var(--text-accent); margin-left: 3px; }
/* .set-stats .edition-amount { color: var(--accent-positive); } */ /* Optional override */
.set-value-label { margin: 10px 0 5px 0; font-weight: 500; color: var(--text-primary); text-align: center; font-size: 1.1em; }
.set-value-label .dollar-amount { font-weight: 600; color: var(--accent-secondary); }
.collapsible-content { display: none; padding: 0px 20px 20px 20px; border-top: none; }
.collapsible-content.is-expanded { display: block; }
.table-section-title { text-align: left; font-size: 1.1em; color: var(--text-accent); margin-top: 15px; margin-bottom: 10px; padding-bottom: 5px; border-bottom: 1px solid var(--border-color); }
.collapsible-table, .set-details-table, .still-needs-table { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 0.9em; background-color: transparent; box-shadow: none; border: 1px solid var(--border-color); border-radius: var(--border-radius); overflow: hidden; table-layout: fixed; }
.collapsible-table th, .collapsible-table td, .set-details-table th, .set-details-table td, .still-needs-table th, .still-needs-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-color); border-right: 1px solid var(--border-color); vertical-align: middle; text-align: left; }
.collapsible-table th:last-child, .collapsible-table td:last-child, .set-details-table th:last-child, .set-details-table td:last-child, .still-needs-table th:last-child, .still-needs-table td:last-child { border-right: none; }
.collapsible-table thead th, .set-details-table thead th, .still-needs-table thead th { background-color: var(--bg-tertiary); color: var(--text-accent); font-weight: 600; font-size: 0.85em; text-transform: uppercase; }
.collapsible-table tbody tr:hover, .set-details-table tbody tr:hover, .still-needs-table tbody tr:hover { background-color: rgba(255, 255, 255, 0.05); }
.col-player { width: 35%; }
.col-count { width: 10%; text-align: center; }
.col-ask { width: 15%; text-align: right; }
.col-editions { width: 25%; }
.col-market { width: 15%; text-align: center;}
.still-needs-table .col-player { width: 50%; }
.still-needs-table .col-ask { width: 25%; text-align: right; }
.still-needs-table .col-market { width: 25%; text-align: center;}
.still-needs { margin-top: 20px; padding-top: 15px; border-top: 1px dashed var(--border-color); }
.still-needs .set-value-label { text-align: left; font-size: 1em; }
.set-complete-message { color: var(--accent-positive); font-weight: bold; text-align: center; padding: 20px 0; font-size: 1.2em; border-top: 1px dashed var(--border-color); margin-top: 20px; }
.set-complete-message .check-icon { font-size: 1.3em; margin-right: 5px; vertical-align: middle; }

/* --- Footer --- */
footer { text-align: center; padding: 40px 0 30px 0; margin-top: 50px; border-top: 1px solid var(--border-color); color: var(--text-secondary); font-size: 0.9em; }
footer .container { display: block; max-width: 800px; padding: 0 15px; margin: 0 auto; }
footer p { margin: 5px 0; line-height: 1.5; }

/* --- Trader Page Specific Styles --- */
.container.trader-top-section, .container.trader-selected-section { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; width: 90%; max-width: 1600px; margin-bottom: 30px; }
.container.trader-button-section, .container.trader-evaluate-section { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 20px; width: 90%; max-width: 1200px; margin: 20px auto 30px auto; }
.player-list-container { width: 100%; flex-basis: 48%; max-width: 48%; }
.player-list-container h2 { text-align: left; margin-top: 0; margin-bottom: 15px; font-size: 1.4em; color: var(--text-accent); }
.player-select-list { width: 100%; height: 300px; background-color: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 10px; font-family: var(--font-primary); font-size: 0.95em; }
.player-select-list option { padding: 5px; }
.player-select-list option:checked { background-color: var(--accent-primary); color: var(--text-accent); }
.selected-players-container { width: 100%; flex-basis: 48%; max-width: 48%; }
.selected-players-container h2 { text-align: left; margin-top: 0; margin-bottom: 15px; font-size: 1.4em; color: var(--text-accent); }
.selected-players-table { width: 100%; font-size: 0.9em; } /* Uses base table styles */
.selected-players-table th, .selected-players-table td { padding: 8px 10px; white-space: nowrap; }
.selected-players-table .col-action { width: 5%; text-align: center; }
.selected-players-table .col-player { width: auto; white-space: normal; }
.selected-players-table .col-set { width: auto; white-space: normal; }
.selected-players-table .col-rarity { width: 10%; }
.selected-players-table .col-floor { width: 10%; text-align: right; }
.selected-players-table .col-fmv { width: 10%; text-align: right; }
.selected-players-table .col-total-editions { width: 10%; text-align: center; }
.selected-players-table .col-jersey { width: 8%; text-align: center; }
.selected-players-table .col-edition-select { width: 12%; }
.edition-dropdown { width: 100%; padding: 4px 6px; background-color: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: 4px; font-size: 0.9em; cursor: pointer; }
#evaluate-deal { padding: 12px 30px; font-size: 1.1em; background-color: var(--accent-positive); font-weight: 600; }
#evaluate-deal:hover { background-color: #16a34a; }
#results-container { width: 100%; margin-top: 20px; text-align: center; }
#results h2 { margin-bottom: 15px; font-size: 1.4em; color: var(--text-accent); }
#results-table { border-collapse: collapse; width: 80%; max-width: 600px; margin: 0 auto; text-align: center; font-size: 1.1em; }
#results-table th, #results-table td { border: 1px solid var(--border-color); padding: 12px 15px; }
#results-table thead th { background-color: var(--bg-tertiary); font-size: 0.9em; }
#result-message { text-align: center; font-size: 22px; font-weight: bold; color: var(--text-accent); margin-top: 25px; }
#direction-indicator { font-size: 24px; color: var(--text-accent); margin-top: 20px; text-align: center; }
.positive { color: var(--accent-positive); }
.negative { color: var(--accent-negative); }
.remove-button { background-color: var(--accent-negative); color: white; border: none; border-radius: 50%; width: 24px; height: 24px; line-height: 24px; text-align: center; cursor: pointer; font-weight: bold; font-size: 14px; transition: background-color 0.3s ease; padding: 0; }
.remove-button:hover { background-color: #dc2626; }

/* --- Theatre Container --- */
.theatre-container { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 80vh; padding: 30px 0; }
.video-player { width: 90%; max-width: 800px; border-radius: var(--border-radius); overflow: hidden; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3); margin-bottom: 20px; background-color: #000; }
.video-player video { display: block; width: 100%; }

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    nav .container { right: 2%; gap: 10px; }
    #account-search-form #account-search { min-width: 180px; }
    .series-btn, #account-search-form .search-button { padding: 8px 15px; height: 40px; }
    #account-search, #player-search, #owner-search, #set-filter { height: 40px; padding: 8px 12px; }
    /* Trader Responsive */
    .container.trader-top-section, .container.trader-selected-section { flex-direction: column; width: 90%; }
    .player-list-container, .selected-players-container { max-width: 100%; flex-basis: auto; }
    .player-select-list { height: 250px; }
}

@media (max-width: 768px) {
    .container { width: 95%; }
    nav { padding-bottom: 15px; min-height: auto; text-align: center; }
    nav ul { margin-bottom: 10px; }
    nav .container { position: static; transform: none; width: 95%; max-width: 500px; margin: 10px auto 0 auto; padding: 0; flex-direction: column; gap: 10px; }
    #account-search-form { width: 100%; }
    #account-search-form #account-search { flex-grow: 1; min-width: 100px; }
    #owner-search { max-width: none; }
    .search-container, .controls-area { flex-direction: column; align-items: stretch; padding-top: 10px; }
    #player-search, #set-filter { width: 100%; box-sizing: border-box; }
    .search-container label { margin-left: 0; margin-bottom: 5px; }
    .moment-info h2 { font-size: 1.4em; }
    .moment-meta, .moment-pricing { font-size: 1em; }
    .badge-icon { width: 48px; height: 48px; }
    .moment-stats { font-size: 0.9em; }
    .account-summary .info-item .value { font-size: 1.2em; }
    .account-status-icons { gap: 5px 15px; }
    .account-status-icons .boolean-icon { height: 20px; }
    .account-status-icons .count-amount { font-size: 1em; }
    th, td { padding: 10px 12px; font-size: 0.9em; }
    thead th { font-size: 0.8em; }
    h2 { font-size: 1.5em; }
    .table-responsive-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-left: -15px; margin-right: -15px; padding-left: 15px; padding-right: 15px; margin-bottom: 20px; }
    table { min-width: 700px; margin-top: 0; }
    .container_trader { flex-direction: column; width: 95%; } /* Should be removed if not used */
    .player-list { max-width: 100%; } /* Should be removed if not used */
    #results-table { width: 90%; font-size: 1em; }
    #results-table th, #results-table td { padding: 10px; }
    /* Set Page Responsive */
    .set-name { font-size: 1.1em; }
    .set-stats { justify-content: center; font-size: 0.85em; gap: 3px 10px;}
    .set-value-label { font-size: 1em; }
    .set-details-table, .still-needs-table { table-layout: auto; }
    .set-details-table th, .set-details-table td, .still-needs-table th, .still-needs-table td { width: auto !important; font-size: 0.85em; padding: 8px 10px; }
    .editions-cell { font-size: 0.8em; }
    .set-header-info { justify-content: center; }
    .set-title-group { flex-grow: 0; }
    .set-controls-group { margin-top: 5px; }
    /* Trader Responsive */
    .player-select-list { height: 200px; }
    .selected-players-table th, .selected-players-table td { white-space: normal; }
    .selected-players-table .col-action { width: auto; }
}

@media (max-width: 480px) {
    nav ul li { margin: 0 5px; }
    nav ul li a { padding: 6px 8px; font-size: 15px; }
    th, td { padding: 8px 10px; }
    .moment-info h2 { font-size: 1.2em; }
    .moment-meta, .moment-pricing { font-size: 0.95em; }
    .meta-separator { margin: 0 5px; }
    .badge-icon { width: 40px; height: 40px; }
    .moment-stats { font-size: 0.85em; gap: 3px 10px; }
    .stat-label { margin-right: 3px; }
    .moment-stats .boolean-icon { height: 16px; }
    .player-status-icons img.boolean-icon { height: 24px; margin: 0 1px 0 5px;}
    .player-status-icons img.check-icon, .player-status-icons img.x-icon { height: 18px; margin-right: 15px;}
    .account-status-icons .boolean-icon { height: 18px; }
    .account-status-icons .count-amount { font-size: 0.95em; }
    .account-summary .info-item .value { font-size: 1.1em; }
     /* Set Page Responsive */
    .set-name { font-size: 1em; }
    .set-stats { font-size: 0.8em; }
    .set-value-label { font-size: 0.95em; }
    .set-header-complete-indicator { font-size: 0.85em; padding: 2px 6px;}
    .set-title-group { gap: 5px; }
    .set-controls-group { gap: 5px; }
    /* Trader Responsive */
     .trade-add-button { font-size: 0.9em; padding: 8px 15px; }
     .selected-players-table { font-size: 0.85em; } /* Smaller font in selected table */
     .edition-dropdown { font-size: 0.85em; }
     #evaluate-deal { font-size: 1em; padding: 10px 20px; }
     #results-table { font-size: 0.9em;}
     #results-table th, #results-table td { padding: 8px; }
}

/* --- Rarity Badge Styling --- */
.rarity-badge {
  height: 60px;        /* Moved from inline style */
  width: auto;         /* Moved from inline style */
  margin-top: 4px;     /* Moved from inline style */
  vertical-align: middle; /* Good practice for inline images */
  border-radius: 4px;  /* Apply rounded corners - Adjust value as needed */
  display: inline-block; /* Ensures proper layout */
  overflow: hidden;    /* Keeps image content within rounded bounds */
}