/* ============================================
   EN-DOWNLOAD.COM - Complete Stylesheet
   Softonic-Inspired Design System
   ============================================ */

/* --- CSS Variables --- */
:root {
    --primary: #0066FF;
    --primary-dark: #0052CC;
    --primary-light: #E6F0FF;
    --secondary: #00BFA5;
    --secondary-dark: #009688;
    --accent: #FF6B35;
    --success: #4CAF50;
    --warning: #FFC107;
    --danger: #F44336;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F7FA;
    --bg-tertiary: #EBEEF3;
    --text-primary: #1A1A2E;
    --text-secondary: #5F6368;
    --text-tertiary: #9AA0A6;
    --border: #E0E0E0;
    --border-light: #F0F0F0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Inter', sans-serif;
    --max-width: 1280px;
    --header-height: 64px;
    --transition: all 0.2s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

input,
select {
    font-family: inherit;
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

/* --- Utility Classes --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-muted {
    color: var(--text-secondary);
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

/* --- Header --- */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    flex-shrink: 0;
    letter-spacing: -0.03em;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
}

.logo:hover {
    color: var(--primary-dark);
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    background: var(--primary-light);
}

/* Search Bar */
.search-bar {
    flex: 1;
    max-width: 480px;
    position: relative;
    margin-left: auto;
}

.search-bar input {
    width: 100%;
    padding: 10px 44px 10px 16px;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 0.9rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.search-bar input:focus {
    border-color: var(--primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

.search-bar input::placeholder {
    color: var(--text-tertiary);
}

.search-bar button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-bar button:hover {
    background: var(--primary-dark);
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: none;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.5rem;
}

/* --- Sub Navigation / Category Bar --- */
.sub-nav {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.sub-nav::-webkit-scrollbar {
    display: none;
}

.sub-nav-inner {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 20px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.sub-nav a {
    padding: 12px 18px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.sub-nav a:hover,
.sub-nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, #0066FF 0%, #0041A3 50%, #002266 100%);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 191, 165, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    max-width: 700px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-search {
    max-width: 560px;
    margin: 0 auto;
    position: relative;
}

.hero-search input {
    width: 100%;
    padding: 16px 56px 16px 24px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    background: white;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    outline: none;
}

.hero-search input:focus {
    box-shadow: var(--shadow-xl), 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.hero-search input::placeholder {
    color: var(--text-tertiary);
}

.hero-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.hero-search button:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.05);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 40px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    display: block;
}

.hero-stat-label {
    font-size: 0.8rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Section Styles --- */
.section {
    padding: 48px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-link:hover {
    gap: 8px;
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 0;
}

/* --- Platform Tabs --- */
.platform-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: var(--radius-md);
    width: fit-content;
    margin-bottom: 24px;
}

.platform-tab {
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.platform-tab:hover {
    color: var(--text-primary);
}

.platform-tab.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* --- App Card Grid --- */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.app-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* --- App Card --- */
.app-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: var(--transition);
    display: flex;
    gap: 14px;
    position: relative;
    overflow: hidden;
}

.app-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border);
    transform: translateY(-2px);
}

.app-card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.app-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-card-info {
    flex: 1;
    min-width: 0;
}

.app-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-card-name a {
    color: inherit;
}

.app-card-name a:hover {
    color: var(--primary);
}

.app-card-dev {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}

.app-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.app-card-rating {
    display: flex;
    align-items: center;
    gap: 3px;
}

.app-card-rating .stars {
    color: var(--warning);
    font-size: 0.7rem;
}

.app-card-download-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
    opacity: 0;
}

.app-card:hover .app-card-download-btn {
    opacity: 1;
}

.app-card-download-btn:hover {
    background: var(--secondary-dark);
    transform: translateY(-50%) scale(1.1);
}

/* App Card - Horizontal (for trending) */
.app-card-h {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 14px;
}

.app-card-h:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}

.app-card-h .app-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
}

.app-card-h .app-card-rank {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-tertiary);
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.app-card-h .app-card-info {
    flex: 1;
}

.app-card-h .app-card-name {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.app-card-h .btn-download-sm {
    padding: 8px 20px;
    border-radius: 50px;
    background: var(--secondary);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
    flex-shrink: 0;
}

.app-card-h .btn-download-sm:hover {
    background: var(--secondary-dark);
    transform: scale(1.05);
}

/* --- Featured App Card --- */
.featured-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    transition: var(--transition);
}

.featured-card:hover {
    box-shadow: var(--shadow-lg);
}

.featured-card-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

.featured-card-image::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -40px;
    right: -40px;
}

.featured-card-image .app-icon-large {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    background: white;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    z-index: 1;
}

.featured-card-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 50px;
    width: fit-content;
    margin-bottom: 12px;
}

.featured-card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.featured-card-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 191, 165, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-white {
    background: white;
    color: var(--text-primary);
}

.btn-white:hover {
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1rem;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.8rem;
}

.btn-full {
    width: 100%;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

/* --- Category Cards --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.category-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

.category-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    color: var(--primary);
}

.category-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin: 0 auto 10px;
    transition: var(--transition);
}

.category-card:hover .category-icon {
    background: var(--primary);
    color: white;
}

.category-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.category-count {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* --- Articles / Blog Cards --- */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.article-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.article-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.article-card-image {
    width: 100%;
    height: 180px;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-content {
    padding: 20px;
}

.article-card-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 8px;
}

.article-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.article-card-title a {
    color: inherit;
}

.article-card-title a:hover {
    color: var(--primary);
}

.article-card-excerpt {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --- Star Rating --- */
.stars {
    display: inline-flex;
    gap: 1px;
    color: var(--warning);
}

.stars-sm {
    font-size: 0.7rem;
}

.stars-md {
    font-size: 0.85rem;
}

.star-empty {
    color: var(--border);
}

/* --- Breadcrumbs --- */
.breadcrumbs {
    padding: 16px 0;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.breadcrumbs a {
    color: var(--text-secondary);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs span {
    margin: 0 8px;
}

.breadcrumbs .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* --- App Detail Page --- */
.app-detail-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    padding: 32px 0;
}

.app-detail-inner {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.app-detail-icon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.app-detail-info {
    flex: 1;
}

.app-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.app-detail-dev {
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.app-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.app-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-detail-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.btn-download-lg {
    padding: 14px 40px;
    border-radius: 50px;
    background: var(--secondary);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 191, 165, 0.3);
}

.btn-download-lg:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 191, 165, 0.4);
}

.app-detail-version {
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

/* App Detail Content */
.app-detail-body {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    padding: 32px 0;
}

.app-detail-main {}

.app-detail-sidebar {}

/* Tabs */
.detail-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 24px;
    gap: 0;
}

.detail-tab {
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: var(--transition);
}

.detail-tab:hover {
    color: var(--text-primary);
}

.detail-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.detail-content h2 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    margin-top: 24px;
}

.detail-content h2:first-child {
    margin-top: 0;
}

.detail-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.detail-content ul {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding-left: 20px;
    margin-bottom: 16px;
}

.detail-content ul li {
    list-style: disc;
    margin-bottom: 6px;
    line-height: 1.6;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-widget-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-light);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-tertiary);
}

.info-value {
    font-weight: 500;
    color: var(--text-primary);
}

.sidebar-app-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    align-items: center;
}

.sidebar-app-item:last-child {
    border-bottom: none;
}

.sidebar-app-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-app-name {
    font-size: 0.82rem;
    font-weight: 600;
}

.sidebar-app-dev {
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

/* Screenshots */
.screenshots-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.screenshots-scroll::-webkit-scrollbar {
    height: 4px;
}

.screenshots-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.screenshot-item {
    width: 180px;
    height: 320px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
}

/* FAQ Section */
.faq-item {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    overflow: hidden;
    background: var(--bg-primary);
}

.faq-question {
    width: 100%;
    padding: 16px 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-question .faq-icon {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.faq-item.active .faq-question .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer-inner {
    padding: 0 20px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* --- Footer --- */
.footer {
    background: var(--text-primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 0;
    margin-top: 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
    color: white;
    margin-bottom: 16px;
}

.footer-brand .logo-icon {
    background: var(--primary);
}

.footer-brand p {
    font-size: 0.85rem;
    line-height: 1.7;
    max-width: 320px;
}

.footer-column h4 {
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    padding: 5px 0;
    transition: var(--transition);
}

.footer-column a:hover {
    color: white;
    padding-left: 4px;
}

.footer-bottom {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom-links a:hover {
    color: white;
}

/* --- Toast / Notification --- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--text-primary);
    color: white;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease;
    max-width: 360px;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-info {
    border-left: 4px solid var(--primary);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* --- Loading Skeleton --- */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    border: none;
    cursor: pointer;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* --- Search Results --- */
.search-results-container {
    padding: 32px 0;
    min-height: 60vh;
}

.search-results-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.search-results-header h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.search-results-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-filter-btn {
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.search-filter-btn:hover,
.search-filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .app-detail-body {
        grid-template-columns: 1fr;
    }

    .app-detail-sidebar {
        order: -1;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-card-image {
        min-height: 200px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }

    .main-nav {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .search-bar {
        max-width: 200px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .hero-stats {
        gap: 24px;
    }

    .hero-stat-number {
        font-size: 1.25rem;
    }

    .app-grid {
        grid-template-columns: 1fr;
    }

    .app-grid-compact {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .app-detail-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .app-detail-meta {
        justify-content: center;
    }

    .app-detail-actions {
        align-items: center;
        flex-direction: row;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .section {
        padding: 32px 0;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .detail-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .platform-tabs {
        width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero-search input {
        padding: 14px 48px 14px 18px;
        font-size: 0.9rem;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .app-card-download-btn {
        display: none;
    }

    .app-card {
        padding: 14px;
    }

    .app-card-icon {
        width: 52px;
        height: 52px;
    }
}

/* --- Mobile Nav Overlay --- */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background: var(--bg-primary);
    z-index: 2001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
}

.mobile-nav a {
    display: block;
    padding: 12px 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav a:hover {
    color: var(--primary);
}