/**
 * Refer & Earn App - Main Theme Stylesheet
 * High performance, zero unnecessary framework bloat, mobile-first responsive.
 */

:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Light Mode Palette */
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-surface: #f1f5f9;
    --bg-surface-hover: #e2e8f0;
    --border-color: #e2e8f0;
    --border-subtle: #edf2f7;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;
    
    --brand-primary: #0d9488;
    --brand-hover: #0f766e;
    --brand-light: #f0fdfa;
    --brand-border: #99f6e4;
    
    --accent-bonus: #059669;
    --accent-bonus-bg: #ecfdf5;
    --accent-bonus-border: #a7f3d0;
    
    --badge-verified: #166534;
    --badge-verified-bg: #dcfce7;
    
    --warning-bg: #fffbeb;
    --warning-text: #92400e;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Palette */
[data-theme="dark"] {
    --bg-page: #090d16;
    --bg-card: #131b2e;
    --bg-surface: #1e293b;
    --bg-surface-hover: #2b3952;
    --border-color: #27354f;
    --border-subtle: #1c273c;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    
    --brand-primary: #14b8a6;
    --brand-hover: #2dd4bf;
    --brand-light: #132e2e;
    --brand-border: #134e4a;
    
    --accent-bonus: #34d399;
    --accent-bonus-bg: #064e3b;
    --accent-bonus-border: #047857;
    
    --badge-verified: #4ade80;
    --badge-verified-bg: #052e16;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.25s ease, color 0.25s ease;
    overflow-x: hidden;
}

a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--brand-hover);
}

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

.container {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Navigation Bar */
.site-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.site-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    box-shadow: 0 2px 4px rgba(13, 148, 136, 0.3);
}

.nav-desktop {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
}

.nav-desktop li a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 6px 2px;
}

.nav-desktop li a:hover,
.nav-desktop li.current-menu-item a {
    color: var(--brand-primary);
}

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

.theme-toggle-btn,
.mobile-nav-toggle {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}

.theme-toggle-btn:hover,
.mobile-nav-toggle:hover {
    background: var(--bg-surface-hover);
    color: var(--brand-primary);
}

.mobile-nav-toggle {
    display: none;
}

/* Mobile Drawer Menu */
.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: var(--bg-card);
    z-index: 999;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    padding: 24px;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

.mobile-drawer.active {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.drawer-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.nav-mobile {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-mobile li a {
    color: var(--text-main);
    font-size: 1.05rem;
    font-weight: 600;
    display: block;
    padding: 6px 0;
}

/* Hero Section */
.hero-section {
    padding: 60px 0 40px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-page) 100%);
    border-bottom: 1px solid var(--border-color);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--brand-light);
    border: 1px solid var(--brand-border);
    color: var(--brand-primary);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 18px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-main);
}

.hero-title span {
    background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 32px;
}

/* Search Bar Component */
.search-bar-wrap {
    position: relative;
    max-width: 620px;
    margin: 0 auto;
}

.search-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-box .search-icon {
    position: absolute;
    left: 18px;
    font-size: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input-box input[type="search"],
.search-input-box input[type="text"] {
    width: 100%;
    height: 54px;
    padding: 12px 50px 12px 50px;
    font-size: 1.05rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.search-input-box input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

.search-spinner {
    position: absolute;
    right: 18px;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Autocomplete Suggestion Dropdown */
.search-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 850;
    overflow: hidden;
    display: none;
    text-align: left;
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-main);
    transition: var(--transition);
}

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

.search-suggestion-item:hover {
    background: var(--bg-surface);
}

.search-suggestion-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-suggestion-info {
    flex-grow: 1;
}

.search-suggestion-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.search-suggestion-reward {
    font-size: 0.8rem;
    color: var(--accent-bonus);
}

/* Quick Category Filter Pills */
.hero-category-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.category-pill:hover,
.category-pill.active {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
}

/* Section Common Styling */
.section-wrap {
    padding: 60px 0;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.section-view-all {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.section-view-all:hover {
    gap: 8px;
}

/* App Cards Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* App Card Component */
.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-border);
}

.app-card-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.app-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    border: 1px solid var(--border-subtle);
}

.app-card-icon-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.app-card-meta {
    flex-grow: 1;
}

.app-card-cat-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--brand-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.app-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
}

.app-card-title a {
    color: var(--text-main);
}

.app-card-title a:hover {
    color: var(--brand-primary);
}

.app-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}

/* Reward Highlight Box */
.app-card-reward {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-bonus-bg);
    border: 1px solid var(--accent-bonus-border);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-bonus);
}

.app-card-reward-icon {
    font-size: 16px;
}

.app-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    color: var(--text-subtle);
}

.app-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--brand-light);
    color: var(--brand-primary);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: 1px solid var(--brand-border);
    transition: var(--transition);
}

.app-card-btn:hover {
    background: var(--brand-primary);
    color: #ffffff;
}

/* Verified Badge Component */
.badge-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--badge-verified-bg);
    color: var(--badge-verified);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

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

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-md);
}

.category-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--brand-light);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.category-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.category-card-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Single App Detail Page Layout */
.single-app-hero {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 36px 0 44px;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.breadcrumb-nav a {
    color: var(--text-muted);
}

.breadcrumb-nav a:hover {
    color: var(--brand-primary);
}

.breadcrumb-nav .sep {
    color: var(--text-subtle);
}

.app-detail-header-grid {
    display: flex;
    align-items: flex-start;
    gap: 28px;
}

.app-hero-icon {
    width: 110px;
    height: 110px;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.app-hero-info {
    flex-grow: 1;
}

.app-hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.app-hero-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.app-hero-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #d97706;
    font-weight: 700;
}

.app-hero-reward-banner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-bonus-bg);
    border: 1px solid var(--accent-bonus-border);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    color: var(--accent-bonus);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 20px;
}

.app-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(13, 148, 136, 0.3);
}

.btn-primary:hover {
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(13, 148, 136, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
    color: var(--brand-primary);
}

/* Referral Code Copy Box */
.referral-code-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px dashed var(--border-color);
    padding: 8px 14px;
    border-radius: var(--radius-md);
}

.referral-code-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.referral-code-value {
    font-family: monospace;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.05em;
    color: var(--brand-primary);
}

.referral-code-copy-btn {
    background: var(--brand-primary);
    color: #ffffff;
    border: none;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.referral-code-copy-btn:hover {
    background: var(--brand-hover);
}

/* Screenshots Gallery Carousel */
.screenshots-gallery-section {
    margin: 40px 0;
}

.gallery-carousel-wrap {
    position: relative;
}

.screenshots-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 10px 4px 20px;
    -webkit-overflow-scrolling: touch;
}

.screenshots-track::-webkit-scrollbar {
    height: 6px;
}

.screenshots-track::-webkit-scrollbar-track {
    background: var(--bg-surface);
    border-radius: var(--radius-full);
}

.screenshots-track::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

.screenshot-card {
    flex: 0 0 auto;
    width: 200px;
    aspect-ratio: 9 / 16;
    border-radius: var(--radius-lg);
    overflow: hidden;
    scroll-snap-align: start;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    cursor: pointer;
    position: relative;
    background: var(--bg-card);
    transition: var(--transition);
}

.screenshot-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.screenshot-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screenshot-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0;
    transition: var(--transition);
    font-size: 24px;
}

.screenshot-card:hover .screenshot-overlay {
    opacity: 1;
}

.gallery-arrow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.gallery-arrow-btn:hover {
    background: var(--brand-primary);
    color: #ffffff;
}

.gallery-arrow-prev { left: -16px; }
.gallery-arrow-next { right: -16px; }

/* Accessible Full-Screen Modal Lightbox */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-md);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    aspect-ratio: 9 / 16;
    object-fit: contain;
}

.lightbox-close-btn {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
}

.lightbox-counter {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-nav-btn:hover {
    background: var(--brand-primary);
}

.lightbox-prev { left: -64px; }
.lightbox-next { right: -64px; }

/* Detail Page Content Blocks */
.app-detail-content-wrap {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 40px;
    margin: 40px 0 60px;
}

.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.content-card h2,
.content-card h3 {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 18px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-card p {
    margin-bottom: 16px;
    color: var(--text-main);
    line-height: 1.7;
}

.content-card ul,
.content-card ol {
    margin: 0 0 20px 24px;
    line-height: 1.7;
}

.content-card li {
    margin-bottom: 8px;
}

/* Editorial Review Box */
.editorial-review-box {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 24px 0;
}

[data-theme="dark"] .editorial-review-box {
    background: #112827;
    border-color: #134e4a;
}

.editorial-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 8px;
}

/* FAQ Accordion Component */
.faq-accordion-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    background: var(--bg-card);
}

.faq-question {
    width: 100%;
    padding: 16px 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.faq-question:hover {
    color: var(--brand-primary);
}

.faq-answer {
    padding: 0 20px 16px;
    display: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.faq-accordion-item.active .faq-answer {
    display: block;
}

/* Sidebar Info Card */
.sidebar-spec-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: sticky;
    top: 96px;
    box-shadow: var(--shadow-sm);
}

.spec-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 16px 0;
}

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

.spec-label {
    color: var(--text-muted);
}

.spec-val {
    font-weight: 600;
    color: var(--text-main);
    text-align: right;
}

/* Referral Disclosure Box */
.referral-disclosure-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 24px;
}

/* Social Share Bar */
.social-share-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    transition: var(--transition);
}

.share-whatsapp { background: #25d366; }
.share-telegram { background: #0088cc; }
.share-twitter  { background: #1da1f2; }
.share-facebook { background: #1877f2; }
.share-copy     { background: var(--text-muted); }

.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.95;
    color: #ffffff;
}

/* Pagination */
.pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
}

.pagination-wrap .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
}

.pagination-wrap .page-numbers.current {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
}

/* Footer */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
    margin-top: 60px;
}

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

.footer-about p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 12px;
}

.footer-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-subtle);
}

/* Form Styles */
.contact-form-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 640px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group label .required {
    color: #ef4444;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .app-detail-content-wrap {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }
    .mobile-nav-toggle {
        display: flex;
    }
    .hero-title {
        font-size: 1.9rem;
    }
    .app-detail-header-grid {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .app-hero-meta-row {
        justify-content: center;
    }
    .app-hero-actions {
        justify-content: center;
    }
    .gallery-arrow-btn {
        display: none; /* Mobile users swipe touch smoothly */
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
