/* ========================================
   MOBIZEL — Public Site CSS
   Modern dark-mode phone specs website
   ======================================== */

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

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #22223a;
    --bg-input: #16162a;
    --border: #2a2a40;
    --border-hover: #3a3a55;
    --text-primary: #f0f0f5;
    --text-secondary: #9090a8;
    --text-muted: #6868808f;
    --accent: #6c5ce7;
    --accent-hover: #7c6ef7;
    --accent-glow: rgba(108, 92, 231, 0.25);
    --gradient-start: #6c5ce7;
    --gradient-end: #a29bfe;
    --success: #00cec9;
    --danger: #ff7675;
    --warning: #fdcb6e;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,.3);
    --shadow: 0 4px 20px rgba(0,0,0,.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.5);
    --transition: 0.25s cubic-bezier(.4,0,.2,1);
    --max-width: 1280px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

/* ── Container ── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ── Navbar ── */
.site-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
}
.site-nav .container {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.site-nav__brand {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.3rem; font-weight: 800; color: var(--text-primary);
    letter-spacing: -0.5px;
}
.site-nav__brand img { height: 32px; width: auto; }
.site-nav__links { display: flex; align-items: center; gap: 4px; }
.site-nav__links a {
    padding: 8px 16px; border-radius: var(--radius-sm);
    font-size: 0.875rem; font-weight: 500; color: var(--text-secondary);
    transition: all var(--transition);
}
.site-nav__links a:hover, .site-nav__links a.active {
    color: var(--text-primary); background: var(--bg-card);
}
.site-nav__hamburger {
    display: none; background: none; border: none; color: var(--text-primary);
    cursor: pointer; padding: 8px;
}
.site-nav__mobile {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg-secondary); border-bottom: 1px solid var(--border);
    padding: 8px 0; flex-direction: column;
}
.site-nav__mobile.open { display: flex; }
.site-nav__mobile a {
    padding: 12px 24px; color: var(--text-secondary); font-size: 0.95rem;
}
.site-nav__mobile a:hover { background: var(--bg-card); color: var(--text-primary); }

@media (max-width: 768px) {
    .site-nav__links { display: none; }
    .site-nav__hamburger { display: block; }
}

/* ── Hero / Page Header ── */
.page-header {
    padding: 48px 0 32px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border);
}
.page-header h1 {
    font-size: 2rem; font-weight: 800; letter-spacing: -1px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.page-header p { color: var(--text-secondary); margin-top: 8px; font-size: 1.05rem; }

/* ── Search Bar ── */
.search-bar {
    position: relative; max-width: 560px; margin: 24px auto 0;
}
.search-bar input {
    width: 100%; padding: 14px 20px 14px 48px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: 50px; color: var(--text-primary);
    font-size: 0.95rem; outline: none; transition: all var(--transition);
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar input:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-bar svg {
    position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px; color: var(--text-muted); pointer-events: none;
}

/* ── Grid System ── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1024px) {
    .grid-5, .grid-6 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: 1fr; }
}

/* ── Cards ── */
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    transition: all var(--transition); position: relative; overflow: hidden;
}
.card:hover {
    border-color: var(--border-hover); transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.card-link { display: block; color: inherit; }
.card-link:hover { color: inherit; }

/* Brand Card */
.brand-card { text-align: center; cursor: pointer; }
.brand-card__name {
    font-size: 0.95rem; font-weight: 600; margin-bottom: 4px;
    color: var(--text-primary);
}
.brand-card__count {
    font-size: 0.8rem; color: var(--text-secondary);
}
.brand-card:hover .brand-card__name { color: var(--accent); }

/* Device Card */
.device-card { text-align: center; cursor: pointer; }
.device-card__img {
    width: 100%; height: 180px; object-fit: contain;
    margin-bottom: 12px; border-radius: var(--radius-sm);
    transition: transform var(--transition);
}
.device-card:hover .device-card__img { transform: scale(1.05); }
.device-card__name {
    font-size: 0.9rem; font-weight: 600; color: var(--text-primary);
    margin-bottom: 4px;
}
.device-card__desc {
    font-size: 0.8rem; color: var(--text-secondary);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Section ── */
.section { padding: 40px 0; }
.section__title {
    font-size: 1.3rem; font-weight: 700; margin-bottom: 24px;
    display: flex; align-items: center; gap: 12px;
}
.section__title::before {
    content: ''; width: 4px; height: 24px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 2px;
}

/* ── Device Detail Page ── */
.device-hero {
    display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px;
    padding: 48px 0;
}
@media (max-width: 768px) {
    .device-hero { grid-template-columns: 1fr; gap: 24px; }
}
.device-hero__img-wrap {
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 32px;
    aspect-ratio: 1;
}
.device-hero__img-wrap img {
    max-height: 340px; object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(0,0,0,.4));
}
.device-hero__info h1 {
    font-size: 2.2rem; font-weight: 800; letter-spacing: -1px;
    margin-bottom: 16px;
}

/* Quick Spec Badges */
.quick-specs {
    display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px;
}
.quick-spec-badge {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-card); border: 1px solid var(--border);
    padding: 10px 16px; border-radius: var(--radius);
    font-size: 0.85rem;
}
.quick-spec-badge__label { color: var(--text-secondary); font-weight: 500; }
.quick-spec-badge__value { color: var(--text-primary); font-weight: 600; }

/* Detail Spec Tables */
.spec-section {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 16px; overflow: hidden;
}
.spec-section__title {
    padding: 14px 20px; font-weight: 700; font-size: 0.95rem;
    background: var(--bg-secondary); border-bottom: 1px solid var(--border);
    color: var(--accent);
}
.spec-row {
    display: grid; grid-template-columns: 180px 1fr;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.spec-row:last-child { border-bottom: none; }
.spec-row:hover { background: rgba(108, 92, 231, 0.04); }
.spec-row__label {
    padding: 12px 20px; font-weight: 500; color: var(--text-secondary);
    font-size: 0.85rem; border-right: 1px solid var(--border);
}
.spec-row__value {
    padding: 12px 20px; font-size: 0.85rem; color: var(--text-primary);
}
@media (max-width: 640px) {
    .spec-row { grid-template-columns: 1fr; }
    .spec-row__label { border-right: none; border-bottom: 1px solid var(--border); padding: 8px 16px; }
    .spec-row__value { padding: 8px 16px; }
}

/* ── Compare Page ── */
.compare-grid {
    display: grid; gap: 0;
    border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden;
}
.compare-grid.cols-2 { grid-template-columns: 180px repeat(2, 1fr); }
.compare-grid.cols-3 { grid-template-columns: 180px repeat(3, 1fr); }
.compare-header {
    padding: 20px; text-align: center;
    background: var(--bg-secondary); border-bottom: 1px solid var(--border);
}
.compare-header img { height: 120px; margin: 0 auto 12px; object-fit: contain; }
.compare-header h3 { font-size: 0.9rem; font-weight: 600; }
.compare-cell {
    padding: 10px 16px; font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
}
.compare-cell:last-child { border-right: none; }
.compare-label {
    background: var(--bg-secondary); font-weight: 600; color: var(--text-secondary);
}
.compare-cat {
    grid-column: 1 / -1; padding: 12px 20px;
    background: var(--bg-card); font-weight: 700; color: var(--accent);
    border-bottom: 1px solid var(--border);
}

/* ── Compare Selector ── */
.compare-select {
    display: flex; gap: 16px; flex-wrap: wrap;
    margin-bottom: 32px; align-items: flex-end;
}
.compare-select select {
    flex: 1; min-width: 200px; padding: 12px 16px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-size: 0.9rem; outline: none;
}
.compare-select select:focus { border-color: var(--accent); }

/* ── Glossary ── */
.glossary-letter {
    font-size: 1.5rem; font-weight: 800; color: var(--accent);
    margin: 32px 0 12px; padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}
.glossary-list { list-style: none; }
.glossary-list li {
    padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.04);
}
.glossary-list li a {
    color: var(--text-primary); font-weight: 500; font-size: 0.95rem;
}
.glossary-list li a:hover { color: var(--accent); }
.glossary-content {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 32px;
    line-height: 1.8; font-size: 0.95rem;
}
.glossary-content h1, .glossary-content h2, .glossary-content h3 {
    color: var(--text-primary); margin: 24px 0 12px;
}
.glossary-content p { color: var(--text-secondary); margin-bottom: 16px; }

/* ── Button ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 12px 24px; border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 600; cursor: pointer;
    border: none; transition: all var(--transition);
}
.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #fff;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px var(--accent-glow); color: #fff;}
.btn-outline {
    background: transparent; border: 1px solid var(--border); color: var(--text-primary);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── Top Devices Sidebar ── */
.top-list { list-style: none; counter-reset: top-list; }
.top-list li {
    counter-increment: top-list;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.top-list li:hover { background: var(--bg-card-hover); }
.top-list li::before {
    content: counter(top-list);
    display: flex; align-items: center; justify-content: center;
    min-width: 28px; height: 28px; border-radius: 50%;
    background: var(--bg-card); border: 1px solid var(--border);
    font-size: 0.8rem; font-weight: 700; color: var(--accent);
}
.top-list li a { color: var(--text-primary); font-weight: 500; font-size: 0.9rem; }
.top-list li a:hover { color: var(--accent); }

/* ── Breadcrumb ── */
.breadcrumb {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 16px 0; font-size: 0.85rem; color: var(--text-muted);
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text-muted); }

/* ── Footer ── */
.site-footer {
    margin-top: 64px; padding: 32px 0;
    background: var(--bg-secondary); border-top: 1px solid var(--border);
    text-align: center; font-size: 0.85rem; color: var(--text-muted);
}

/* ── Empty State ── */
.empty-state {
    text-align: center; padding: 64px 20px;
}
.empty-state h2 { font-size: 1.3rem; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); }

/* ── Pagination ── */
.pagination-wrap { display: flex; justify-content: center; padding: 32px 0; }
.pagination { display: flex; gap: 4px; list-style: none; }
.pagination li a, .pagination li span {
    display: flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 12px;
    border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 500;
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-secondary); transition: all var(--transition);
}
.pagination li a:hover { border-color: var(--accent); color: var(--accent); }
.pagination li.active span {
    background: var(--accent); border-color: var(--accent); color: #fff;
}
.pagination li.disabled span { opacity: .4; cursor: not-allowed; }

/* ── Utility ── */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
