/* =====================================================
   MEGAHUNTER DA COMPANION — Arrakis Desert Theme
   ===================================================== */

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

/* === DESIGN TOKENS === */
:root {
    /* Backgrounds — deep desert night */
    --bg-space:    #0c0805;
    --bg-dark:     #100b06;
    --bg-card:     #171009;
    --bg-elevated: #201709;
    --bg-input:    #140d07;

    /* Glass */
    --glass:        rgba(255,235,200,0.03);
    --glass-border: rgba(255,235,200,0.07);

    /* Primary — Spice Orange */
    --primary:      #e08a34;
    --primary-dark: #b5691f;
    --primary-glow: rgba(224,138,52,0.30);
    --primary-dim:  rgba(224,138,52,0.09);

    /* Accent — Water Teal (life amid the sand) */
    --accent:      #2dd4bf;
    --accent-glow: rgba(45,212,191,0.28);
    --accent-dim:  rgba(45,212,191,0.09);

    /* Text */
    --text:        #d9cbb8;
    --text-bright: #fbf3e6;
    --text-dim:    #8a7660;
    --text-muted:  #5c4d3c;

    /* Borders */
    --border:       rgba(255,235,200,0.08);
    --border-hover: rgba(224,138,52,0.28);

    /* Status */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger:  #ef4444;
    --info:    #3b82f6;

    /* Typography */
    --font-display: 'Rajdhani', 'Segoe UI', sans-serif;
    --font-body:    'Inter', 'Segoe UI', sans-serif;

    /* Shape */
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 16px;
    --r-xl: 24px;

    /* Transitions */
    --t-fast: 0.15s ease;
    --t-base: 0.28s ease;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* === SCROLLBAR === */
::-webkit-scrollbar             { width: 7px; height: 7px; }
::-webkit-scrollbar-track       { background: var(--bg-space); }
::-webkit-scrollbar-thumb       { background: rgba(224,138,52,0.22); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(224,138,52,0.42); }

/* === BASE === */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-space);
    background-image:
        radial-gradient(ellipse at 15% 0%,   rgba(180,90,20,0.16) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 100%, rgba(120,60,10,0.12) 0%, transparent 55%);
    color: var(--text);
    line-height: 1.65;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-bright);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.35rem; }

a { text-decoration: none; color: inherit; transition: color var(--t-base); }
ul { list-style: none; }

.gradient-text {
    background: linear-gradient(120deg, var(--primary) 0%, #f4c07a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight { color: var(--primary); }

/* === LAYOUT === */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.content-container {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 40px 24px;
}

/* === NAVBAR === */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(12,8,5,0.90);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 16px;
}

/* Logo */
.logo { flex-shrink: 0; }
.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img {
    height: 38px;
    width: 38px;
    object-fit: cover;
    border-radius: var(--r-sm);
    border: 1px solid var(--border-hover);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
    gap: 2px;
}

.logo-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--primary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.logo-sub {
    font-size: 0.62rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: var(--r-md);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-dim);
    transition: all var(--t-fast);
    white-space: nowrap;
}

.nav-item i { font-size: 0.8em; }

.nav-item:hover {
    color: var(--text-bright);
    background: var(--glass);
}

.nav-item.active {
    color: var(--primary);
    background: var(--primary-dim);
    font-weight: 600;
}

.nav-support { color: var(--accent) !important; }
.nav-support:hover { background: var(--accent-dim) !important; }

/* Mobile hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text);
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--t-base);
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--r-md);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: all var(--t-base);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #1a0f00;
    box-shadow: 0 0 18px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 28px var(--primary-glow);
    color: #1a0f00;
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: var(--primary-dim);
    color: var(--primary);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

/* === HERO === */
.hero {
    position: relative;
    text-align: center;
    padding: 80px 24px 64px;
    border-radius: var(--r-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 8px;
    background: var(--bg-card);
}

.hero.hero-photo {
    background-image:
        linear-gradient(180deg, rgba(12,8,5,0.55) 0%, rgba(12,8,5,0.88) 65%, rgba(12,8,5,1) 100%),
        url('https://cdn.akamai.steamstatic.com/steam/apps/1172710/header.jpg');
    background-size: cover;
    background-position: center 30%;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 25% 40%, rgba(224,138,52,0.10) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 60%, rgba(150,70,10,0.09) 0%, transparent 55%);
    pointer-events: none;
}

/* Drifting sand/dust particles via CSS */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,220,170,0.4) 0%, transparent 100%),
        radial-gradient(1px   1px   at 38% 8%,  rgba(255,220,170,0.28)  0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 70% 22%, rgba(255,220,170,0.35)  0%, transparent 100%),
        radial-gradient(1px   1px   at 88% 55%, rgba(255,220,170,0.22) 0%, transparent 100%),
        radial-gradient(1px   1px   at 8%  65%, rgba(255,220,170,0.28)  0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 55% 82%, rgba(255,220,170,0.18)  0%, transparent 100%),
        radial-gradient(2px   2px   at 92% 12%, rgba(224,138,52,0.55)   0%, transparent 100%),
        radial-gradient(2px   2px   at 4%  42%, rgba(224,138,52,0.45)   0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 48% 35%, rgba(224,138,52,0.35)  0%, transparent 100%);
    pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-dim);
    border: 1px solid var(--border-hover);
    border-radius: 100px;
    padding: 6px 18px;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(2.8rem, 7vw, 5rem);
    letter-spacing: -0.03em;
    margin-bottom: 18px;
    line-height: 1.05;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-dim);
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.75;
}

.hero.hero-photo p { color: var(--text); }

.cta-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* Hero stats bar */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 52px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.hero-stat { text-align: center; }

.hero-stat-num {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
}

/* === SECTION HEADERS === */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.section-header h2 {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    color: var(--text-bright);
    position: relative;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 44px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), transparent);
    margin-top: 6px;
    border-radius: 2px;
}

/* Standalone h2 in content pages */
h2 {
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 24px;
}

/* === FEATURE CARDS (Home) === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 30px 26px 44px;
    cursor: pointer;
    transition: all var(--t-base);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--t-base);
    background: radial-gradient(ellipse at 50% 0%, rgba(224,138,52,0.09) 0%, transparent 70%);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 40px rgba(224,138,52,0.12);
    color: inherit;
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 18px;
}

.feature-icon-cyan   { background: var(--accent-dim);  color: var(--accent);  border: 1px solid rgba(45,212,191,0.18); }
.feature-icon-gold   { background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(224,138,52,0.2); }
.feature-icon-green  { background: rgba(34,197,94,0.08);   color: var(--success); border: 1px solid rgba(34,197,94,0.18); }
.feature-icon-purple { background: rgba(190,120,230,0.08);  color: #c084fc;    border: 1px solid rgba(190,120,230,0.18); }
.feature-icon-red    { background: rgba(239,68,68,0.08);   color: var(--danger);  border: 1px solid rgba(239,68,68,0.18); }
.feature-icon-blue   { background: rgba(59,130,246,0.08);  color: var(--info);    border: 1px solid rgba(59,130,246,0.18); }

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: var(--text-bright);
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-dim);
    line-height: 1.65;
    margin: 0;
}

.feature-arrow {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: var(--text-muted);
    transition: all var(--t-base);
    font-size: 0.8rem;
}

.feature-card:hover .feature-arrow {
    color: var(--primary);
    transform: translate(2px, -2px);
}

/* === ITEM CARDS === */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: all var(--t-base);
    cursor: pointer;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 8px 32px rgba(224,138,52,0.12);
}

.card-icon-banner {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary);
    background: linear-gradient(135deg, #14100a, #1c1006);
    border-bottom: 1px solid var(--border);
}

/* Group hero image (trial locations, armor categories, etc.) — "contain" so the
   full image (and any marked location on a map) is always visible, never cropped. */
.group-hero-img {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    background: linear-gradient(135deg, #14100a, #1c1006);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    margin-bottom: 18px;
    display: block;
}

.material-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    vertical-align: middle;
    margin-right: 10px;
    background: linear-gradient(135deg, #14100a, #1c1006);
}

.material-name-cell { display: flex; align-items: center; }

.card-img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: linear-gradient(135deg, #14100a, #1c1006);
    border-bottom: 1px solid var(--border);
}

.card-content { padding: 16px; }

.card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 3px;
}

.card-subtitle {
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.card-specs {
    font-size: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.spec-item {
    background: var(--glass);
    border: 1px solid var(--border);
    padding: 2px 7px;
    border-radius: 4px;
    color: var(--text-dim);
}

/* === SEARCH / FILTER BAR === */
.search-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

input[type="text"],
select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text);
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    transition: all var(--t-fast);
    outline: none;
    min-width: 180px;
}

input[type="text"]:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim);
}

input[type="text"]::placeholder { color: var(--text-muted); }

select option { background: var(--bg-card); }

/* === SPLIT VIEW (Trials / Trainers) === */
.split-view {
    display: flex;
    gap: 18px;
    min-height: 600px;
}

.list-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow-y: auto;
    max-height: 740px;
}

.list-item {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--t-fast);
    font-size: 0.9rem;
}

.list-item:hover {
    background: var(--primary-dim);
    color: var(--text-bright);
}

.list-item.selected {
    background: var(--primary-dim);
    color: var(--primary);
    border-left: 3px solid var(--primary);
    padding-left: 15px;
    font-weight: 600;
}

.details-view {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    overflow-y: auto;
    max-height: 740px;
}

.placeholder-text {
    color: var(--text-muted);
    text-align: center;
    padding: 60px 20px;
    font-size: 0.95rem;
}

/* === TABLES === */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

.data-table th {
    padding: 13px 16px;
    text-align: left;
    background: rgba(224,138,52,0.06);
    color: var(--primary);
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background var(--t-fast); }
.data-table tbody tr:hover { background: rgba(255,235,200,0.02); }

/* === TAB NAVIGATION === */
.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }

/* === INFO BOX === */
.info-box {
    border-radius: var(--r-lg);
    padding: 20px 22px;
    margin-top: 24px;
}

.info-box.warning {
    background: rgba(245,158,11,0.05);
    border: 1px solid rgba(245,158,11,0.2);
    border-left: 4px solid var(--warning);
}

.info-box.warning h3 {
    color: var(--warning);
    font-family: var(--font-display);
    margin-bottom: 10px;
    font-size: 1rem;
}

.info-box.warning ul { padding-left: 0; }

.info-box.warning ul li {
    color: var(--text-dim);
    padding: 4px 0;
    font-size: 0.875rem;
    padding-left: 20px;
    position: relative;
}

.info-box.warning ul li::before {
    content: "›";
    position: absolute;
    left: 4px;
    color: var(--warning);
    font-weight: 700;
}

/* === MODAL === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    animation: fadeIn 0.2s ease forwards;
}

.modal-overlay.active { display: block; }

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 1000px;
    max-height: 92vh;
    background: var(--bg-elevated);
    border: 1px solid var(--border-hover);
    border-radius: var(--r-xl);
    z-index: 2001;
    display: none;
    overflow-y: auto;
    box-shadow: 0 0 60px rgba(224,138,52,0.14), 0 24px 80px rgba(0,0,0,0.6);
    animation: slideUp 0.3s ease forwards;
}

.modal.active { display: block; }

.modal-close {
    position: sticky;
    top: 16px;
    right: 20px;
    float: right;
    background: rgba(0,0,0,0.55);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 1.4rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast);
    line-height: 1;
    z-index: 10;
}

.modal-close:hover {
    background: var(--primary-dim);
    border-color: var(--primary);
    color: var(--primary);
}

.modal-content { padding: 28px 32px 32px; }

/* === ITEM DETAIL MODAL === */
.ship-detail-header {
    display: flex;
    gap: 32px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.ship-gallery { flex: 1; min-width: 280px; }

.main-img-container {
    width: 100%;
    height: 380px;
    background: linear-gradient(135deg, #14100a, #1c1006);
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--primary);
}

.main-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.thumbnail-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.ship-info-main { flex: 1.5; min-width: 280px; }

.ship-info-main h2 {
    margin-top: 0;
    font-size: 2rem;
    color: var(--text-bright);
    border: none;
    padding: 0;
    margin-bottom: 6px;
}

.ship-info-main h2::after { display: none; }

.manufacturer {
    color: var(--primary);
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.75rem;
    margin-bottom: 20px;
    display: block;
}

.ship-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.spec-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 12px 14px;
    border-left: 3px solid var(--primary);
    transition: border-color var(--t-fast);
}

.spec-card:hover { border-left-color: var(--accent); }

.spec-card .label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.spec-card .value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-bright);
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin: 28px 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.buying-locations { display: flex; flex-wrap: wrap; gap: 8px; }

.location-tag {
    background: var(--primary-dim);
    border: 1px solid var(--border-hover);
    color: var(--primary);
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
}

/* === FOOTER === */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 22px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-left { display: flex; flex-direction: column; gap: 4px; }

.footer-copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.82rem;
    transition: color var(--t-fast);
    display: flex;
    align-items: center;
    gap: 5px;
}

.footer-links a:hover { color: var(--primary); }

.status {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.72rem;
    color: var(--success);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translate(-50%, -44%); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

/* === UTILITY BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
}

/* === TIER TABS (Equipment page) === */
.comp-tabs {
    display: flex;
    gap: 0;
    margin: 20px 0 30px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.comp-tab {
    padding: 12px 26px;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    background: transparent;
    color: var(--text-dim);
    transition: all var(--t-base);
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comp-tab:hover   { color: var(--text-bright); background: var(--glass); }
.comp-tab.active  { color: var(--primary); border-bottom-color: var(--primary); background: var(--primary-dim); }

.comp-section { display: none; animation: fadeIn 0.4s ease; }
.comp-section.active { display: block; }

.section-intro {
    color: var(--text-dim);
    font-size: 1rem;
    margin-bottom: 24px;
    max-width: 860px;
    line-height: 1.75;
}

/* Tier / Grade Cards */
.grade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 22px;
    margin-top: 10px;
}

.grade-card {
    background: var(--bg-card);
    border: 2px solid;
    border-radius: var(--r-lg);
    padding: 26px;
    transition: transform var(--t-base), box-shadow var(--t-base);
}

.grade-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.4);
}

.grade-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 14px;
    font-family: var(--font-display);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.grade-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.grade-tagline {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-style: italic;
    margin-bottom: 12px;
}

.grade-desc {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.65;
    margin-bottom: 16px;
}

/* Stat Bars */
.stats-section {
    margin: 16px 0;
    padding: 14px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 7px 0;
}

.stat-label {
    min-width: 150px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.stat-bar-bg {
    flex: 1;
    height: 7px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
}

.stat-value {
    width: 30px;
    text-align: right;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    font-family: var(--font-display);
}

/* Materials/Recipe list */
.recipe-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.recipe-tag {
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 0.8rem;
}

.recipe-tag i { color: var(--primary); margin-right: 5px; }

/* Pros & Cons */
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}

.pros h4, .cons h4 {
    font-family: var(--font-display);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
}

.pros ul, .cons ul { list-style: none; padding: 0; }

.pros ul li, .cons ul li {
    font-size: 0.83rem;
    color: var(--text-dim);
    padding: 3px 0;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    line-height: 1.45;
}

.pros ul li::before { content: "✓"; color: var(--success); font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.cons ul li::before { content: "✗"; color: var(--danger);  font-weight: 700; flex-shrink: 0; margin-top: 1px; }

.best-for-tag {
    background: var(--primary-dim);
    border: 1px solid var(--border-hover);
    border-radius: var(--r-md);
    padding: 12px 14px;
    font-size: 0.875rem;
    margin-top: 14px;
    color: var(--text-dim);
    line-height: 1.5;
}

.best-for-tag strong {
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 3px;
}

.comp-locations { margin-top: 14px; }
.comp-locations strong {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.comp-location-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.comp-location-tag {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    border: 1px solid;
}

/* Type Cards */
.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 22px;
    margin-top: 10px;
}

.type-card {
    background: var(--bg-card);
    border: 2px solid;
    border-radius: var(--r-lg);
    padding: 26px;
    transition: transform var(--t-base), box-shadow var(--t-base);
}

.type-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.4);
}

.type-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.type-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    flex-shrink: 0;
}

.type-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
}

.type-tagline {
    font-size: 0.84rem;
    color: var(--text-dim);
    font-style: italic;
    margin-top: 3px;
}

.type-desc {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.65;
    margin-bottom: 16px;
}

.typical-grades {
    display: flex;
    gap: 8px;
    margin: 14px 0;
    flex-wrap: wrap;
    align-items: center;
}

.typical-grades .label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.grade-chip {
    padding: 4px 12px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.82rem;
    font-family: var(--font-display);
}

.comp-examples { margin-top: 14px; }
.comp-examples strong {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}
.comp-examples ul { list-style: none; padding: 0; }
.comp-examples ul li {
    font-size: 0.84rem;
    color: var(--text-dim);
    padding: 3px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.comp-examples ul li::before {
    content: "◆";
    font-size: 0.45rem;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 6px;
}

/* Matrix */
.matrix-intro {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 18px;
    line-height: 1.65;
}

.tip-box {
    background: var(--primary-dim);
    border: 1px solid var(--border-hover);
    border-left: 4px solid var(--primary);
    border-radius: var(--r-md);
    padding: 16px 20px;
    margin: 20px 0;
}

.tip-box h4 {
    color: var(--primary);
    margin-bottom: 8px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tip-box p {
    color: var(--text-dim);
    font-size: 0.875rem;
    line-height: 1.65;
    margin: 0;
}

.matrix-wrapper {
    overflow-x: auto;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 580px;
}

.matrix-table th {
    padding: 13px 16px;
    text-align: center;
    background: rgba(224,138,52,0.07);
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
}

.matrix-table th:first-child {
    text-align: left;
    color: var(--primary);
}

.matrix-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    text-align: center;
    font-size: 0.855rem;
}

.matrix-table td:first-child { text-align: left; }
.matrix-table tr:last-child td { border-bottom: none; }
.matrix-table tr:hover td { background: rgba(255,235,200,0.02); }

.stars { color: #fbbf24; letter-spacing: 1px; font-size: 0.9rem; }

.avail-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
}

.avail-common   { background: rgba(34,197,94,0.1);  color: var(--success); border: 1px solid rgba(34,197,94,0.2); }
.avail-rare     { background: rgba(245,158,11,0.1); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }
.avail-very-rare{ background: rgba(239,68,68,0.1);  color: var(--danger);  border: 1px solid rgba(239,68,68,0.2); }
.avail-none     { background: rgba(90,106,138,0.08); color: var(--text-muted); border: 1px solid var(--border); }

/* Component Category Grid */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.cat-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 16px 12px;
    text-align: center;
    transition: all var(--t-base);
}

.cat-card:hover {
    border-color: var(--border-hover);
    background: var(--primary-dim);
}

.cat-card i {
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
}

.cat-card-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: var(--text-bright);
}

.cat-card-desc {
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.45;
}

/* Loading state */
.loading {
    color: var(--text-muted);
    text-align: center;
    padding: 60px 20px;
    font-size: 0.95rem;
    grid-column: 1/-1;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0; right: 0;
        background: rgba(12,8,5,0.98);
        backdrop-filter: blur(24px);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 10px;
        gap: 2px;
        z-index: 999;
    }

    .nav-links.open { display: flex; }
    .nav-toggle { display: flex; }
    .navbar { position: relative; }

    .nav-item { width: 100%; padding: 12px 16px; }
}

@media (max-width: 768px) {
    .content-container { padding: 24px 16px; }
    .hero { padding: 52px 20px 44px; }
    .hero-stats { gap: 24px; }
    .hero-stat-num { font-size: 1.6rem; }

    .modal { width: 96%; max-height: 96vh; }
    .modal-content { padding: 20px; }
    .ship-detail-header { flex-direction: column; }
    .main-img-container { height: 250px; }
    .ship-info-main h2 { font-size: 1.6rem; }

    .split-view { flex-direction: column; }
    .list-sidebar { width: 100%; max-height: 260px; }
    .details-view { max-height: none; }

    .pros-cons { grid-template-columns: 1fr; }
    .grade-grid, .type-grid { grid-template-columns: 1fr; }

    .comp-tab { padding: 10px 14px; font-size: 0.85rem; }
    .stat-label { min-width: 115px; }

    .footer-content { flex-direction: column; align-items: flex-start; gap: 10px; }
    .footer-links { flex-wrap: wrap; gap: 14px; }

    .features-grid { grid-template-columns: 1fr; }
}
