
:root {
    --bg-main: #0c0f17;
    --bg-card: #161c28;
    --bg-card-hover: #1e2638;
    --bg-subtle: #20293a;
    --border-color: #273248;
    --primary: #00c26f;
    --primary-hover: #00df7f;
    --primary-glow: rgba(0, 194, 111, 0.25);
    --accent: #38bdf8;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --star-gold: #f59e0b;
    --tag-mod-bg: rgba(0, 194, 111, 0.15);
    --tag-mod-color: #00e583;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header & Nav */
.navbar {
    background: rgba(22, 28, 40, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #fff;
}
.logo-badge {
    background: linear-gradient(135deg, #00c26f, #008f51);
    color: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 800;
}
.nav-links {
    display: flex;
    gap: 8px;
    margin-left: 28px;
}
.nav-links a {
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
    color: #fff;
    background: var(--bg-subtle);
}
.nav-links a.active {
    color: var(--primary);
}

.search-box {
    position: relative;
    width: 280px;
}
.search-box input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 10px 16px 10px 38px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.search-box svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* ModLMH Hero Feature */
.hero-box {
    background: linear-gradient(135deg, #1b263b 0%, #111827 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 24px 0 32px;
    position: relative;
    overflow: hidden;
}
.hero-box::after {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 220px; height: 220px;
    background: var(--primary-glow);
    filter: blur(80px);
    border-radius: 50%;
}
.hero-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}
.hero-icon {
    width: 110px;
    height: 110px;
    border-radius: var(--radius-md);
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.1);
}

/* App Grid & Cards (ModLMH Style) */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.section-title {
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}
.view-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    transition: color 0.2s;
}
.view-more:hover { color: var(--primary-hover); }

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}
.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.app-card:hover {
    transform: translateY(-4px);
    border-color: #3b4963;
    box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}
.app-card-thumb {
    width: 82px;
    height: 82px;
    border-radius: var(--radius-md);
    object-fit: cover;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.app-card-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}
.mod-pill {
    background: var(--tag-mod-bg);
    color: var(--tag-mod-color);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
    border: 1px solid rgba(0, 194, 111, 0.2);
}
.app-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}
.app-card-rating {
    color: var(--star-gold);
    font-weight: 700;
}

/* ModLMH Detail Layout */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    margin-top: 24px;
}
.content-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}
.detail-header-card {
    display: flex;
    gap: 22px;
    align-items: center;
}
.detail-icon-lg {
    width: 115px;
    height: 115px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    border: 2px solid var(--border-color);
}
.detail-title {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
}
.mod-highlight-box {
    background: rgba(0, 194, 111, 0.08);
    border: 1px dashed var(--primary);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin: 16px 0;
}
.mod-highlight-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 4px;
}
.btn-download-mod {
    background: linear-gradient(135deg, #00c26f 0%, #009656 100%);
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    padding: 14px 28px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px var(--primary-glow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-download-mod:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 194, 111, 0.4);
}

/* Technical Table */
.spec-table {
    width: 100%;
    border-collapse: collapse;
}
.spec-table tr {
    border-bottom: 1px solid var(--border-color);
}
.spec-table tr:last-child { border-bottom: none; }
.spec-table td {
    padding: 12px 8px;
    font-size: 14px;
}
.spec-table td:first-child {
    color: var(--text-muted);
    font-weight: 600;
    width: 40%;
}
.spec-table td:last-child {
    color: #fff;
    font-weight: 600;
    text-align: right;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 32px 0 48px;
}
.pg-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
}
.pg-btn:hover, .pg-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Footer */
.footer {
    background: #090c12;
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 60px;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 16px;
}
.footer-links a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
}
.footer-links a:hover { color: var(--primary); }
.footer-copy {
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
}

@media (max-width: 900px) {
    .detail-layout { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .search-box { width: 180px; }
}
