/* Adaptive theme - detect WordPress theme preference */
.gam-adaptive-theme {
    color-scheme: light dark; /* Browser hint for color scheme */
}

/* Force light theme (ignore prefers-color-scheme) */
.gam-force-light {
    color-scheme: light;
}

/* Force dark theme (ignore prefers-color-scheme) */
.gam-force-dark {
    color-scheme: dark;
}

/* Default light theme */
.gam-template {
    padding: 40px 0 60px;
    background: transparent; /* Make background transparent as requested */
    min-height: 100vh;
}

.gam-item-single,
.gam-monster-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: transparent; /* Remove white background - let site theme show through */
}

/* Page hero shortcode wrapper */
.gam-page-hero-wrapper {
    width: 100%;
    box-sizing: border-box;
}

/* Hero section with item/monster name and image */
.gam-detail-hero {
    background: var(--gam-surface, #ffffff);
    border: 1px solid var(--gam-border, #e2e8f0);
    border-left: 4px solid var(--gam-accent, #2563eb);
    border-radius: 8px;
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.gam-detail-hero::before {
    content: none;
}

.gam-hero-content {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.gam-hero-image {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.gam-hero-info h1 {
    color: #fff !important;
    font-size: 2.5em;
    margin: 0 0 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

.gam-hero-info .gam-item-id {
    color: #e2e8f0;
    font-size: 1.1em;
    opacity: 0.8;
    margin-bottom: 15px;
}

.gam-hero-info .gam-item-type {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9em;
}

/* Hero title/subtitle inside .gam-detail-hero (white card) — dark text */
.gam-detail-hero .gam-hero-title {
    color: var(--gam-text, #0f172a) !important;
    font-size: 1.375rem;
    margin: 0 0 6px 0;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: none;
}

.gam-detail-hero .gam-hero-subtitle {
    color: var(--gam-text-2, #475569) !important;
    margin: 0;
    font-size: 0.9rem;
}

/* MVP badge */
.gam-mvp-badge {
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* Stats cards grid */
.gam-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px; /* Space before next section */
}

.gam-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.gam-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.gam-stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
}

.gam-stat-card h3 {
    color: #0f172a;
    font-size: 1.3em;
    margin: 0 0 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Welcome card specific styles */
.gam-welcome-title {
    color: #0f172a;
}

.gam-welcome-text {
    color: #64748b;
}

.gam-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.gam-stat-row:last-child {
    border-bottom: none;
}

.gam-stat-label {
    color: #374151;
    font-weight: 600;
    font-size: 15px;
}

.gam-stat-value {
    color: #0f172a;
    font-weight: 700;
    font-family: monospace;
    font-size: 15px;
}

.gam-stat-value.highlight {
    color: #059669;
}

/* Description/Script section */
.gam-description-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px; /* Space before next section */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s;
}

.gam-description-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.gam-description-card h3 {
    color: #0f172a;
    margin: 0 0 15px;
    font-size: 1.4em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gam-script-content {
    background: #f8fafc;
    color: #1e293b;
    padding: 20px;
    border-radius: 8px;
    font-family: "Courier New", monospace;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    border-left: 4px solid #3b82f6;
    overflow-x: auto;
}

/* Drops section */
.gam-drops-section {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    margin-bottom: 30px;
    transition: box-shadow 0.2s;
}

.gam-drops-section:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.gam-drops-section h3 {
    color: #0f172a;
    margin: 0 0 20px;
    font-size: 1.4em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gam-drop-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #f3f4f6;
    transition: all 0.2s ease;
}

.gam-drop-item:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gam-drop-monster {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.gam-drop-monster-name {
    color: #111827 !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gam-drop-monster-info,
.gam-drop-steal-info {
    color: #475569;
    font-size: 14px;
    font-weight: 500;
}

.gam-mvp-badge {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
}

.gam-drop-chance {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    min-width: 80px;
    text-align: center;
}

.gam-drop-chance.mvp {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.gam-no-data {
    color: #475569;
    font-style: italic;
    text-align: center;
    padding: 20px;
    font-size: 15px;
    font-weight: 500;
}

/* Equipment locations tags */
.gam-equip-locations {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.gam-equip-tag {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

/* Job classes */
.gam-job-classes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
}

.gam-job-tag {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 500;
}

/* Dark theme - when WordPress uses dark theme OR forced dark */
@media (prefers-color-scheme: dark) {
    .gam-adaptive-theme .gam-template {
        background: linear-gradient(
            135deg,
            #0f172a 0%,
            #1e293b 50%,
            #334155 100%
        );
    }

    /* Hero section - dark theme */
    .gam-adaptive-theme .gam-detail-hero {
        background: var(--gam-surface, #1e293b);
        border-color: var(--gam-border, #1e293b);
        border-left-color: var(--gam-accent, #60a5fa);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    .gam-adaptive-theme .gam-hero-title {
        color: var(--gam-text, #f1f5f9);
        text-shadow: none;
    }

    .gam-adaptive-theme .gam-hero-subtitle {
        color: var(--gam-text-2, #94a3b8);
    }

    .gam-adaptive-theme .gam-mvp-badge {
        color: #fbbf24;
        text-shadow: 0 0 10px #fbbf24;
    }

    .gam-adaptive-theme .gam-stat-card,
    .gam-adaptive-theme .gam-description-card,
    .gam-adaptive-theme .gam-drops-section {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
        transition:
            transform 0.2s,
            box-shadow 0.2s;
    }

    .gam-adaptive-theme .gam-stat-card:hover,
    .gam-adaptive-theme .gam-description-card:hover,
    .gam-adaptive-theme .gam-drops-section:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    }

    .gam-adaptive-theme .gam-stat-card h3,
    .gam-adaptive-theme .gam-description-card h3,
    .gam-adaptive-theme .gam-drops-section h3 {
        color: #e2e8f0;
    }

    /* Welcome card dark theme */
    .gam-adaptive-theme .gam-welcome-title {
        color: #e2e8f0;
    }

    .gam-adaptive-theme .gam-welcome-text {
        color: #94a3b8;
    }

    .gam-adaptive-theme .gam-stat-label {
        color: #94a3b8;
    }

    .gam-adaptive-theme .gam-stat-value {
        color: #fff;
    }

    .gam-adaptive-theme .gam-stat-value.highlight {
        color: #fbbf24;
    }

    .gam-adaptive-theme .gam-script-content {
        background: #0f172a;
        color: #e5e7eb;
    }

    .gam-adaptive-theme .gam-drop-item {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .gam-adaptive-theme .gam-drop-item:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .gam-adaptive-theme .gam-drop-monster-name {
        color: #e2e8f0 !important;
    }

    .gam-adaptive-theme .gam-drop-monster-info,
    .gam-adaptive-theme .gam-drop-steal-info {
        color: #94a3b8;
    }

    .gam-adaptive-theme .gam-no-data {
        color: #94a3b8;
    }
}

/* Force dark theme - apply dark colors regardless of prefers-color-scheme */
.gam-force-dark .gam-template {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

/* Hero section - dark theme */
.gam-force-dark .gam-detail-hero {
    background: #1e293b;
    border-color: #334155;
    border-left-color: #60a5fa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.gam-force-dark .gam-hero-title {
    color: #f1f5f9;
    text-shadow: none;
}

.gam-force-dark .gam-hero-subtitle {
    color: #94a3b8;
}

.gam-force-dark .gam-mvp-badge {
    color: #fbbf24;
    text-shadow: 0 0 10px #fbbf24;
}

.gam-force-dark .gam-stat-card,
.gam-force-dark .gam-description-card,
.gam-force-dark .gam-drops-section {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.gam-force-dark .gam-stat-card:hover,
.gam-force-dark .gam-description-card:hover,
.gam-force-dark .gam-drops-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

/* Welcome card dark theme */
.gam-force-dark .gam-welcome-title {
    color: #e2e8f0;
}

.gam-force-dark .gam-welcome-text {
    color: #94a3b8;
}

.gam-force-dark .gam-stat-card h3,
.gam-force-dark .gam-description-card h3,
.gam-force-dark .gam-drops-section h3 {
    color: #e2e8f0;
}

.gam-force-dark .gam-stat-label {
    color: #94a3b8;
}

.gam-force-dark .gam-stat-value {
    color: #fff;
}

.gam-force-dark .gam-stat-value.highlight {
    color: #fbbf24;
}

.gam-force-dark .gam-script-content {
    background: #0f172a;
    color: #e5e7eb;
}

.gam-force-dark .gam-drop-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gam-force-dark .gam-drop-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.gam-force-dark .gam-drop-monster-name {
    color: #e2e8f0 !important;
}

.gam-force-dark .gam-drop-monster-info,
.gam-force-dark .gam-drop-steal-info {
    color: #94a3b8;
}

.gam-force-dark .gam-no-data {
    color: #94a3b8;
}

/* Responsive design */
@media (max-width: 768px) {
    .gam-template {
        padding: 20px 0 40px;
    }

    .gam-detail-hero {
        padding: 25px;
        margin-bottom: 30px;
    }

    .gam-hero-title {
        font-size: 22px !important;
    }

    .gam-hero-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .gam-hero-info h1 {
        font-size: 2em;
    }

    .gam-stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 30px;
    }

    .gam-drop-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .gam-item-list,
    .gam-monster-list {
        padding: 20px 10px;
    }

    .gam-filter-form {
        margin: 0 0 30px;
    }

    .gam-pagination {
        margin: 30px 0;
    }
}
.gam-filter-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr auto;
    gap: 12px;
    margin: 0 0 40px;
    align-items: center;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.gam-filter-form input[type="text"],
.gam-filter-form select {
    padding: 10px 14px;
    font-size: 15px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 120px;
}

.gam-filter-form input[type="text"]:focus,
.gam-filter-form select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.gam-filter-form input[type="text"]::placeholder {
    color: #64748b;
    font-weight: 400;
}

.gam-filter-form option {
    background: #fff;
    color: #0f172a;
    font-weight: 500;
}

/* Dark theme for filters */
@media (prefers-color-scheme: dark) {
    .gam-adaptive-theme .gam-filter-form {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    }

    .gam-adaptive-theme .gam-filter-form input[type="text"],
    .gam-adaptive-theme .gam-filter-form select {
        border: 2px solid rgba(255, 255, 255, 0.2);
        background: rgba(255, 255, 255, 0.1);
        color: #e2e8f0;
    }

    .gam-adaptive-theme .gam-filter-form input[type="text"]:focus,
    .gam-adaptive-theme .gam-filter-form select:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
        background: rgba(255, 255, 255, 0.15);
    }

    .gam-adaptive-theme .gam-filter-form input[type="text"]::placeholder {
        color: #94a3b8;
    }

    .gam-adaptive-theme .gam-filter-form option {
        background: #1e293b;
        color: #e2e8f0;
    }
}

/* Force dark theme for filters */
.gam-force-dark .gam-filter-form {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.gam-force-dark .gam-filter-form input[type="text"],
.gam-force-dark .gam-filter-form select {
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.gam-force-dark .gam-filter-form input[type="text"]:focus,
.gam-force-dark .gam-filter-form select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.gam-force-dark .gam-filter-form input[type="text"]::placeholder {
    color: #94a3b8;
}

.gam-force-dark .gam-filter-form option {
    background: #1e293b;
    color: #e2e8f0;
}

.gam-filter-form button {
    padding: 10px 20px;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
}

.gam-filter-form button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Simple Search Form Styles */
.gam-simple-search-form {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    transition:
        box-shadow 0.2s,
        transform 0.2s;
}

.gam-simple-search-form:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.gam-simple-search-form .simple-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gam-simple-search-form input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.gam-simple-search-form input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.gam-simple-search-form .search-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.gam-simple-search-form .search-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.gam-simple-search-form .advanced-toggle-btn {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.gam-simple-search-form .advanced-toggle-btn:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    transform: translateY(-1px);
}

/* Dark theme for simple search */
@media (prefers-color-scheme: dark) {
    .gam-adaptive-theme .gam-simple-search-form {
        background: rgba(31, 41, 55, 0.95);
        border-color: #4b5563;
    }

    .gam-adaptive-theme .gam-simple-search-form input[type="text"] {
        background: #374151;
        border-color: #6b7280;
        color: #d1d5db;
    }

    .gam-adaptive-theme .gam-simple-search-form input[type="text"]:focus {
        background: #374151;
        border-color: #60a5fa;
        box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    }
}

/* Force dark theme for simple search */
.gam-force-dark .gam-simple-search-form {
    background: rgba(31, 41, 55, 0.95);
    border-color: #4b5563;
}

.gam-force-dark .gam-simple-search-form input[type="text"] {
    background: #374151;
    border-color: #6b7280;
    color: #d1d5db;
}

.gam-force-dark .gam-simple-search-form input[type="text"]:focus {
    background: #374151;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

/* Advanced Filter Form Styles */
.gam-advanced-filter-form {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    transition:
        box-shadow 0.2s,
        transform 0.2s;
}

.gam-advanced-filter-form:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.gam-advanced-filter-form .filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.gam-advanced-filter-form .filter-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.gam-advanced-filter-form .filter-row label {
    font-weight: 700;
    color: #0f172a;
    min-width: 120px;
    font-size: 15px;
}

.gam-advanced-filter-form input[type="text"],
.gam-advanced-filter-form input[type="number"],
.gam-advanced-filter-form select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 140px;
}

.gam-advanced-filter-form input[type="text"]:focus,
.gam-advanced-filter-form input[type="number"]:focus,
.gam-advanced-filter-form select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #fff;
}

.gam-advanced-filter-form button {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.gam-advanced-filter-form button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.gam-advanced-filter-form a {
    color: #6b7280;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.gam-advanced-filter-form a:hover {
    color: #374151;
    background: #f3f4f6;
}

/* Dark theme for advanced filters */
@media (prefers-color-scheme: dark) {
    .gam-adaptive-theme .gam-advanced-filter-form {
        background: rgba(31, 41, 55, 0.9);
        border-color: #4b5563;
        color: #d1d5db;
    }

    .gam-adaptive-theme .gam-advanced-filter-form .filter-row {
        border-bottom-color: #4b5563;
    }

    .gam-adaptive-theme .gam-advanced-filter-form .filter-row label {
        color: #d1d5db;
    }

    .gam-adaptive-theme .gam-advanced-filter-form input[type="text"],
    .gam-adaptive-theme .gam-advanced-filter-form input[type="number"],
    .gam-adaptive-theme .gam-advanced-filter-form select {
        background: #374151;
        border-color: #6b7280;
        color: #d1d5db;
    }

    .gam-adaptive-theme .gam-advanced-filter-form input[type="text"]:focus,
    .gam-adaptive-theme .gam-advanced-filter-form input[type="number"]:focus,
    .gam-adaptive-theme .gam-advanced-filter-form select:focus {
        background: #374151;
        border-color: #60a5fa;
        box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    }

    .gam-adaptive-theme .gam-advanced-filter-form a {
        color: #9ca3af;
    }

    .gam-adaptive-theme .gam-advanced-filter-form a:hover {
        color: #d1d5db;
        background: #4b5563;
    }
}

/* Force dark theme for advanced filters */
.gam-force-dark .gam-advanced-filter-form {
    background: rgba(31, 41, 55, 0.9);
    border-color: #4b5563;
    color: #d1d5db;
}

.gam-force-dark .gam-advanced-filter-form .filter-row {
    border-bottom-color: #4b5563;
}

.gam-force-dark .gam-advanced-filter-form .filter-row label {
    color: #d1d5db;
}

.gam-force-dark .gam-advanced-filter-form input[type="text"],
.gam-force-dark .gam-advanced-filter-form input[type="number"],
.gam-force-dark .gam-advanced-filter-form select {
    background: #374151;
    border-color: #6b7280;
    color: #d1d5db;
}

.gam-force-dark .gam-advanced-filter-form input[type="text"]:focus,
.gam-force-dark .gam-advanced-filter-form input[type="number"]:focus,
.gam-force-dark .gam-advanced-filter-form select:focus {
    background: #374151;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.gam-force-dark .gam-advanced-filter-form a {
    color: #9ca3af;
}

.gam-force-dark .gam-advanced-filter-form a:hover {
    color: #d1d5db;
    background: #4b5563;
}

/* Responsive design for advanced filters */
@media (max-width: 768px) {
    .gam-advanced-filter-form .filter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .gam-advanced-filter-form .filter-row label {
        min-width: auto;
        width: 100%;
    }

    .gam-advanced-filter-form input[type="text"],
    .gam-advanced-filter-form input[type="number"],
    .gam-advanced-filter-form select {
        width: 100%;
        min-width: auto;
    }
}

/* Centered, constrained content wrappers - Light theme by default */
.gam-item-list,
.gam-monster-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    background: transparent; /* Make background transparent as requested */
    min-height: 100vh;
}

.gam-item-list .gam-table,
.gam-monster-list .gam-table {
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Price column styling */
.gam-item-price {
    color: #059669;
    font-weight: 600;
    font-family: "Courier New", monospace;
}

/* Monster type badges */
.gam-monster-type {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gam-type-mvp {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

.gam-type-miniboss {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #fff;
    box-shadow: 0 2px 4px rgba(217, 119, 6, 0.3);
}

.gam-type-normal {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

/* Experience and HP value styling */
.gam-exp-value,
.gam-mvp-exp,
.gam-hp-value {
    font-family: "Courier New", monospace;
    font-weight: 600;
}

.gam-mvp-exp {
    color: #dc2626;
}

.gam-exp-value {
    color: #0369a1;
}

.gam-hp-value {
    color: #dc2626;
}

/* Dark theme for lists */
@media (prefers-color-scheme: dark) {
    .gam-adaptive-theme.gam-item-list,
    .gam-adaptive-theme.gam-monster-list {
        background: transparent; /* Make dark theme background transparent too */
    }

    .gam-adaptive-theme .gam-table {
        background: linear-gradient(
            135deg,
            #1e293b 0%,
            #334155 100%
        ) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
    }

    .gam-adaptive-theme .gam-table thead th {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        color: #e2e8f0;
    }

    .gam-adaptive-theme .gam-table tbody tr {
        background: #1e293b;
    }

    .gam-adaptive-theme .gam-table tbody tr:nth-child(even) {
        background: #334155;
    }

    .gam-adaptive-theme .gam-table tbody tr:hover {
        background: #475569;
    }

    .gam-adaptive-theme .gam-table th,
    .gam-adaptive-theme .gam-table td {
        color: #e2e8f0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .gam-adaptive-theme .gam-item-price {
        color: #10b981;
    }

    .gam-adaptive-theme .gam-exp-value {
        color: #38bdf8;
    }

    .gam-adaptive-theme .gam-mvp-exp {
        color: #f87171;
    }

    .gam-adaptive-theme .gam-hp-value {
        color: #f87171;
    }

    .gam-adaptive-theme .gam-items tbody tr:hover,
    .gam-adaptive-theme .gam-monsters tbody tr:hover {
        background: linear-gradient(90deg, #78350f 0%, #92400e 100%);
        border-left: 4px solid #f59e0b;
    }

    .gam-adaptive-theme .gam-drops tbody tr:hover {
        background: linear-gradient(90deg, #064e3b 0%, #065f46 100%);
        border-left: 4px solid #10b981;
    }

    .gam-adaptive-theme .gam-skills tbody tr:hover {
        background: linear-gradient(90deg, #4c1d95 0%, #5b21b6 100%);
        border-left: 4px solid #8b5cf6;
    }

    .gam-adaptive-theme .gam-imdb-scroll {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .gam-adaptive-theme .gam-imdb-scroll:hover {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    }
}

/* Force dark theme for lists */
.gam-force-dark.gam-item-list,
.gam-force-dark.gam-monster-list {
    background: transparent;
}

.gam-force-dark .gam-table {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
}

.gam-force-dark .gam-table thead th {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
}

.gam-force-dark .gam-table tbody tr {
    background: #1e293b;
}

.gam-force-dark .gam-table tbody tr:nth-child(even) {
    background: #334155;
}

.gam-force-dark .gam-table tbody tr:hover {
    background: #475569;
}

.gam-force-dark .gam-table th,
.gam-force-dark .gam-table td {
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gam-force-dark .gam-item-price {
    color: #10b981;
}

.gam-force-dark .gam-exp-value {
    color: #38bdf8;
}

.gam-force-dark .gam-mvp-exp {
    color: #f87171;
}

.gam-force-dark .gam-hp-value {
    color: #f87171;
}

.gam-force-dark .gam-items tbody tr:hover,
.gam-force-dark .gam-monsters tbody tr:hover {
    background: linear-gradient(90deg, #78350f 0%, #92400e 100%);
    border-left: 4px solid #f59e0b;
}

.gam-force-dark .gam-drops tbody tr:hover {
    background: linear-gradient(90deg, #064e3b 0%, #065f46 100%);
    border-left: 4px solid #10b981;
}

.gam-force-dark .gam-skills tbody tr:hover {
    background: linear-gradient(90deg, #4c1d95 0%, #5b21b6 100%);
    border-left: 4px solid #8b5cf6;
}

.gam-force-dark .gam-imdb-scroll {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.gam-force-dark .gam-imdb-scroll:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Card-like sections with enhanced styling */
.gam-item-single,
.gam-monster-single {
    /* Removed background container - let individual cards stand out */
    /* background:#fff; */
    /* border:1px solid #e2e8f0; */
    /* border-radius:16px; */
    /* box-shadow:0 4px 24px rgba(0,0,0,.08); */
    /* overflow:hidden; */
}

.gam-item-list .gam-imdb-scroll,
.gam-monster-list .gam-imdb-scroll {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px; /* Increased spacing */
    transition:
        box-shadow 0.2s,
        transform 0.2s;
}

.gam-item-list .gam-imdb-scroll:hover,
.gam-monster-list .gam-imdb-scroll:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.gam-item-single h2,
.gam-monster-single h2 {
    margin: 0;
    padding: 20px 24px 16px;
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gam-item-single h3,
.gam-monster-single h3 {
    margin: 24px 24px 16px;
    padding: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 2px solid #e2e8f0;
}

/* Enhanced headers and meta sections */
.gam-item-header,
.gam-monster-header {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 0 0 20px;
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.gam-item-meta,
.gam-monster-meta {
    flex: 1;
    min-width: 300px;
}

/* Responsive: wrap tables */
.gam-imdb-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
}
.gam-imdb-scroll table {
    min-width: 720px;
    border-radius: 10px;
}

@media (max-width: 760px) {
    .gam-imdb-table th,
    .gam-imdb-table td {
        font-size: 12px;
    }
    .gam-imdb-card-list .gam-imdb-item {
        display: block;
        width: 100%;
    }
    .gam-imdb-drops {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .gam-imdb-drops li {
        flex: 1 1 48%;
    }
}
/* Enhanced pagination */
.gam-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 40px 0;
    padding: 16px;
}

.gam-pagination a,
.gam-pagination span {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.gam-pagination a:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.gam-pagination span.current {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.gam-pagination span.dots {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-weight: bold;
    cursor: default;
    padding: 10px 8px;
}
.gam-item-desc {
    background: #0f172a;
    color: #e5e7eb;
    padding: 10px;
    white-space: pre-wrap;
    font-size: 13px;
    max-height: 360px;
    overflow: auto;
    border-radius: 8px;
}

/* Modern Table aesthetics */
.gam-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    font-size: 15px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.gam-table thead th {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    z-index: 1;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: none;
    padding: 14px 16px;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.gam-table th,
.gam-table td {
    padding: 12px 16px;
    border: none;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: #0f172a;
    font-weight: 500;
}

.gam-table tbody tr {
    background: #fff;
    transition: all 0.2s ease;
}

.gam-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.gam-table tbody tr:hover {
    background: #e0f2fe;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gam-table tbody tr:last-child td {
    border-bottom: none;
}

/* Item and monster specific styling */
.gam-items tbody tr:hover,
.gam-monsters tbody tr:hover {
    background: linear-gradient(90deg, #fef7cd 0%, #fef3c7 100%);
    border-left: 4px solid #f59e0b;
}

.gam-drops tbody tr:hover {
    background: linear-gradient(90deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 4px solid #10b981;
}

.gam-skills tbody tr:hover {
    background: linear-gradient(90deg, #ede9fe 0%, #ddd6fe 100%);
    border-left: 4px solid #8b5cf6;
}

/* Vertical meta table for detail pages */
.vertical-table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.vertical-table th {
    width: 28%;
    text-align: left;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    font-weight: 700;
    padding: 12px 16px;
    border: none;
    font-size: 15px;
}

.vertical-table td {
    width: 22%;
    background: #fff;
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    color: #0f172a;
    font-size: 15px;
    font-weight: 600;
}

.vertical-table tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.vertical-table tbody tr:hover td {
    background: #e0f2fe;
}
.gam-title-icon,
.gam-item-single .gam-thumb {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 6px;
}
/* Enhanced images and media */
.gam-thumb {
    width: 32px;
    height: 32px;
    object-fit: contain;
    image-rendering: pixelated;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.gam-thumb:hover {
    transform: scale(1.1);
}

.gam-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    image-rendering: pixelated;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 8px;
}

.gam-no-media {
    display: inline-block;
    padding: 6px 10px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    font-size: 13px;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Enhanced item description styling */
.gam-item-desc {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    padding: 16px;
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.6;
    max-height: 400px;
    overflow: auto;
    border-radius: 12px;
    border: 1px solid #334155;
    font-family: "Monaco", "Consolas", monospace;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gam-item-desc::-webkit-scrollbar {
    width: 8px;
}

.gam-item-desc::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 4px;
}

.gam-item-desc::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

.gam-item-desc::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}
/* Mobile responsive enhancements */
@media (max-width: 1200px) {
    .gam-filter-form {
        grid-template-columns: 2fr 1fr 1fr 1fr auto;
        gap: 10px;
    }
}

@media (max-width: 900px) {
    .gam-filter-form {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .gam-item-list,
    .gam-monster-list,
    .gam-item-single,
    .gam-monster-single {
        padding: 8px;
        margin: 8px;
    }

    .gam-item-single h2,
    .gam-monster-single h2 {
        font-size: 20px;
        padding: 16px 20px 12px;
    }

    .gam-item-header,
    .gam-monster-header {
        flex-direction: column;
        padding: 16px;
    }

    .gam-image {
        width: 80px;
        height: 80px;
        align-self: center;
    }

    .gam-table {
        font-size: 12px;
    }

    .gam-table th,
    .gam-table td {
        padding: 8px 10px;
    }

    .gam-filter-form {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .gam-filter-form input[type="text"],
    .gam-filter-form select {
        min-width: auto;
        width: 100%;
        margin-bottom: 8px;
    }

    .gam-pagination a,
    .gam-pagination span {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Special styling for MVP drops */
.item-drop-mvp {
    background: linear-gradient(90deg, #fef3c7 0%, #fcd34d 100%) !important;
    border-left: 4px solid #f59e0b !important;
    font-weight: 600;
}

.item-drop-mvp .mvp {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-right: 4px;
}

/* Mobile Responsive Enhancements - Table Overflow Fix */
@media (max-width: 768px) {
    /* Ensure table wrapper allows horizontal scroll */
    .gam-item-list .dataTables_wrapper,
    .gam-monster-list .dataTables_wrapper,
    .gam-item-list > div:has(.gam-table),
    .gam-monster-list > div:has(.gam-table) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
    }

    /* Prevent table from being crushed */
    .gam-item-list .gam-table,
    .gam-monster-list .gam-table,
    .gam-item-list table.dataTable,
    .gam-monster-list table.dataTable {
        min-width: 600px;
        white-space: nowrap;
    }

    /* Make table cells not wrap */
    .gam-table th,
    .gam-table td {
        white-space: nowrap;
    }

    /* Ensure DataTables controls are responsive */
    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .dataTables_wrapper .dataTables_length select {
        width: auto;
        min-width: 60px;
    }

    /* Adjust pagination for mobile */
    .dataTables_wrapper .dataTables_paginate {
        margin-top: 15px;
        text-align: center;
    }

    .dataTables_wrapper .dataTables_info {
        padding-top: 10px;
        text-align: center;
    }

    /* Mobile-friendly search form layout - stack vertically */
    .gam-simple-search-form .simple-search-row {
        flex-direction: column;
        gap: 10px;
    }

    .gam-simple-search-form input[type="text"] {
        width: 100% !important;
        margin: 0 !important;
        flex: none;
    }

    .gam-simple-search-form .search-btn,
    .gam-simple-search-form .advanced-toggle-btn {
        width: 100%;
        padding: 14px 24px;
        text-align: center;
    }
}

/* Extra small devices - even more compact */
@media (max-width: 480px) {
    .gam-detail-hero {
        padding: 15px 12px;
    }

    .gam-hero-title {
        font-size: 18px !important;
    }

    .gam-hero-subtitle {
        font-size: 13px !important;
    }

    .gam-item-list .gam-table,
    .gam-monster-list .gam-table,
    .gam-item-list table.dataTable,
    .gam-monster-list table.dataTable {
        min-width: 500px;
        font-size: 11px;
    }

    .gam-table th,
    .gam-table td {
        padding: 6px 8px;
    }

    .gam-pagination a,
    .gam-pagination span {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 32px;
    }

    .gam-filter-form {
        padding: 12px;
        gap: 6px;
    }

    .gam-filter-form input[type="text"],
    .gam-filter-form select {
        font-size: 14px;
        padding: 8px 12px;
    }

    /* Compact search form on small screens */
    .gam-simple-search-form {
        padding: 12px;
    }

    .gam-simple-search-form input[type="text"] {
        font-size: 14px;
        padding: 10px 14px;
    }

    .gam-simple-search-form .search-btn,
    .gam-simple-search-form .advanced-toggle-btn {
        padding: 12px 20px;
        font-size: 13px;
    }
}

/* Modern mobile list layout — overrides old horizontal table fallback. */
@media (max-width: 640px) {
    .gam-item-list,
    .gam-monster-list {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-height: auto;
        margin: 0;
        padding: 22px 0 36px;
        overflow-x: hidden;
    }

    .gam-item-list > *,
    .gam-monster-list > * {
        max-width: 100%;
        box-sizing: border-box;
    }

    .gam-item-list .gam-hero,
    .gam-monster-list .gam-hero,
    .gam-page-hero-wrapper .gam-hero {
        width: 100%;
        max-width: 100%;
        margin: 0 0 18px;
        padding: 16px 18px;
        border-radius: 8px;
    }

    .gam-item-list .gam-hero-title,
    .gam-monster-list .gam-hero-title,
    .gam-page-hero-wrapper .gam-hero .gam-hero-title {
        font-size: 1.35rem !important;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .gam-item-list .gam-hero-subtitle,
    .gam-monster-list .gam-hero-subtitle,
    .gam-page-hero-wrapper .gam-hero .gam-hero-subtitle {
        font-size: 0.875rem !important;
        line-height: 1.45;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .gam-item-list .gam-input-group,
    .gam-monster-list .gam-input-group {
        flex-wrap: wrap;
        gap: 8px;
    }

    .gam-item-list .gam-input-group .gam-input,
    .gam-monster-list .gam-input-group .gam-input {
        flex: 1 1 100%;
        min-width: 0;
        border-radius: 8px;
    }

    .gam-item-list .gam-input-group .gam-btn,
    .gam-monster-list .gam-input-group .gam-btn {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        min-height: 42px;
        border-left-width: 2px;
        border-radius: 8px;
        padding-inline: 12px;
    }

    .gam-item-list .gam-chips-wrap,
    .gam-monster-list .gam-chips-wrap {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .gam-item-list .gam-table-wrap,
    .gam-monster-list .gam-table-wrap,
    .gam-item-list > div:has(.gam-table--mobile-stack),
    .gam-monster-list > div:has(.gam-table--mobile-stack) {
        width: 100%;
        max-width: 100%;
        overflow: visible;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    .gam-item-list .gam-table.gam-table--mobile-stack,
    .gam-monster-list .gam-table.gam-table--mobile-stack,
    .gam-item-list table.dataTable.gam-table--mobile-stack,
    .gam-monster-list table.dataTable.gam-table--mobile-stack {
        display: block;
        width: 100% !important;
        min-width: 0 !important;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        white-space: normal !important;
    }

    .gam-item-list .gam-table--mobile-stack thead,
    .gam-monster-list .gam-table--mobile-stack thead {
        display: none !important;
    }

    .gam-item-list .gam-table--mobile-stack tbody,
    .gam-monster-list .gam-table--mobile-stack tbody {
        display: grid;
        gap: 12px;
        width: 100%;
    }

    .gam-item-list .gam-table--mobile-stack tbody tr,
    .gam-monster-list .gam-table--mobile-stack tbody tr {
        display: grid !important;
        width: 100%;
        margin: 0;
        padding: 14px;
        background: var(--gam-surface) !important;
        border: 1px solid var(--gam-border);
        border-radius: 8px;
        box-shadow: var(--gam-shadow-sm);
        transform: none !important;
    }

    .gam-item-list .gam-table--mobile-stack td,
    .gam-monster-list .gam-table--mobile-stack td {
        display: grid !important;
        grid-template-columns: minmax(76px, 34%) minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        width: 100%;
        min-width: 0;
        padding: 9px 0 !important;
        border-bottom: 1px solid var(--gam-border);
        color: var(--gam-text);
        white-space: normal !important;
        text-align: left;
    }

    .gam-item-list .gam-table--mobile-stack td:last-child,
    .gam-monster-list .gam-table--mobile-stack td:last-child {
        border-bottom: 0;
    }

    .gam-item-list .gam-table--mobile-stack td::before,
    .gam-monster-list .gam-table--mobile-stack td::before {
        min-width: 0;
        margin: 0;
        color: var(--gam-text-3);
        font-size: 0.72rem;
        line-height: 1.2;
    }

    .gam-item-list .gam-table--mobile-stack .gam-item-cell,
    .gam-monster-list .gam-table--mobile-stack .gam-item-cell {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 10px;
    }

    .gam-item-list .gam-table--mobile-stack .gam-item-thumb,
    .gam-monster-list .gam-table--mobile-stack .gam-item-thumb {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        min-width: 34px;
    }

    .gam-item-list .gam-table--mobile-stack .gam-item-name,
    .gam-monster-list .gam-table--mobile-stack .gam-item-name {
        display: block;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.35;
    }
}

/* ============================================================
   Inline reference badges  [item_link] / [mob_link]
   ============================================================ */
.gam-ref-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px 2px 3px;
    border-radius: 20px;
    font-size: 0.82em;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none !important;
    vertical-align: middle;
    white-space: nowrap;
    border: 1px solid transparent;
    transition:
        filter 0.15s ease,
        transform 0.1s ease;
}
.gam-ref-badge:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    text-decoration: none !important;
}
.gam-ref-item {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    color: #3b82f6;
}
.gam-ref-mob {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}
.gam-ref-missing {
    background: rgba(107, 114, 128, 0.12);
    border-color: rgba(107, 114, 128, 0.3);
    color: #6b7280;
    cursor: default;
}
.gam-ref-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.gam-ref-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}
.gam-ref-name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gam-ref-slot {
    font-weight: 400;
    font-size: 0.88em;
    opacity: 0.75;
    padding-left: 2px;
}
.gam-ref-slot::before {
    content: "·";
    margin-right: 3px;
}
.gam-ref-mvp {
    font-size: 0.75em;
    font-weight: 700;
    background: rgba(251, 191, 36, 0.25);
    color: #d97706;
    border-radius: 4px;
    padding: 0 4px;
}
.gam-ref-miniboss {
    font-size: 0.75em;
    font-weight: 700;
    background: rgba(217, 119, 6, 0.2);
    color: #b45309;
    border-radius: 4px;
    padding: 0 4px;
}

/* ============================================================
   EXP Rate Badges — small inline badges next to EXP values
   ============================================================ */
.gam-rate-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.65em;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-left: 6px;
    vertical-align: middle;
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.gam-rate-badge-mvp {
    background: rgba(251, 191, 36, 0.15);
    color: #d97706;
    border-color: rgba(251, 191, 36, 0.3);
}

/* Dark theme for rate badges */
@media (prefers-color-scheme: dark) {
    .gam-adaptive-theme .gam-rate-badge {
        background: rgba(96, 165, 250, 0.2);
        color: #60a5fa;
        border-color: rgba(96, 165, 250, 0.35);
    }
    .gam-adaptive-theme .gam-rate-badge-mvp {
        background: rgba(251, 191, 36, 0.2);
        color: #fbbf24;
        border-color: rgba(251, 191, 36, 0.35);
    }
}
.gam-force-dark .gam-rate-badge {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.35);
}
.gam-force-dark .gam-rate-badge-mvp {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.35);
}

/* Spawn Locations Section */
.gam-spawns-section {
    margin-bottom: 40px;
}
.gam-spawns-section h3 {
    font-size: 1.4em;
    margin-bottom: 20px;
    color: #0f172a;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.gam-spawns-updated-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 0.85em;
    color: #64748b;
    border: 1px solid #f3f4f6;
}
.gam-spawns-updated-bar span:first-child {
    color: #64748b;
    font-weight: 500;
}
.gam-spawn-table-wrapper {
    overflow-x: auto;
}
.gam-spawn-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}
.gam-spawn-table thead th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid #e5e7eb;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.gam-spawn-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}
.gam-spawn-table tbody tr:hover {
    background: #f9fafb;
}
.gam-spawn-table tbody tr:last-child {
    border-bottom: none;
}
.gam-spawn-table td {
    padding: 10px 12px;
    vertical-align: middle;
}
.gam-spawn-map-link {
    color: #2563eb;
    text-decoration: none;
    font-family: monospace;
    font-weight: 500;
    transition: color 0.15s;
}
.gam-spawn-map-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}
.gam-spawn-boss-tag {
    display: inline-block;
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    font-size: 0.7em;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}
.gam-spawn-row.gam-spawn-boss {
    background: rgba(245, 158, 11, 0.03);
}
.gam-spawn-row.gam-spawn-boss:hover {
    background: rgba(245, 158, 11, 0.08);
}
.gam-spawn-count-val {
    font-weight: 700;
    color: #111827;
    font-size: 1.05em;
}
.gam-spawn-count-label {
    color: #6b7280;
    font-size: 0.85em;
    margin-left: 2px;
}
.gam-spawn-respawn-val {
    color: #6b7280;
    font-family: monospace;
}

/* Dark theme for spawn section */
@media (prefers-color-scheme: dark) {
    .gam-adaptive-theme .gam-spawns-section h3 {
        color: #e2e8f0;
    }
    .gam-adaptive-theme .gam-spawns-updated-bar {
        background: rgba(30, 41, 59, 0.8);
        border-color: rgba(71, 85, 105, 0.5);
        color: #94a3b8;
    }
    .gam-adaptive-theme .gam-spawns-updated-bar span:first-child {
        color: #60a5fa;
    }
    .gam-adaptive-theme .gam-spawn-table thead th {
        border-bottom-color: rgba(71, 85, 105, 0.5);
        color: #94a3b8;
    }
    .gam-adaptive-theme .gam-spawn-table tbody tr {
        border-bottom-color: rgba(71, 85, 105, 0.3);
    }
    .gam-adaptive-theme .gam-spawn-table tbody tr:hover {
        background: rgba(51, 65, 85, 0.3);
    }
    .gam-adaptive-theme .gam-spawn-map-link {
        color: #60a5fa;
    }
    .gam-adaptive-theme .gam-spawn-map-link:hover {
        color: #93c5fd;
    }
    .gam-adaptive-theme .gam-spawn-count-val {
        color: #e2e8f0;
    }
    .gam-adaptive-theme .gam-spawn-count-label {
        color: #64748b;
    }
    .gam-adaptive-theme .gam-spawn-respawn-val {
        color: #94a3b8;
    }
}
.gam-force-dark .gam-spawns-section h3 {
    color: #e2e8f0;
}
.gam-force-dark .gam-spawns-updated-bar {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(71, 85, 105, 0.5);
    color: #94a3b8;
}
.gam-force-dark .gam-spawns-updated-bar span:first-child {
    color: #60a5fa;
}
.gam-force-dark .gam-spawn-table thead th {
    border-bottom-color: rgba(71, 85, 105, 0.5);
    color: #94a3b8;
}
.gam-force-dark .gam-spawn-table tbody tr {
    border-bottom-color: rgba(71, 85, 105, 0.3);
}
.gam-force-dark .gam-spawn-table tbody tr:hover {
    background: rgba(51, 65, 85, 0.3);
}
.gam-force-dark .gam-spawn-map-link {
    color: #60a5fa;
}
.gam-force-dark .gam-spawn-map-link:hover {
    color: #93c5fd;
}
.gam-force-dark .gam-spawn-count-val {
    color: #e2e8f0;
}
.gam-force-dark .gam-spawn-count-label {
    color: #64748b;
}
.gam-force-dark .gam-spawn-respawn-val {
    color: #94a3b8;
}

/* Spawn Modal */
.gam-spawn-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.gam-spawn-modal {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}
.gam-spawn-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}
.gam-spawn-modal-header h4 {
    margin: 0;
    font-size: 1.1em;
    color: #0f172a;
    font-weight: 700;
}
.gam-spawn-modal-close {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
}
.gam-spawn-modal-close:hover {
    color: #0f172a;
}
.gam-spawn-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    max-height: 60vh;
}
.gam-spawn-modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}
.gam-spawn-modal-table thead th {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 2px solid #e5e7eb;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.gam-spawn-modal-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
}
.gam-spawn-modal-table tbody tr:last-child {
    border-bottom: none;
}
.gam-spawn-modal-table td {
    padding: 8px 10px;
    color: #374151;
}
.gam-spawn-monster-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}
.gam-spawn-monster-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}
.gam-spawn-monster-thumb {
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}
.gam-spawn-monster-thumb img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}
.gam-spawn-modal-table .gam-spawn-count-val {
    font-weight: 700;
    color: #111827;
}
.gam-spawn-modal-table .gam-spawn-count-label {
    color: #6b7280;
    font-size: 0.85em;
}

/* Dark theme modal */
@media (prefers-color-scheme: dark) {
    .gam-adaptive-theme .gam-spawn-modal {
        background: #1e293b;
        border-color: rgba(71, 85, 105, 0.5);
    }
    .gam-adaptive-theme .gam-spawn-modal-header {
        border-bottom-color: rgba(71, 85, 105, 0.5);
        background: rgba(51, 65, 85, 0.6);
    }
    .gam-adaptive-theme .gam-spawn-modal-header h4 {
        color: #e2e8f0;
    }
    .gam-adaptive-theme .gam-spawn-modal-close {
        color: #94a3b8;
    }
    .gam-adaptive-theme .gam-spawn-modal-close:hover {
        color: #e2e8f0;
    }
    .gam-adaptive-theme .gam-spawn-modal-table thead th {
        border-bottom-color: rgba(71, 85, 105, 0.5);
        color: #94a3b8;
    }
    .gam-adaptive-theme .gam-spawn-modal-table tbody tr {
        border-bottom-color: rgba(71, 85, 105, 0.3);
    }
    .gam-adaptive-theme .gam-spawn-modal-table td {
        color: #cbd5e1;
    }
    .gam-adaptive-theme .gam-spawn-monster-link {
        color: #60a5fa;
    }
    .gam-adaptive-theme .gam-spawn-monster-link:hover {
        color: #93c5fd;
    }
    .gam-adaptive-theme .gam-spawn-monster-thumb img {
        filter: brightness(0.9);
    }
    .gam-adaptive-theme .gam-spawn-modal-table .gam-spawn-count-val {
        color: #e2e8f0;
    }
    .gam-adaptive-theme .gam-spawn-modal-table .gam-spawn-count-label {
        color: #64748b;
    }
}
.gam-force-dark .gam-spawn-modal {
    background: #1e293b;
    border-color: rgba(71, 85, 105, 0.5);
}
.gam-force-dark .gam-spawn-modal-header {
    border-bottom-color: rgba(71, 85, 105, 0.5);
    background: rgba(51, 65, 85, 0.6);
}
.gam-force-dark .gam-spawn-modal-header h4 {
    color: #e2e8f0;
}
.gam-force-dark .gam-spawn-modal-close {
    color: #94a3b8;
}
.gam-force-dark .gam-spawn-modal-close:hover {
    color: #e2e8f0;
}
.gam-force-dark .gam-spawn-modal-table thead th {
    border-bottom-color: rgba(71, 85, 105, 0.5);
    color: #94a3b8;
}
.gam-force-dark .gam-spawn-modal-table tbody tr {
    border-bottom-color: rgba(71, 85, 105, 0.3);
}
.gam-force-dark .gam-spawn-modal-table td {
    color: #cbd5e1;
}
.gam-force-dark .gam-spawn-monster-link {
    color: #60a5fa;
}
.gam-force-dark .gam-spawn-monster-link:hover {
    color: #93c5fd;
}
.gam-force-dark .gam-spawn-monster-thumb img {
    filter: brightness(0.9);
}
.gam-force-dark .gam-spawn-modal-table .gam-spawn-count-val {
    color: #e2e8f0;
}
.gam-force-dark .gam-spawn-modal-table .gam-spawn-count-label {
    color: #64748b;
}

/* ============================================================
   BREADCRUMB NAVIGATION
   ============================================================ */
.gam-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    flex-wrap: wrap;
}
.gam-breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    transition:
        background 0.2s,
        color 0.2s,
        transform 0.15s;
    white-space: nowrap;
}
.gam-breadcrumb-link:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: translateX(-2px);
    text-decoration: none;
}
.gam-breadcrumb-link .gam-bc-arrow {
    font-size: 1.1em;
    line-height: 1;
}
.gam-bc-sep {
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    font-weight: 300;
}
.gam-bc-current {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   HERO COLOR VARIANTS — Item type-based
   ============================================================ */
/* Weapon — red/blood orange */
.gam-detail-hero.gam-hero--weapon {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #7f1d1d 100%);
}
/* Armor — deep navy blue */
.gam-detail-hero.gam-hero--armor {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 50%, #172554 100%);
}
/* Healing — emerald green */
.gam-detail-hero.gam-hero--healing {
    background: linear-gradient(135deg, #059669 0%, #047857 50%, #064e3b 100%);
}
/* Card — amber/gold */
.gam-detail-hero.gam-hero--card {
    background: linear-gradient(135deg, #d97706 0%, #b45309 50%, #78350f 100%);
}
/* Usable / Delay Consume */
.gam-detail-hero.gam-hero--usable {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #4c1d95 100%);
}
/* Ammo */
.gam-detail-hero.gam-hero--ammo {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 50%, #164e63 100%);
}
/* Shadow Gear */
.gam-detail-hero.gam-hero--shadow {
    background: linear-gradient(135deg, #475569 0%, #334155 50%, #0f172a 100%);
}
/* Default / Pet / Cash */
.gam-detail-hero.gam-hero--default {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
}

/* ============================================================
   HERO COLOR VARIANTS — Monster element-based
   ============================================================ */
.gam-detail-hero.gam-element--fire {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 40%, #991b1b 100%);
}
.gam-detail-hero.gam-element--water {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 40%, #1e3a8a 100%);
}
.gam-detail-hero.gam-element--wind {
    background: linear-gradient(135deg, #10b981 0%, #059669 40%, #065f46 100%);
}
.gam-detail-hero.gam-element--earth {
    background: linear-gradient(135deg, #78716c 0%, #57534e 40%, #292524 100%);
}
.gam-detail-hero.gam-element--poison {
    background: linear-gradient(135deg, #a855f7 0%, #7e22ce 40%, #581c87 100%);
}
.gam-detail-hero.gam-element--holy {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 40%, #92400e 100%);
}
.gam-detail-hero.gam-element--dark {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 100%);
}
.gam-detail-hero.gam-element--ghost {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 40%, #374151 100%);
}
.gam-detail-hero.gam-element--undead {
    background: linear-gradient(135deg, #166534 0%, #14532d 40%, #052e16 100%);
}
/* MVP bonus overlay */
.gam-detail-hero.gam-hero--mvp::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 8px,
        rgba(251, 191, 36, 0.06) 8px,
        rgba(251, 191, 36, 0.06) 16px
    );
    pointer-events: none;
    border-radius: inherit;
}

/* ============================================================
   STAT CARD — color-coded top accent per section type
   ============================================================ */
.gam-card-basic::before {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}
.gam-card-combat::before {
    background: linear-gradient(90deg, #ef4444, #b91c1c);
}
.gam-card-req::before {
    background: linear-gradient(90deg, #8b5cf6, #6d28d9);
}
.gam-card-exp::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

/* In detail pages, hero already communicates the type — remove colored stripes from sidebar */
.gam-detail-sidebar .gam-stat-card::before {
    content: none;
}

/* ============================================================
   DROP RATE PROGRESS BAR
   ============================================================ */
.gam-drop-rate-bar {
    height: 4px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}
.gam-drop-rate-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 2px;
    transition: width 0.4s ease;
    min-width: 2px;
}
.gam-drop-chance.mvp + * .gam-drop-rate-fill,
.gam-drop-item:has(.gam-drop-chance.mvp) .gam-drop-rate-fill {
    background: linear-gradient(90deg, #f59e0b, #dc2626);
}

/* ============================================================
   ELEMENT BADGE (colored pill inside monster hero)
   ============================================================ */
.gam-element-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 11px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    margin-right: 6px;
    margin-top: 2px;
}
/* Subtle glow per element — only border changes */
.gam-element-badge.fire {
    border-color: #fca5a5;
}
.gam-element-badge.water {
    border-color: #93c5fd;
}
.gam-element-badge.wind {
    border-color: #6ee7b7;
}
.gam-element-badge.earth {
    border-color: #d6d3d1;
}
.gam-element-badge.poison {
    border-color: #d8b4fe;
}
.gam-element-badge.holy {
    border-color: #fde68a;
    color: #fef9c3;
}
.gam-element-badge.dark {
    border-color: #a5b4fc;
}
.gam-element-badge.ghost {
    border-color: rgba(255, 255, 255, 0.4);
}
.gam-element-badge.undead {
    border-color: #86efac;
}

/* ============================================================
   HP BAR — in monster hero
   ============================================================ */
.gam-hero-hp-bar {
    margin-top: 14px;
}
.gam-hero-hp-label {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}
.gam-hero-hp-track {
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    max-width: 320px;
}
.gam-hero-hp-fill {
    height: 100%;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.8);
    transition: width 0.6s ease;
}
/* Color overrides for MVP/boss HP bars */
.gam-hero-hp-fill.hp-low {
    background: rgba(255, 255, 255, 0.55);
}
.gam-hero-hp-fill.hp-medium {
    background: rgba(255, 255, 255, 0.7);
}
.gam-hero-hp-fill.hp-high {
    background: rgba(255, 255, 255, 0.85);
}
.gam-hero-hp-fill.hp-boss {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.9),
        rgba(251, 191, 36, 0.9)
    );
}

/* ============================================================
   BACK BUTTON — after drops section
   ============================================================ */
.gam-back-btn-wrap {
    display: flex;
    justify-content: flex-start;
    margin-top: 30px;
    margin-bottom: 10px;
}
.gam-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: transparent;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.gam-back-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #111827;
    transform: translateX(-3px);
    text-decoration: none;
}

/* Dark theme for new elements */
@media (prefers-color-scheme: dark) {
    .gam-adaptive-theme .gam-drop-rate-bar {
        background: rgba(255, 255, 255, 0.08);
    }
    .gam-adaptive-theme .gam-back-btn {
        border-color: rgba(255, 255, 255, 0.15);
        color: #94a3b8;
    }
    .gam-adaptive-theme .gam-back-btn:hover {
        background: rgba(255, 255, 255, 0.06);
        color: #e2e8f0;
        border-color: rgba(255, 255, 255, 0.25);
    }
}
.gam-force-dark .gam-drop-rate-bar {
    background: rgba(255, 255, 255, 0.08);
}
.gam-force-dark .gam-back-btn {
    border-color: rgba(255, 255, 255, 0.15);
    color: #94a3b8;
}
.gam-force-dark .gam-back-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.25);
}

/* ============================================================
   ITEM LIST — Enhanced chip-style type filters
   ============================================================ */
.gam-type-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.gam-type-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
    background: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
}
.gam-type-chip:hover,
.gam-type-chip.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    text-decoration: none;
}
@media (prefers-color-scheme: dark) {
    .gam-adaptive-theme .gam-type-chip {
        background: rgba(255, 255, 255, 0.07);
        color: #94a3b8;
        border-color: rgba(255, 255, 255, 0.1);
    }
    .gam-adaptive-theme .gam-type-chip:hover,
    .gam-adaptive-theme .gam-type-chip.active {
        background: #3b82f6;
        color: #fff;
        border-color: #3b82f6;
    }
}
.gam-force-dark .gam-type-chip {
    background: rgba(255, 255, 255, 0.07);
    color: #94a3b8;
    border-color: rgba(255, 255, 255, 0.1);
}
.gam-force-dark .gam-type-chip:hover,
.gam-force-dark .gam-type-chip.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* Per-type chip color accents */
.gam-type-chip.chip-weapon {
    border-color: #fca5a5;
}
.gam-type-chip.chip-weapon:hover,
.gam-type-chip.chip-weapon.active {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.gam-type-chip.chip-armor {
    border-color: #93c5fd;
}
.gam-type-chip.chip-armor:hover,
.gam-type-chip.chip-armor.active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.35);
}

.gam-type-chip.chip-healing {
    border-color: #86efac;
}
.gam-type-chip.chip-healing:hover,
.gam-type-chip.chip-healing.active {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
}

.gam-type-chip.chip-card {
    border-color: #fde68a;
}
.gam-type-chip.chip-card:hover,
.gam-type-chip.chip-card.active {
    background: #d97706;
    border-color: #d97706;
    color: #fff;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

.gam-type-chip.chip-ammo {
    border-color: #a5f3fc;
}
.gam-type-chip.chip-ammo:hover,
.gam-type-chip.chip-ammo.active {
    background: #0891b2;
    border-color: #0891b2;
    color: #fff;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.35);
}

.gam-type-chip.chip-usable {
    border-color: #d8b4fe;
}
.gam-type-chip.chip-usable:hover,
.gam-type-chip.chip-usable.active {
    background: #7c3aed;
    border-color: #7c3aed;
    color: #fff;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.gam-type-chip.chip-shadow-gear {
    border-color: #cbd5e1;
}
.gam-type-chip.chip-shadow-gear:hover,
.gam-type-chip.chip-shadow-gear.active {
    background: #475569;
    border-color: #475569;
    color: #fff;
}

/* ============================================================
   ITEM CELL — thumbnail + name layout in list tables
   ============================================================ */
.gam-item-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}
.gam-item-name {
    font-weight: 600;
    color: #111827;
    text-decoration: none;
    transition: color 0.15s;
}
.gam-item-name:hover {
    color: #3b82f6;
    text-decoration: none;
}
.gam-item-thumb img {
    display: block;
}

/* ============================================================
   DASHBOARD — Fix 3-column stats grid overflow
   ============================================================ */
.gam-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
@media (max-width: 900px) {
    .gam-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .gam-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   RANKING TABLE — Medal highlights for top 3
   ============================================================ */
.gam-rank-gold td {
    background: linear-gradient(90deg, #fef9c3 0%, #fef3c7 100%) !important;
    border-left: 4px solid #f59e0b !important;
}
.gam-rank-silver td {
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border-left: 4px solid #94a3b8 !important;
}
.gam-rank-bronze td {
    background: linear-gradient(90deg, #fef6ee 0%, #fed7aa 100%) !important;
    border-left: 4px solid #f97316 !important;
}
.gam-rank-medal {
    font-size: 1.2em;
}

@media (prefers-color-scheme: dark) {
    .gam-adaptive-theme .gam-rank-gold td {
        background: rgba(245, 158, 11, 0.15) !important;
    }
    .gam-adaptive-theme .gam-rank-silver td {
        background: rgba(148, 163, 184, 0.12) !important;
    }
    .gam-adaptive-theme .gam-rank-bronze td {
        background: rgba(249, 115, 22, 0.12) !important;
    }
}
.gam-force-dark .gam-rank-gold td {
    background: rgba(245, 158, 11, 0.15) !important;
}
.gam-force-dark .gam-rank-silver td {
    background: rgba(148, 163, 184, 0.12) !important;
}
.gam-force-dark .gam-rank-bronze td {
    background: rgba(249, 115, 22, 0.12) !important;
}

/* ============================================================
   DETAIL PAGE: 2-COLUMN STATS ROW
   Basic + Combat side-by-side; Req + Script side-by-side; drops full-width
   ============================================================ */
.gam-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
    align-items: start;
}
.gam-stats-row--full {
    grid-template-columns: 1fr;
}
/* Cards inside row have no own bottom margin (gap handles it) */
.gam-stats-row .gam-stat-card,
.gam-stats-row .gam-description-card {
    margin-bottom: 0;
}
/* Standalone stat card (e.g. Experience full-width) */
.gam-stat-card--standalone {
    margin-bottom: 16px;
}
@media (max-width: 680px) {
    .gam-stats-row {
        grid-template-columns: 1fr;
    }
}

/* Legacy layout kept for backward compat */
.gam-detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 40px;
}
.gam-detail-sidebar {
    align-self: stretch;
}
.gam-detail-layout--sidebar-only {
    grid-template-columns: minmax(260px, 420px);
}
@media (max-width: 900px) {
    .gam-detail-layout {
        grid-template-columns: 1fr;
    }
}
.gam-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.gam-detail-sidebar .gam-stat-card {
    margin-bottom: 0;
}
.gam-detail-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.gam-detail-main > .gam-drops-section,
.gam-detail-main > .gam-description-card {
    margin-bottom: 0;
}

/* Fix top gap: ct-container-full already adds 60px padding-top */
.gam-item-single,
.gam-monster-single {
    padding-top: 0 !important;
}

/* Compact hero for list pages — text-only, no image, reduce large empty space */
.gam-item-list .gam-hero,
.gam-monster-list .gam-hero,
.gam-page-hero-wrapper .gam-hero {
    padding: 18px 24px;
    margin-bottom: 20px;
}
.gam-item-list .gam-hero .gam-hero-title,
.gam-monster-list .gam-hero .gam-hero-title,
.gam-page-hero-wrapper .gam-hero .gam-hero-title {
    font-size: 1.5rem;
    margin-bottom: 2px;
    color: #fff !important;
}
.gam-item-list .gam-hero .gam-hero-subtitle,
.gam-monster-list .gam-hero .gam-hero-subtitle,
.gam-page-hero-wrapper .gam-hero .gam-hero-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Remove blue left border from colored (gradient) detail heroes — issues 1 & 4 */
.gam-detail-hero[class*="gam-element--"],
.gam-detail-hero.gam-hero--weapon,
.gam-detail-hero.gam-hero--armor,
.gam-detail-hero.gam-hero--healing,
.gam-detail-hero.gam-hero--card,
.gam-detail-hero.gam-hero--usable,
.gam-detail-hero.gam-hero--ammo,
.gam-detail-hero.gam-hero--shadow,
.gam-detail-hero.gam-hero--default {
    border: none;
}

/* ============================================================
   COMPACT DROP CARD GRID
   ============================================================ */
.gam-drop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 220px));
    justify-content: start;
    gap: 8px;
    margin-top: 12px;
}

/* Empty / no-drops state */
.gam-no-drops {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    background: var(--gam-surface-2, #f8fafc);
    border: 1px dashed var(--gam-border, #e2e8f0);
    border-radius: 10px;
    text-align: center;
    color: var(--gam-text-2, #64748b);
}
.gam-no-drops-icon {
    font-size: 2rem;
    opacity: 0.5;
}
.gam-no-drops p {
    margin: 0;
    font-size: 0.9rem;
}

.gam-drop-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--gam-surface-2, #f8fafc);
    border-radius: 8px;
    border: 1px solid var(--gam-border, #e5e7eb);
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
    overflow: hidden;
}
.gam-drop-card:hover {
    background: var(--gam-accent-pale, #eef2ff);
    border-color: var(--gam-accent, #6366f1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
}
.gam-drop-card-info {
    flex: 1;
    min-width: 0;
}
.gam-drop-card-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gam-text, #0f172a);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.gam-drop-card-kind {
    font-size: 0.72rem;
    color: var(--gam-text-3, #94a3b8);
    display: block;
    text-transform: none;
}
.gam-drop-card-pct {
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #10b981, #059669);
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}
.gam-drop-card-pct.mvp {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* Dark theme variants for drop cards */
@media (prefers-color-scheme: dark) {
    .gam-adaptive-theme .gam-drop-card {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }
    .gam-adaptive-theme .gam-drop-card:hover {
        background: rgba(99, 102, 241, 0.15);
        border-color: rgba(99, 102, 241, 0.4);
    }
    .gam-adaptive-theme .gam-drop-card-name {
        color: #e2e8f0;
    }
    .gam-adaptive-theme .gam-drop-card-kind {
        color: #64748b;
    }
}
.gam-force-dark .gam-drop-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}
.gam-force-dark .gam-drop-card:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
}
.gam-force-dark .gam-drop-card-name {
    color: #e2e8f0;
}
.gam-force-dark .gam-drop-card-kind {
    color: #64748b;
}

/* ============================================================
   COMPACT SKILL ROW LIST
   ============================================================ */
.gam-skill-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}
.gam-skill-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    background: var(--gam-surface-2, #f8fafc);
    border-radius: 8px;
    border: 1px solid var(--gam-border, #e5e7eb);
}
.gam-skill-row-info {
    flex: 1;
    min-width: 0;
}
.gam-skill-row-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gam-text, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.gam-skill-row-meta {
    font-size: 0.72rem;
    color: var(--gam-text-3, #94a3b8);
    display: block;
}
.gam-skill-row-pct {
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    padding: 2px 7px;
    border-radius: 10px;
    flex-shrink: 0;
}

/* Dark theme for skill rows */
@media (prefers-color-scheme: dark) {
    .gam-adaptive-theme .gam-skill-row {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }
    .gam-adaptive-theme .gam-skill-row-name {
        color: #e2e8f0;
    }
    .gam-adaptive-theme .gam-skill-row-meta {
        color: #64748b;
    }
}
.gam-force-dark .gam-skill-row {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}
.gam-force-dark .gam-skill-row-name {
    color: #e2e8f0;
}
.gam-force-dark .gam-skill-row-meta {
    color: #64748b;
}

/* ============================================================
   DETAIL PAGE POLISH (item / monster single)
   - Hero info fills available width (was collapsing to ~235px)
   - Sensible hero typography across breakpoints
   - Sticky sidebar on desktop so stats stay visible while scrolling drops
   - Tighter drop / skill grids
   ============================================================ */
.gam-item-single .gam-detail-hero,
.gam-monster-single .gam-detail-hero {
    padding: 28px 32px;
    margin-bottom: 24px;
    border-radius: 14px;
}
.gam-item-single .gam-hero-content,
.gam-monster-single .gam-hero-content {
    align-items: stretch;
    gap: 24px;
}
.gam-item-single .gam-hero-image,
.gam-monster-single .gam-hero-image {
    flex: 0 0 auto;
    align-self: center;
    padding: 14px;
}
.gam-item-single .gam-hero-info,
.gam-monster-single .gam-hero-info {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}
.gam-item-single .gam-hero-info > *,
.gam-monster-single .gam-hero-info > * {
    margin: 0;
}
.gam-item-single .gam-hero-info h1,
.gam-monster-single .gam-hero-info h1 {
    font-size: clamp(1.5rem, 2.4vw + 0.6rem, 2rem);
    line-height: 1.2;
    word-break: break-word;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.gam-item-single .gam-hero-info .gam-item-id,
.gam-monster-single .gam-hero-info .gam-item-id {
    font-size: 0.95rem;
    margin-bottom: 0;
    opacity: 0.85;
}
.gam-item-single .gam-hero-info .gam-item-type,
.gam-monster-single .gam-hero-info .gam-item-type {
    align-self: flex-start;
    font-size: 0.8rem;
    padding: 6px 12px;
}

/* HP bar fills the info column */
.gam-monster-single .gam-hero-hp-bar {
    width: 100%;
    max-width: 420px;
}

/* Sticky sidebar on wider viewports — stats stay in view */
@media (min-width: 901px) {
    .gam-detail-sidebar {
        position: sticky;
        top: 16px;
    }
}

/* Drop grid: a touch wider min so monster names breathe */
.gam-drop-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* Stat card spacing — reduce inner padding so sidebar is denser */
.gam-detail-sidebar .gam-stat-card {
    padding: 18px 20px;
}
.gam-detail-sidebar .gam-stat-card h3 {
    font-size: 1.05rem;
    margin-bottom: 12px;
}
.gam-detail-sidebar .gam-stat-row {
    padding: 7px 0;
    font-size: 14px;
}

/* Drops/skills section header tighter */
.gam-detail-main .gam-drops-section {
    padding: 20px 22px;
}
.gam-detail-main .gam-drops-section h3 {
    font-size: 1.15rem;
    margin-bottom: 14px;
}

/* Mobile refinements */
@media (max-width: 768px) {
    .gam-item-single .gam-detail-hero,
    .gam-monster-single .gam-detail-hero {
        padding: 20px;
    }
    .gam-item-single .gam-hero-content,
    .gam-monster-single .gam-hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }
    .gam-item-single .gam-hero-info,
    .gam-monster-single .gam-hero-info {
        align-items: center;
        text-align: center;
    }
    .gam-item-single .gam-hero-info h1,
    .gam-monster-single .gam-hero-info h1 {
        justify-content: center;
    }
    .gam-monster-single .gam-hero-hp-bar {
        margin-left: auto;
        margin-right: auto;
    }
    .gam-bc-current {
        max-width: 60vw;
    }
}

/* ============================================================
   COMPACT INTELLIGENCE — Higher-density refit (2026-05)
   Adds:
     · Drop-rate rarity tiers (color-coded pills)
     · Hero chip-bar (ID/Lv/Race/Size/Element on a single line)
     · "Used In" mini-card grid
     · Multi-column basic stats on wide screens
     · Results summary line above pagination
     · Tighter tables + reliable mobile card-stack
   All colors via design-system CSS variables — light + dark out of the box.
   ============================================================ */

/* --- Drop pills: rarity tiers ------------------------------- */
.gam-drop-card-pct {
    background: var(--gam-success); /* fallback */
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.gam-drop-card-pct--common {
    background: var(--gam-success);
    color: #fff;
}
.gam-drop-card-pct--uncommon {
    background: var(--gam-rune, #0f766e);
    color: #fff;
}
.gam-drop-card-pct--rare {
    background: var(--gam-accent, #2563eb);
    color: #fff;
}
.gam-drop-card-pct--epic {
    background: var(--gam-arcane, #7c3aed);
    color: #fff;
}
.gam-drop-card-pct--legendary {
    background: linear-gradient(135deg, var(--gam-gold, #d97706), #b45309);
    color: #fff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}
.gam-drop-card-pct--mvp {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
}

/* --- Hero chip-bar (monster header summary) ----------------- */
.gam-hero-chip-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 2px;
}
.gam-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    backdrop-filter: blur(4px);
    white-space: nowrap;
    line-height: 1.5;
}
.gam-hero-chip--accent {
    background: rgba(255, 255, 255, 0.92);
    color: var(--gam-accent, #1d4ed8);
    border-color: rgba(255, 255, 255, 0.95);
}

/* --- "Used In" grid (item single) --------------------------- */
.gam-used-in-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    margin-top: 12px;
}
.gam-used-in-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--gam-surface-2, #f8fafc);
    border: 1px solid var(--gam-border, #e5e7eb);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}
a.gam-used-in-card:hover {
    background: var(--gam-accent-pale, #eef2ff);
    border-color: var(--gam-accent, #6366f1);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}
.gam-used-in-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}
.gam-used-in-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.gam-used-in-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gam-text, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gam-used-in-meta {
    font-size: 0.72rem;
    color: var(--gam-text-3, #94a3b8);
}

/* --- Sidebar density: split basic stats into 2 columns on wide screens --- */
@media (min-width: 1100px) {
    .gam-detail-sidebar .gam-card-basic .gam-stat-row,
    .gam-detail-sidebar .gam-card-combat .gam-stat-row,
    .gam-detail-sidebar .gam-card-exp .gam-stat-row,
    .gam-detail-sidebar .gam-card-req .gam-stat-row {
        padding: 5px 0;
        font-size: 13px;
    }
}

/* Make stat rows breathe a bit less even on narrow */
.gam-detail-sidebar .gam-stat-row {
    padding: 6px 0;
}

/* --- Results summary (lists) -------------------------------- */
.gam-results-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 4px;
    margin: 4px 0 10px;
    color: var(--gam-text-2, #475569);
    font-size: 0.85rem;
}
.gam-results-summary strong {
    color: var(--gam-text, #0f172a);
    font-weight: 700;
}

/* --- Compact list table ------------------------------------- */
.gam-table--compact th,
.gam-table--compact td {
    padding: 8px 12px;
    font-size: 0.85rem;
}
.gam-table--compact .gam-item-cell {
    gap: 8px;
}
.gam-table--compact .gam-item-thumb img,
.gam-table--compact .gam-item-thumb {
    max-height: 28px;
}

/* On mobile, stacked rows look like dense mini-cards */
@media (max-width: 640px) {
    .gam-table--mobile-stack tbody tr {
        padding: 10px 12px;
        gap: 4px;
    }
    .gam-table--mobile-stack td {
        padding: 4px 0;
        font-size: 0.85rem;
    }
    .gam-table--mobile-stack td.gam-item-cell {
        justify-content: flex-start;
        font-size: 0.95rem;
        font-weight: 600;
        border-bottom: 1px solid var(--gam-border);
        margin-bottom: 4px;
        padding-bottom: 8px;
    }
    .gam-table--mobile-stack td.gam-item-cell::before {
        display: none;
    }
    .gam-results-summary {
        font-size: 0.8rem;
    }
}

/* --- Hero on mobile: more vertical, centered with chip wrap --- */
@media (max-width: 640px) {
    .gam-hero-chip-bar {
        justify-content: center;
    }
    .gam-item-single .gam-hero-info h1,
    .gam-monster-single .gam-hero-info h1 {
        font-size: 1.35rem;
    }
    .gam-item-single .gam-detail-hero,
    .gam-monster-single .gam-detail-hero {
        padding: 16px;
        border-radius: 12px;
    }
    .gam-item-single .gam-hero-image,
    .gam-monster-single .gam-hero-image {
        padding: 8px;
    }
}

/* --- Drop grid: tighter min-width when crowded --------------- */
@media (max-width: 480px) {
    .gam-drop-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 6px;
    }
    .gam-drop-card {
        padding: 6px 8px;
    }
    .gam-drop-card-name {
        font-size: 0.78rem;
    }
    .gam-drop-card-pct {
        font-size: 0.72rem;
        padding: 2px 6px;
    }
}

/* --- Dark theme: hero chip on darkened heroes is fine, but on
       very pale heroes (default/holy) keep it readable ----------- */
.gam-force-dark .gam-hero-chip,
.gam-adaptive-theme .gam-hero-chip {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
}
.gam-force-dark .gam-hero-chip--accent,
.gam-adaptive-theme .gam-hero-chip--accent {
    background: rgba(255, 255, 255, 0.95);
    color: var(--gam-accent-hover, #1d4ed8);
}

/* Empty placeholder when a drop section has no entries (already
   handled inline; class kept for future graceful-hide JS hooks)   */
.gam-drops-section:empty {
    display: none;
}
