/* mods.css - Independent styling architecture for Quest Mods */

:root {
    --mod-bg: #09090b;
    --mod-surface: rgba(24, 24, 29, 0.6);
    --mod-primary: #6366f1;
    --mod-accent: #00f0ff;
    --mod-text: #ffffff;
    --mod-text-muted: #a1a1aa;
    --mod-border: rgba(255, 255, 255, 0.1);
    --mod-terminal-bg: #0d1117;
    --mod-terminal-text: #39ff14;
    --mod-font-main: var(--font-family, 'Inter', sans-serif);
    --mod-font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", "Roboto Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.mod-content {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    gap: 20px;
}

.mod-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: var(--mod-surface);
    border: 1px solid var(--mod-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
}

.version-selector-wrap {
    display: flex;
    align-items: center;
}

.version-select {
    font-size: 1.1rem;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    color: var(--mod-text);
    border: 1px solid var(--mod-border);
    cursor: pointer;
    transition: border-color 0.3s;
}
.version-select:focus {
    border-color: var(--mod-primary);
    outline: none;
}
.version-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mod-warning-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 500;
    margin-bottom: 20px;
}

/* Mod Grid Base Container */
.mod-grid {
    display: grid;
    gap: 25px;
    width: 100%;
}

/* Base button styles for mods */
.mod-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--mod-font-main);
    text-decoration: none;
}

.mod-btn-primary {
    background: var(--mod-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}
.mod-btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.mod-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--mod-text);
    border: 1px solid var(--mod-border);
}
.mod-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mod-btn-quest {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    font-size: 0.85rem;
}
.mod-btn-quest:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}
.mod-btn-quest:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.mod-section-title {
    grid-column: 1 / -1;
    margin-bottom: 15px;
}

/* =========================================
   LAYOUT 1: Storefront Card (Beautiful Glass)
   ========================================= */
.mod-grid[data-layout="1"] .mod-subgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 400px));
    gap: 25px;
    justify-content: center;
}
.mod-card-l1 {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    backdrop-filter: blur(20px);
}
.mod-card-l1::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 100%;
    background: linear-gradient(180deg, transparent 50%, rgba(99, 102, 241, 0.05) 100%);
    pointer-events: none;
}
.mod-card-l1:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}
.mod-card-l1 .mc-cover {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: #000;
}
.mod-card-l1 .mc-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    z-index: 1;
}
.mod-card-l1 .mc-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.mod-card-l1 .mc-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--mod-text-muted);
}
.mod-card-l1 .mc-version {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: var(--mod-font-mono);
    font-size: 0.8rem;
    font-weight: 600;
}
.mod-card-l1 .mc-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.6);
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.mod-card-l1 .mc-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}
.mod-card-l1 .mc-actions .mod-btn { flex: 1; }

/* =========================================
   LAYOUT 2: Compact List (Sleek Rows)
   ========================================= */
.mod-grid[data-layout="2"] .mod-subgrid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.mod-card-l2 {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 16px 24px;
    transition: all 0.3s;
    cursor: pointer;
    backdrop-filter: blur(10px);
}
.mod-card-l2:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), rgba(255,255,255,0.02));
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(5px);
}
.mod-card-l2 .mc-icon {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    margin-right: 24px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.mod-card-l2 .mc-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.mod-card-l2 .mc-title-row {
    display: flex;
    align-items: center;
    gap: 15px;
}
.mod-card-l2 .mc-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    color: #fff;
}
.mod-card-l2 .mc-version {
    font-size: 0.85rem;
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 4px;
    color: #e2e8f0;
    font-family: var(--mod-font-mono);
}
.mod-card-l2 .mc-author {
    font-size: 0.95rem;
    color: var(--mod-text-muted);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.mod-card-l2 .mc-actions {
    display: flex;
    gap: 12px;
    margin-left: 20px;
}

/* =========================================
   LAYOUT 3: Instagram Visual Grid
   ========================================= */
.mod-grid[data-layout="3"] .mod-subgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px; }
.mod-card-l3 { position: relative; aspect-ratio: 1; overflow: hidden; cursor: pointer; border-radius: 8px; }
.mod-card-l3 .i-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.mod-card-l3:hover .i-img { transform: scale(1.1); filter: blur(3px); }
.mod-card-l3 .i-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.6); display: flex; flex-direction: column;
    align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; padding: 20px; text-align: center;
}
.mod-card-l3:hover .i-overlay { opacity: 1; }
.mod-card-l3 h3 { font-size: 1.2rem; color: #fff; margin-bottom: 12px; transform: translateY(10px); transition: transform 0.3s; }
.mod-card-l3:hover h3 { transform: translateY(0); }
.mod-card-l3 .i-stats { display: flex; gap: 16px; font-weight: 700; font-size: 1.1rem; color: #fff; transform: translateY(10px); transition: transform 0.3s 0.1s; }
.mod-card-l3:hover .i-stats { transform: translateY(0); }

/* =========================================
   LAYOUT 4: Neon Cyberpunk Box
   ========================================= */
.mod-grid[data-layout="4"] .mod-subgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2.5rem; }
.mod-card-l4 {
    background: #050505; border: 1px solid var(--border-color); padding: 5px; border-radius: 0;
    position: relative; transition: all 0.3s; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}
.mod-card-l4:hover {
    border-color: var(--neon-blue); box-shadow: 0 0 20px rgba(0,240,255,0.4), inset 0 0 10px rgba(0,240,255,0.2);
}
.mod-card-l4 .n-img { width: 100%; height: 180px; object-fit: cover; filter: contrast(1.1) saturate(1.2); }
.mod-card-l4 .n-info { padding: 16px; border-top: 1px solid var(--border-color); }
.mod-card-l4 h3 { font-family: 'Outfit', sans-serif; text-transform: uppercase; letter-spacing: 1px; font-size: 1.1rem; margin-bottom: 12px; }
.mod-card-l4 .n-bot { display: flex; justify-content: space-between; align-items: center; }
.mod-card-l4 .n-btn { background: transparent; color: var(--neon-blue); border: 1px solid var(--neon-blue); padding: 6px 16px; font-weight: 700; text-transform: uppercase; transition: all 0.2s; letter-spacing: 1px; display: flex; align-items: center;}
.mod-card-l4:hover .n-btn { background: var(--neon-blue); color: #000; box-shadow: 0 0 15px var(--neon-blue); }

/* =========================================
   LAYOUT 5: Ultra Glass Seamless
   ========================================= */
.mod-grid[data-layout="5"] .mod-subgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }
.mod-card-l5 {
    background: rgba(255,255,255,0.02); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-radius: 30px; padding: 16px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.mod-card-l5:hover { transform: translateY(-10px); border-color: rgba(255,255,255,0.2); }
.mod-card-l5 .g-img { width: 100%; height: 220px; border-radius: 20px; object-fit: cover; margin-bottom: 16px; box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.mod-card-l5 .g-content { padding: 0 8px 8px; }
.mod-card-l5 h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 4px; }
.mod-card-l5 .g-auth { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; }
.mod-card-l5 .g-bot { display: flex; justify-content: space-between; align-items: center; background: color-mix(in srgb, var(--text-main) 10%, transparent); padding: 8px 16px; border-radius: 16px; }
.mod-card-l5 .g-stat { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.mod-card-l5 .g-btn { color: var(--text-main); display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-color); transition: background 0.2s; }
.mod-card-l5:hover .g-btn { background: var(--primary-hover); }

/* =========================================
   LAYOUT 6: Split Canvas 60/40
   ========================================= */
.mod-grid[data-layout="6"] .mod-subgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; }
.mod-card-l6 {
    display: flex; flex-direction: column; height: 360px; border-radius: 20px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); transition: all 0.3s;
}
.mod-card-l6:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.mod-card-l6 .sp-top { height: 55%; background-size: cover; background-position: center; position: relative; }
.mod-card-l6 .sp-top::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.1); transition: background 0.3s; }
.mod-card-l6:hover .sp-top::after { background: transparent; }
.mod-card-l6 .sp-bot { height: 45%; background: var(--surface-color); padding: 24px; display: flex; flex-direction: column; justify-content: space-between; position: relative; }
.mod-card-l6 .sp-dl-blob { position: absolute; top: -24px; right: 24px; width: 48px; height: 48px; background: var(--primary-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 8px 16px rgba(99,102,241,0.4); transition: transform 0.3s; cursor: pointer; }
.mod-card-l6 .sp-dl-blob:hover { transform: scale(1.15) rotate(-10deg); }
.mod-card-l6 h3 { font-size: 1.25rem; font-weight: 700; width: 80%; line-height: 1.3; }
.mod-card-l6 .sp-auth { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; display: flex; align-items: center; gap: 8px; }

/* =========================================
   LAYOUT 7: Polaroid Stack
   ========================================= */
.mod-grid[data-layout="7"] .mod-subgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 3rem; padding: 2rem 1rem; }
.mod-card-l7 {
    background: #fdfdfd; padding: 14px 14px 36px; border-radius: 4px; border: 1px solid #e0e0e0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15); color: #222; position: relative;
    transform: rotate(calc(-4deg + 8deg * var(--rnd, 0.5))); transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s;
    filter: sepia(0.1);
}
.mod-card-l7:nth-child(even) { --rnd: 0.8; } .mod-card-l7:nth-child(3n) { --rnd: 0.1; } .mod-card-l7:nth-child(5n) { --rnd: 0.9; }
.mod-card-l7:hover { transform: scale(1.08) rotate(0deg); z-index: 10; box-shadow: 0 20px 40px rgba(0,0,0,0.3); filter: sepia(0); }
.mod-card-l7 img { width: 100%; height: 200px; object-fit: cover; border: 1px solid #e0e0e0; background: #000; }
.mod-card-l7 .p-meta { margin-top: 16px; text-align: center; }
.mod-card-l7 h3 { font-family: 'Outfit', sans-serif; font-size: 1.15rem; font-weight: 600; color: #111; line-height: 1.2; margin-bottom: 8px; }
.mod-card-l7 .p-sub { display: flex; justify-content: space-between; align-items: center; font-family: monospace; font-size: 0.9rem; color: #666; padding: 0 10px; }
.mod-card-l7 .p-btn { border: 1px solid #333; color: #333; padding: 4px 12px; border-radius: 20px; transition: all 0.2s; font-weight: 600; font-family: 'Inter', sans-serif; display: flex; align-items: center;}
.mod-card-l7 .p-btn:hover { background: #333; color: #fff; }

/* =========================================
   MOD DETAILED VIEW (CUSTOM OVERLAY)
   ========================================= */
.mod-overlay {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    border: none;
    padding: 0;
    margin: auto;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    align-items: center;
    justify-content: center;
}
.mod-overlay::backdrop {
    background: transparent;
}
.mod-overlay[open] {
    display: flex;
    animation: modOverlayFadeIn 0.3s ease forwards;
}

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

.mod-overlay-inner {
    background: var(--mod-surface);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    overflow: hidden;
}

.mod-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}
.mod-close-btn:hover {
    background: rgba(239, 68, 68, 0.8);
    transform: rotate(90deg);
}

.mod-dashboard {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mod-dash-header {
    height: 300px;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 40px;
}

.mod-dash-header .dash-cover {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
}

.mod-dash-header::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, var(--mod-surface) 0%, transparent 100%);
    z-index: 2;
}

.dash-header-info {
    position: relative;
    z-index: 3;
    width: 100%;
}

.dash-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0 0 10px 0;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.dash-meta {
    display: flex;
    gap: 30px;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
}
.dash-meta div {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.4);
    padding: 6px 16px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
}

.mod-dash-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: var(--mod-bg);
}

.mod-dash-description-panel {
    flex: 2;
    padding: 40px;
    overflow-y: auto;
    border-right: 1px solid var(--mod-border);
}

.mod-dash-description-panel h3, .mod-dash-versions-panel h3 {
    font-size: 1.4rem;
    margin: 0 0 20px 0;
    color: #fff;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--mod-border);
}

.dash-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--mod-text-muted);
}

.mod-dash-versions-panel {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    background: rgba(0,0,0,0.2);
}

.dash-versions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dash-version-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 15px 20px;
    border-radius: 12px;
    transition: background 0.2s;
}
.dash-version-item:hover {
    background: rgba(255,255,255,0.08);
}

.dash-v-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dash-v-name {
    font-weight: 600;
    color: #fff;
}
.dash-v-num {
    font-family: var(--mod-font-mono);
    font-size: 0.85rem;
    color: var(--mod-accent);
}

/* Multi-select active state */
.mod-card-selected {
    border-color: var(--mod-accent) !important;
    box-shadow: 0 0 0 2px var(--mod-accent), 0 0 20px rgba(0, 240, 255, 0.3) !important;
    transform: scale(0.98);
}
.mod-card-selected::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--mod-accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Multi-select bottom bar */
.mod-multi-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid var(--mod-accent);
    padding: 15px 30px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 30px;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 240, 255, 0.2);
    animation: slideUpBar 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes slideUpBar {
    from { bottom: -100px; opacity: 0; }
    to { bottom: 20px; opacity: 1; }
}
.mod-multi-bar span {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
}
.mod-multi-bar .mod-btn-primary {
    background: var(--mod-accent);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.4);
}
.mod-multi-bar .mod-btn-primary:hover {
    background: #00e0ee;
}

/* =========================================
   FULL MOD DETAILED VIEW (NEW)
   ========================================= */
.full-mod-inner {
    background: #09090b;
    width: 95vw;
    max-width: 1400px;
    height: 90vh;
    border-radius: 12px;
    display: flex;
    position: relative;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    border: 1px solid #27272a;
    overflow: hidden;
}

.fm-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

.fm-sidebar {
    width: 380px;
    background: #121214;
    border-right: 1px solid #27272a;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.fm-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #27272a;
}

.fm-cover-img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
    background: #000;
}

.fm-versions-container {
    padding: 20px;
    flex: 1;
}

.fm-version-card {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.fm-v-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.fm-v-header h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
    font-family: var(--mod-font-mono);
}

.fm-v-meta {
    font-size: 0.85rem;
    color: #a1a1aa;
    margin-bottom: 12px;
    line-height: 1.5;
}

.fm-dl-btn {
    width: 100%;
    background: #27272a;
    color: #fff;
    border: 1px solid #3f3f46;
    padding: 8px 0;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.fm-dl-btn:hover {
    background: #3f3f46;
}

.fm-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: #09090b;
}

.fm-header {
    padding: 30px 40px;
    border-bottom: 1px solid #27272a;
    background: #121214;
}

.fm-header h2 {
    font-size: 2.2rem;
    color: #fff;
    margin: 0 0 15px 0;
}

.fm-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.fm-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #18181b;
    border: 1px solid #27272a;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #d4d4d8;
}

.fm-link {
    color: var(--mod-accent);
    text-decoration: none;
    transition: all 0.2s;
}
.fm-link:hover {
    background: var(--mod-accent);
    color: #000;
}

.fm-content-scroll {
    padding: 40px;
}

.fm-section {
    margin-bottom: 40px;
}
.fm-section h3 {
    font-size: 1.4rem;
    color: #fff;
    margin: 0 0 15px 0;
    border-bottom: 1px solid #27272a;
    padding-bottom: 10px;
}

.fm-deps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.fm-dep-card {
    background: #18181b;
    border: 1px solid #27272a;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}
.fm-dep-name {
    color: #fff;
    font-weight: 600;
    margin-bottom: 4px;
}
.fm-dep-ver {
    color: #a1a1aa;
    font-family: var(--mod-font-mono);
    font-size: 0.8rem;
}

.fm-accordion {
    border-bottom: 1px solid #27272a;
}
.fm-accordion:last-of-type {
    border-bottom: none;
}

.fm-acc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 10px;
    cursor: pointer;
    color: #fff;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.2s;
    user-select: none;
}
.fm-acc-header:hover {
    background: #27272a;
}
.fm-acc-chevron {
    margin-left: auto;
    transition: transform 0.3s;
}

.fm-acc-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 10px;
    transition: all 0.3s ease-out;
}

.fm-game-ver-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
}
.fm-badge-dark {
    background: #27272a;
    color: #e5e7eb;
    padding: 6px 12px;
    border-radius: 8px;
    font-family: var(--mod-font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
}

.fm-dep-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
}
.fm-dep-badge {
    background: #27272a;
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.fm-dep-badge:hover {
    background: #3f3f46;
}
.fm-dep-badge span {
    font-family: var(--mod-font-mono);
    color: var(--mod-accent);
}

.fm-outline-btn {
    background: transparent;
    border: 1px solid #3f3f46;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
}
.fm-outline-btn:hover {
    background: #27272a;
}

.fm-dl-btn-large {
    display: inline-block;
    background: #27272a;
    color: #fff;
    border: 1px solid #3f3f46;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}
.fm-dl-btn-large:hover {
    background: #3f3f46;
    color: #fff;
}
.fm-badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 900px) {
    /* Mod Dash Overlay */
    .mod-overlay-inner, .full-mod-inner {
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
    }
    
    .mod-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }
    
    .mod-search-wrap {
        flex-direction: column !important;
        max-width: 100% !important;
    }
    
    .mod-search-wrap select {
        width: 100% !important;
    }
    
    .mod-dash-header {
        padding: 60px 15px 25px 15px; /* space for close button and less side padding */
        min-height: auto;
        height: auto;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .dash-title {
        font-size: 1.8rem;
        word-break: break-word;
        line-height: 1.2;
    }
    .dash-meta {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    .dash-meta div {
        font-size: 0.95rem;
        padding: 8px 12px;
        width: 100%;
        box-sizing: border-box;
        justify-content: flex-start;
    }
    #dashExtraActions {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        gap: 8px !important;
    }
    #dashExtraActions > * {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }
    
    .mod-dash-body {
        flex-direction: column;
        overflow-y: auto;
    }
    .mod-dash-description-panel {
        border-right: none;
        border-bottom: 1px solid var(--mod-border);
        padding: 20px 15px; /* reduced side padding */
        overflow-y: visible;
        flex: none;
    }
    .mod-dash-versions-panel {
        padding: 20px 15px;
        overflow-y: visible;
        flex: none;
    }

    /* Full Mod Overlay */
    .fm-layout {
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }
    .fm-sidebar {
        width: 100%;
        border-right: none;
        border-top: 1px solid #27272a;
        overflow-y: visible;
        height: auto;
        order: 2;
    }
    .fm-sidebar-header {
        padding: 15px;
    }
    .fm-versions-container {
        padding: 15px;
    }
    .fm-main {
        overflow-y: visible;
        height: auto;
        order: 1;
    }
    .fm-header {
        padding: 60px 15px 20px 15px; /* top padding for close btn */
    }
    .fm-header h2 {
        font-size: 1.6rem;
        word-break: break-word;
        line-height: 1.2;
    }
    .fm-badges {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    .fm-badge {
        font-size: 0.85rem;
        padding: 8px 12px;
        width: 100%;
        box-sizing: border-box;
        justify-content: flex-start;
    }
    .fm-content-scroll {
        padding: 20px 15px;
    }
    .fm-deps-grid {
        grid-template-columns: 1fr; /* single column for dependencies */
    }
}
