* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #2d3748;
    --accent: #f6ad55;
    --accent-dark: #ed8936;
    --success: #48bb78;
    --info: #4299e1;
    --bg: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;
    --text: #e8e8e8;
    --text-muted: #8888a0;
    --border: #2a2a40;
    --input-bg: #16162a;
    --input-border: #3a3a55;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --radius: 12px;
}

.light-mode, :root.light-mode {
    --bg: #f0f2f5;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f5f5;
    --text: #1a1a2e;
    --text-muted: #666680;
    --border: #dde;
    --input-bg: #fff;
    --input-border: #ccc;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

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

.text-nepal { color: var(--primary); }
.text-premium { color: var(--accent); }

/* Language Switcher */
.lang-switcher .dropdown-menu {
    min-width: 160px;
    max-height: 300px;
    overflow-y: auto;
}

.lang-switcher .dropdown-item {
    font-size: 0.85rem;
    padding: 6px 12px;
}

.lang-switcher .dropdown-item.active {
    background: rgba(192,57,43,0.15);
    color: var(--accent);
}

.lang-switcher .dropdown-item button {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    color: var(--text);
    padding: 0;
}

/* Header */
.header {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.light-mode .header {
    background: rgba(255,255,255,0.95);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
}

.logo-accent { color: var(--primary); }

/* Navigation */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--text);
    background: rgba(255,255,255,0.05);
}

.nav-dropdown { position: relative; }

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    min-width: 200px;
    box-shadow: var(--shadow);
    z-index: 100;
}

.nav-dropdown:hover .dropdown-menu { display: block; }

.dropdown-item {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9rem;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.1);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
}

/* Buttons */
.btn-nepal {
    background: linear-gradient(135deg, var(--primary), #764ba2);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-nepal:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
    color: white;
}

.btn-outline-nepal {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-outline-nepal:hover {
    background: var(--primary);
    color: white;
}

.btn-download {
    background: linear-gradient(135deg, var(--success), #219a52);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39,174,96,0.4);
    color: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b69 50%, #667eea 100%);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.light-mode .hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f6ad55 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 60%);
    animation: heroGlow 10s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(5%, 5%); }
}

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

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: white;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-search { max-width: 560px; margin: 0 auto; position: relative; }

.search-wrapper {
    display: flex;
    background: var(--input-bg);
    border-radius: 50px;
    padding: 4px;
    border: 1px solid var(--input-border);
    align-items: center;
}

.search-icon {
    color: var(--text-muted);
    padding-left: 16px;
    font-size: 1.1rem;
}

.hero-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 12px;
    color: var(--text);
    font-size: 1rem;
    outline: none;
}

.hero-search-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.hero-search-btn:hover {
    transform: scale(1.02);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 40px;
}

.stat { text-align: center; }
.stat-number { display: block; font-size: 1.8rem; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 0.85rem; color: rgba(255,255,255,0.6); }

/* Hero Suggestions */
#hero-suggestions {
    left: 50% !important;
    transform: translateX(-50%);
    border-radius: 0 0 var(--radius) var(--radius);
    border-top: none;
}

/* Sections */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 36px;
    color: var(--text);
}

.section-title i { color: var(--primary); }

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--text);
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(102,126,234,0.2);
    color: var(--text);
}

.category-icon { font-size: 2rem; color: var(--accent); margin-bottom: 12px; }
.category-card h3 { font-size: 0.95rem; margin-bottom: 4px; }
.category-card p { font-size: 0.8rem; color: var(--text-muted); }

/* Firmware Cards */
.firmware-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.firmware-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s;
}

.firmware-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.firmware-card-header {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: var(--secondary);
}

.firmware-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.firmware-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-muted);
}

.firmware-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-free { background: var(--info); color: white; }
.badge-premium { background: var(--accent); color: #1a1a2e; }

.firmware-card-body {
    padding: 16px;
}

.firmware-card-body h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text);
}

.firmware-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.firmware-meta span { display: flex; align-items: center; gap: 4px; }

.firmware-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.firmware-stats {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.firmware-stats span { display: flex; align-items: center; gap: 4px; }

/* Brands Grid */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
}

.brands-grid-large {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.brand-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}

.brand-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 25px rgba(243,156,18,0.1);
    color: var(--text);
}

.brand-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 8px;
}

.brand-logo-placeholder {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
}

.brand-name { display: block; font-weight: 600; font-size: 0.9rem; }
.brand-count { font-size: 0.78rem; color: var(--text-muted); }

/* Page Header */
.page-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 12px;
}

.breadcrumb-item a { color: var(--text-muted); font-size: 0.85rem; }
.breadcrumb-item.active { color: var(--accent); font-size: 0.85rem; }
.breadcrumb-item+.breadcrumb-item::before { color: var(--text-muted); }

.page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}

.page-header p {
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Brand Header */
.brand-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 12px;
}

.brand-header-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: var(--radius);
    background: var(--bg-card);
    padding: 8px;
}

/* Series Grid */
.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.series-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}

.series-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    color: var(--text);
}

.series-image, .series-placeholder {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(255,255,255,0.05);
}

.series-card h4 { font-size: 0.95rem; }
.series-card p { font-size: 0.82rem; color: var(--text-muted); }

/* Device Detail */
.device-detail-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.device-detail-image img {
    width: 100%;
    border-radius: var(--radius);
}

.device-detail-placeholder {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.device-specs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.spec {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: 8px;
    font-size: 0.9rem;
}

.spec span:first-child { color: var(--text-muted); }
.spec span:last-child { font-weight: 600; }

/* Devices Grid */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.device-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}

.device-card:hover {
    transform: translateY(-3px);
    border-color: var(--info);
    color: var(--text);
}

.device-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.device-thumb-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
}

.device-card h4 { font-size: 0.85rem; }

/* Firmware Detail Page */
.firmware-detail {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

.firmware-detail-header {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 24px;
}

.firmware-detail-thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
}

.firmware-detail-version { color: var(--text-muted); }

.firmware-action-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.firmware-action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.firmware-action-stats {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.firmware-action-stats span { display: flex; align-items: center; gap: 6px; }

/* Info Grid */
.firmware-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.info-card h5 { margin-bottom: 16px; color: var(--accent); }

.info-list { display: flex; flex-direction: column; gap: 0; }

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.info-row:last-child { border-bottom: none; }
.info-row span:first-child { color: var(--text-muted); }
.info-row span:last-child { font-weight: 500; }

/* OTA Section */
.ota-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.ota-section h5 { margin-bottom: 12px; color: var(--success); }

.ota-info .alert {
    margin-bottom: 0;
    border-radius: 8px;
}

/* Firmware Description */
.firmware-description {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.firmware-description h5 { margin-bottom: 12px; color: var(--accent); }

/* Download Links */
.firmware-download-links {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.firmware-download-links h5 { margin-bottom: 16px; color: var(--accent); }

.download-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.download-link-btn {
    padding: 10px 20px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.download-link-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.download-link-btn.gdrive:hover { border-color: #4285f4; color: #4285f4; }
.download-link-btn.mediafire:hover { border-color: #ff6600; color: #ff6600; }
.download-link-btn.mega:hover { border-color: #d90007; color: #d90007; }

/* Report Section */
.report-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.report-section h5 { margin-bottom: 12px; color: var(--accent); }

/* Comments */
.comments-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.comments-section h5 { margin-bottom: 16px; color: var(--accent); }

.comment-form { margin-bottom: 20px; }

.comment-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.comment-item:last-child { border-bottom: none; }

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.comment-header span { color: var(--text-muted); }
.comment-item p { font-size: 0.92rem; color: var(--text); }

/* Sidebar */
.sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}

.sidebar-section h5 { margin-bottom: 12px; font-size: 0.95rem; }

.related-list { display: flex; flex-direction: column; gap: 10px; }

.related-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    background: var(--bg);
    transition: background 0.2s;
    text-decoration: none;
    color: var(--text);
}

.related-item:hover {
    background: var(--bg-card-hover);
    color: var(--text);
}

.related-thumb {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary);
    font-size: 1.2rem;
}

.related-thumb img { width: 100%; height: 100%; object-fit: cover; }

.related-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.85rem;
}

.related-info small { color: var(--text-muted); }

/* Popular Section */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 700px;
    margin: 0 auto;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.popular-item:hover {
    border-color: var(--accent);
    color: var(--text);
}

.popular-rank {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent);
    min-width: 36px;
}

.popular-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.popular-info strong { font-size: 0.95rem; }
.popular-info span { font-size: 0.82rem; color: var(--text-muted); }

.popular-downloads {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Membership / Premium Plans */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.plan-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(243,156,18,0.15);
}

.plan-card.featured::before {
    content: 'POPULAR';
    position: absolute;
    top: 12px;
    right: -28px;
    background: var(--accent);
    color: #1a1a2e;
    padding: 2px 30px;
    font-size: 0.7rem;
    font-weight: 700;
    transform: rotate(45deg);
}

.plan-header {
    padding: 24px;
    text-align: center;
    background: linear-gradient(135deg, var(--secondary), #1a2a3e);
}

.plan-header h3 {
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 8px;
}

.plan-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
}

.plan-price span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-muted);
}

.plan-body {
    padding: 24px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.plan-features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features li i {
    color: var(--success);
}

.plan-footer {
    padding: 0 24px 24px;
    text-align: center;
}

/* Multi-Currency Badges */
.plan-currencies {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.currency-badge {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.premium-section {
    background: var(--bg-card-alt, var(--bg-secondary));
}

/* Active Membership Card */
.active-membership {
    background: linear-gradient(135deg, var(--success), #219a52);
    border-radius: var(--radius);
    padding: 24px;
    color: white;
    margin-bottom: 24px;
}

/* OTA Check UI */
.ota-check-form {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.ota-result {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.ota-version-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg);
    border-radius: 8px;
    margin-bottom: 8px;
}

.ota-version-info h6 {
    margin-bottom: 4px;
}

.ota-version-info small {
    color: var(--text-muted);
}

.ota-changelog {
    background: var(--bg);
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
    font-size: 0.9rem;
    white-space: pre-wrap;
}

/* AI Search Autocomplete */
#suggestions-box {
    border-radius: 0 0 var(--radius) var(--radius);
    border-top: none;
    box-shadow: var(--shadow);
}

.list-group-item {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text);
}

.list-group-item:hover {
    background: var(--bg-card-hover);
    color: var(--accent);
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-card-icon.downloads { background: rgba(39,174,96,0.15); color: var(--success); }
.stat-card-icon.views { background: rgba(52,152,219,0.15); color: var(--info); }
.stat-card-icon.bookmarks { background: rgba(243,156,18,0.15); color: var(--accent); }
.stat-card-icon.premium { background: rgba(192,57,43,0.15); color: var(--primary); }

.stat-card-body h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.stat-card-body p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Tools */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}

.tool-icon { font-size: 2.5rem; color: var(--accent); margin-bottom: 12px; }
.tool-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.tool-version { color: var(--text-muted); font-size: 0.85rem; }
.tool-card p { font-size: 0.88rem; color: var(--text-muted); margin: 12px 0; }

.tool-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Search */
.advanced-search-form { margin-bottom: 32px; }

.search-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    padding: 0 16px;
}

.search-input-wrapper i { color: var(--text-muted); }
.search-input-wrapper input { border: none; background: transparent; padding: 14px 12px; color: var(--text); outline: none; width: 100%; }

.filter-row {
    display: flex;
    gap: 12px;
}

.filter-row select {
    flex: 1;
    padding: 10px 14px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text);
}

/* Dashboard Tabs */
.dashboard-tabs { border-bottom-color: var(--border); }
.dashboard-tabs .nav-link {
    color: var(--text-muted);
    border: none;
    padding: 10px 20px;
}

.dashboard-tabs .nav-link.active {
    color: var(--accent);
    background: transparent;
    border-bottom: 2px solid var(--accent);
}

/* File Library */
.file-library { padding: 40px 0; }
.folder-section { margin-bottom: 40px; }
.folder-name { font-size: 1.6rem; color: var(--primary); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.model-section { margin-left: 24px; margin-bottom: 20px; }
.model-name { font-size: 1.15rem; color: var(--accent); margin-bottom: 12px; }
.files-list { margin-left: 24px; }

.file-item {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
}

.file-title { font-weight: 600; display: block; margin-bottom: 4px; }
.file-description { color: var(--text-muted); font-size: 0.85rem; margin: 4px 0; }
.file-tags { color: var(--info); font-size: 0.82rem; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i { font-size: 3rem; margin-bottom: 16px; display: block; }

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.footer-brand h4 { color: var(--text); margin-bottom: 12px; }
.footer-brand p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }

.social-links { display: flex; gap: 12px; margin-top: 16px; }

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
}

.social-link:hover { background: var(--primary); color: white; }

.footer-links h5 { color: var(--text); margin-bottom: 12px; font-size: 0.95rem; }
.footer-links a {
    display: block;
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 4px 0;
    transition: color 0.2s;
}

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

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Ad Banners */
.ad-banner {
    text-align: center;
    padding: 10px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

/* Tables */
.table { margin-bottom: 0; }
.table-dark { --bs-table-bg: var(--bg-card); --bs-table-striped-bg: var(--bg-card-hover); --bs-table-border-color: var(--border); }

/* Alerts */
.alert { border-radius: var(--radius); border: none; }

/* Form Controls */
.form-control, .form-select {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text);
    border-radius: 8px;
}

.form-control:focus, .form-select:focus {
    background: var(--input-bg);
    border-color: var(--accent);
    color: var(--text);
    box-shadow: 0 0 0 3px rgba(243,156,18,0.15);
}

/* Sidebar Ad */
.sidebar-ad {
    margin-bottom: 20px;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-method-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    transition: all 0.2s;
    cursor: pointer;
}

.payment-method-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.payment-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 18px 24px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.payment-btn img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
}

.payment-btn span {
    color: var(--text);
}

/* Auth Cards */
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 32px;
    box-shadow: var(--shadow);
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 12px;
}

.auth-header h2 {
    font-size: 1.5rem;
    color: var(--text);
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-card .form-label {
    color: var(--text);
    font-size: 0.9rem;
}

.auth-card input {
    width: 100%;
    padding: 10px 14px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text);
}

.auth-card input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(243,156,18,0.15);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--accent);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 992px) {
    .firmware-detail { grid-template-columns: 1fr; }
    .firmware-info-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .device-detail-header { grid-template-columns: 1fr; }
    .plans-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 16px;
    }

    .nav-menu.open { display: flex; }
    .nav-toggle { display: block; }

    .hero-title { font-size: 2.2rem; }
    .hero-stats { gap: 24px; }
    .hero-search-input { font-size: 0.9rem; }

    .categories-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .brands-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }

    .footer-grid { grid-template-columns: 1fr; gap: 24px; }

    .search-row { flex-direction: column; }
    .filter-row { flex-direction: column; }

    .firmware-action-buttons { flex-direction: column; }
    .firmware-action-buttons .btn { width: 100%; }

    .dashboard-stats { grid-template-columns: 1fr 1fr; }
    .ota-check-form { flex-direction: column; }
}