/* ==========================================================================
   APKindo Theme - Main Stylesheet v2.0.0
   Professional light theme for Indonesian APK distribution
   ========================================================================== */

/* ==========================================================================
   1. CSS CUSTOM PROPERTIES
   ========================================================================== */

:root {
    /* Background Palette */
    --bg-darkest: #ffffff;
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;

    /* Accent Colors */
    --accent: #10b981;
    --accent-hover: #059669;
    --accent-secondary: #06b6d4;
    --accent-purple: #8b5cf6;

    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    /* Borders & Radii */
    --border: #e2e8f0;
    --radius: 12px;
    --radius-sm: 8px;

    /* Shadows */
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --shadow-accent: 0 0 20px rgba(16, 185, 129, 0.1);

    /* Transitions */
    --transition: 0.3s ease;
    --transition-fast: 0.15s ease;

    /* Layout */
    --container-width: 1280px;
    --header-height: 70px;

    /* Font Stack */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
}

/* ==========================================================================
   2. MODERN CSS RESET
   ========================================================================== */

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

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

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-darkest);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

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

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

ul,
ol {
    list-style: none;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    text-align: left;
    padding: 0.75rem 1rem;
}

blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

code {
    font-family: var(--font-mono);
    background: var(--bg-card);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.875em;
}

pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
}

::selection {
    background: var(--accent);
    color: var(--bg-darkest);
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: 0.5em;
}

h1 {
    font-size: clamp(1.875rem, 4vw, 2.75rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.125rem);
    letter-spacing: -0.015em;
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.625rem);
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

small {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

strong {
    font-weight: 600;
    color: var(--text-primary);
}

/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

.site-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.site-main {
    padding-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

.section {
    padding: 60px 0;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.75rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    border-radius: 2px;
}

.section-title-center {
    text-align: center;
    display: block;
}

.section-title-center::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.075rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

/* -- Responsive Grids -- */

.grid-2,
.grid-3,
.grid-4,
.app-grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.app-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Content + Sidebar layout */
.content-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .content-sidebar {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   5. HEADER
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all var(--transition);
}

.site-header.scrolled {
    height: 58px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Logo */
.site-logo,
.header-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    flex-shrink: 0;
    letter-spacing: -0.02em;
}

.site-logo:hover,
.header-logo:hover {
    color: var(--text-primary);
}

.site-logo img,
.header-logo img,
.header-logo .custom-logo {
    display: block;
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.site-logo .logo-accent,
.header-logo .logo-accent {
    color: var(--accent);
}

.header-logo a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    padding: 0.25rem 0;
    line-height: 1;
}

.header-logo .site-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Accent dot before text-only logo */
.header-logo a:not(:has(img)) .site-name::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Header Search */
.header-search {
    display: flex;
    align-items: center;
    position: relative;
    max-width: 340px;
    width: 100%;
}

.header-search input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 0.875rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.header-search input::placeholder {
    color: var(--text-muted);
}

.header-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.header-search-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search-btn:hover {
    color: var(--accent);
}

/* Hamburger / Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    border: none;
    background: none;
    padding: 2px;
    z-index: 1010;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Header actions layout */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.header-search-btn:hover {
    background: var(--bg-dark);
    color: var(--accent);
}

/* ==========================================================================
   6. NAVIGATION
   ========================================================================== */

.main-nav {
    display: flex;
    align-items: center;
    gap: 0;
}

/* nav-list: wp_nav_menu / fallback output */
.nav-list {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list > li {
    display: flex;
    align-items: center;
    position: relative;
}

.nav-list > li > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0;
    z-index: 200;
    list-style: none;
}

.nav-list > li:hover > ul {
    display: block;
}

.nav-list > li > ul > li > a {
    padding: 0.4rem 1rem;
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    white-space: nowrap;
}

.nav-list > li > ul > li > a:hover {
    color: var(--accent);
}

.main-nav a {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    transition: color var(--transition-fast);
    white-space: nowrap;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transform: scaleX(0);
    transition: transform var(--transition);
    transform-origin: center;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-primary);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    transform: scaleX(1);
}

.main-nav a.active {
    color: var(--accent);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    height: 100dvh;
    background: #fff;
    border-left: 1px solid var(--border);
    z-index: 1005;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    overflow-y: auto;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1004;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

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

/* Mobile menu header */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.mobile-menu-header .site-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.mobile-menu-close:hover {
    background: var(--bg-dark);
    color: var(--text-primary);
}

/* Mobile search */
.mobile-search {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 1rem 1.5rem;
    position: relative;
}

.mobile-search input[type="search"] {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.mobile-search input[type="search"]:focus {
    border-color: var(--accent);
}

.mobile-search input[type="search"]::placeholder {
    color: var(--text-muted);
}

.mobile-search button {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

/* Mobile nav list */
.mobile-nav-list {
    list-style: none;
    padding: 0.5rem 1.5rem 1.5rem;
    margin: 0;
}

.mobile-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 0;
    color: var(--text-secondary);
    font-size: 1.0625rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--accent);
}

.mobile-menu a:last-child {
    border-bottom: none;
}

/* ==========================================================================
   7. HERO SECTION
   ========================================================================== */

.hero {
    position: relative;
    padding: 80px 0 60px;
    background: linear-gradient(
        165deg,
        var(--bg-darkest) 0%,
        #f0fdf4 30%,
        #ecfdf5 60%,
        var(--bg-dark) 100%
    );
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(16, 185, 129, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 60% 80%, rgba(139, 92, 246, 0.04) 0%, transparent 40%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2310b981' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: heroPatternDrift 30s linear infinite;
    pointer-events: none;
    opacity: 0.5;
}

@keyframes heroPatternDrift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.15;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Search */
.hero-search {
    max-width: 580px;
    margin: 0 auto 2.5rem;
    position: relative;
}

.hero-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.hero-search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.hero-search-input,
.hero-search input {
    width: 100%;
    padding: 1rem 8rem 1rem 3.25rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.hero-search-input::placeholder,
.hero-search input::placeholder {
    color: var(--text-muted);
}

.hero-search-input:focus,
.hero-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.hero-search-btn,
.hero-search button[type="submit"] {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
    white-space: nowrap;
}

.hero-search-btn:hover,
.hero-search button[type="submit"]:hover {
    background: var(--accent-hover);
    transform: translateY(-50%) scale(1.02);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent);
    display: block;
    line-height: 1.2;
}

.hero-stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   8. APP CARDS
   ========================================================================== */

.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.app-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-accent), var(--shadow);
    background: var(--bg-card-hover);
}

.app-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.875rem;
}

.app-card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    object-fit: cover;
    background: var(--bg-dark);
}

.app-card-info {
    flex: 1;
    min-width: 0;
}

.app-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-card-title a {
    color: var(--text-primary);
    text-decoration: none;
}

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

.app-card-developer {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    padding-top: 0.875rem;
    border-top: 1px solid var(--border);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.app-card-meta .rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.app-card-meta .downloads {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.app-card-meta .size {
    margin-left: auto;
}

.app-card .category-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}

/* Horizontal App Card (for lists) */
.app-card-horizontal {
    flex-direction: row;
    align-items: center;
    padding: 1rem 1.25rem;
}

.app-card-horizontal .app-card-icon {
    width: 52px;
    height: 52px;
}

.app-card-horizontal .app-card-meta {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    gap: 0.75rem;
}

/* ==========================================================================
   9. APP DETAIL PAGE
   ========================================================================== */

.app-detail {
    padding-top: 2rem;
}

.app-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.app-detail-icon {
    width: 96px;
    height: 96px;
    border-radius: var(--radius);
    flex-shrink: 0;
    object-fit: cover;
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.app-detail-title-group {
    flex: 1;
    min-width: 200px;
}

.app-detail-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.app-detail-developer {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
}

.app-detail-developer a {
    color: var(--accent);
}

/* Meta Pills */
.app-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-bottom: 1.5rem;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.meta-pill strong {
    color: var(--text-primary);
    font-weight: 600;
}

.meta-pill svg,
.meta-pill .icon {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* Detail Actions */
.app-detail-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* Screenshot Gallery */
.screenshot-gallery {
    margin-bottom: 2rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    display: flex;
    gap: 0.875rem;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.screenshot-gallery::-webkit-scrollbar {
    height: 6px;
}

.screenshot-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.screenshot-gallery::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.screenshot-gallery img {
    scroll-snap-align: start;
    flex-shrink: 0;
    width: 220px;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: transform var(--transition);
    cursor: pointer;
}

.screenshot-gallery img:hover {
    transform: scale(1.03);
}

/* App Description */
.app-description {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.app-description h3 {
    margin-bottom: 1rem;
}

.app-description p {
    line-height: 1.75;
}

.app-description ul,
.app-description ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.app-description ul {
    list-style: disc;
}

.app-description ol {
    list-style: decimal;
}

.app-description li {
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    line-height: 1.6;
}

/* App Info Table */
.app-info-table {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2rem;
}

.app-info-table table {
    width: 100%;
}

.app-info-table tr {
    border-bottom: 1px solid var(--border);
}

.app-info-table tr:last-child {
    border-bottom: none;
}

.app-info-table th {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.875rem;
    width: 35%;
    background: rgba(0, 0, 0, 0.03);
    padding: 0.8rem 1.25rem;
}

.app-info-table td {
    color: var(--text-primary);
    font-size: 0.9375rem;
    padding: 0.8rem 1.25rem;
}

/* Related Apps */
.related-apps {
    margin-top: 3rem;
}

/* ==========================================================================
   10. BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.btn-secondary:hover {
    background: var(--accent);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
    padding: 0.5rem 1rem;
}

.btn-ghost:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.8125rem;
    border-radius: 6px;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.0625rem;
}

/* Download Button */
.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.875rem 2.25rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
    color: #fff;
}

.btn-download:hover::before {
    left: 100%;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 4px 24px rgba(16, 185, 129, 0.5); }
}

.btn-download:hover {
    animation: pulse 2s ease-in-out infinite;
}

.btn-download .icon-download {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   11. CARDS
   ========================================================================== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all var(--transition);
}

.card:hover {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ==========================================================================
   12. BREADCRUMBS (BEM)
   ========================================================================== */

.breadcrumb {
    padding: 1rem 0 1.25rem;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.breadcrumb__list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.125rem 0.375rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb__item {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
}

.breadcrumb__link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.125rem 0.375rem;
    border-radius: 6px;
    transition: color var(--transition-fast), background-color var(--transition-fast);
    white-space: nowrap;
    display: inline-block;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

.breadcrumb__link:hover,
.breadcrumb__link:focus-visible {
    color: var(--accent);
    background-color: rgba(0, 0, 0, 0.04);
}

.breadcrumb__separator {
    color: var(--text-muted);
    user-select: none;
    font-size: 0.9375rem;
    line-height: 1;
    opacity: 0.6;
    flex-shrink: 0;
}

.breadcrumb__current {
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: min(100%, 420px);
    white-space: nowrap;
    vertical-align: bottom;
}

.breadcrumb__item--current {
    flex: 1 1 auto;
    min-width: 0;
}

/* Mobile: tighter breadcrumb, shorter truncation */
@media (max-width: 640px) {
    .breadcrumb {
        padding: 0.75rem 0 1rem;
        font-size: 0.75rem;
    }
    .breadcrumb__link {
        max-width: 120px;
        padding: 0.125rem 0.25rem;
    }
    .breadcrumb__current {
        max-width: 100%;
        padding: 0.125rem 0.25rem;
    }
}

/* ==========================================================================
   13. SIDEBAR & WIDGETS
   ========================================================================== */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

/* Popular Apps Widget */
.widget-popular-apps .popular-app-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: background var(--transition-fast);
}

.widget-popular-apps .popular-app-item:last-child {
    border-bottom: none;
}

.widget-popular-apps .popular-app-item:hover {
    background: var(--bg-card-hover);
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: var(--radius-sm);
}

.widget-popular-apps .popular-app-thumb {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    object-fit: cover;
    background: var(--bg-dark);
}

.widget-popular-apps .popular-app-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.widget-popular-apps .popular-app-category {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Categories Widget */
.widget-categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    transition: all var(--transition-fast);
}

.widget-categories a:last-child {
    border-bottom: none;
}

.widget-categories a:hover {
    color: var(--accent);
    padding-left: 0.375rem;
}

.widget-categories .count {
    background: var(--bg-dark);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 50px;
    min-width: 28px;
    text-align: center;
}

/* Sidebar Category List (archive/single pages) */
.sidebar-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-category-list li {
    border-bottom: 1px solid var(--border);
}

.sidebar-category-list li:last-child {
    border-bottom: none;
}

.sidebar-category-list a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.sidebar-category-list a:hover {
    color: var(--accent);
    padding-left: 0.375rem;
}

.sidebar-category-list a > span[aria-hidden] {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.sidebar-category-list a > span[aria-hidden] img {
    width: 24px !important;
    height: 24px !important;
}

.sidebar-category-list .category-count {
    margin-left: auto;
    background: var(--bg-dark);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 50px;
    min-width: 28px;
    text-align: center;
}

/* Category Badge Icons (front-page, etc.) */
.category-badge-icon img {
    width: 1em !important;
    height: 1em !important;
    vertical-align: middle;
}

/* ==========================================================================
   14. FOOTER
   ========================================================================== */

.site-footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

.footer-main,
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 2.5rem;
    padding: 3.5rem 0;
}

.footer-brand img,
.footer-brand .footer-logo,
.footer-brand .custom-logo {
    height: 32px !important;
    width: auto !important;
    max-width: 180px;
    object-fit: contain;
    background: #fff;
    padding: 4px 8px;
    border-radius: 6px;
}

.footer-brand .site-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.7;
    margin-top: 0.75rem;
    max-width: 300px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.7;
    margin-top: 0.75rem;
    max-width: 300px;
}

.footer-heading {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color var(--transition-fast);
    padding: 0.125rem 0;
}

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

/* Social Links */
.social-links,
.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.social-links a,
.footer-social a,
.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1rem;
    text-decoration: none;
    transition: all var(--transition);
}

.social-links a:hover,
.footer-social a:hover,
.footer-social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

/* Footer Bottom */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* ==========================================================================
   15. BLOG / POST CARDS
   ========================================================================== */

.post-card {
    display: flex;
    gap: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: all var(--transition);
}

.post-card:hover {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: var(--shadow);
}

.post-card-image {
    width: 240px;
    min-height: 160px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-dark);
}

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

.post-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-card-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.post-card-title a:hover {
    color: var(--accent);
}

.post-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: auto;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-meta a {
    color: var(--accent);
    text-decoration: none;
}

/* Post Content (single article) */
.post-content {
    max-width: 780px;
    line-height: 1.8;
    font-size: 1.0625rem;
}

.post-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.post-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.625rem;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content img {
    border-radius: var(--radius-sm);
    margin: 1.5rem 0;
}

.post-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content ul,
.post-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.post-content ul {
    list-style: disc;
}

.post-content ol {
    list-style: decimal;
}

.post-content li {
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    line-height: 1.7;
}

/* ==========================================================================
   16. PRICING
   ========================================================================== */

.pricing-section {
    padding: 60px 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: all var(--transition);
}

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

.pricing-card.pricing-popular {
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
}

.pricing-card.pricing-popular::before {
    content: 'Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 1rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-plan-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.pricing-price {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

.pricing-price .currency {
    font-size: 1.25rem;
    vertical-align: super;
    font-weight: 600;
    color: var(--text-secondary);
}

.pricing-price .period {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-muted);
}

.pricing-features {
    margin: 1.5rem 0;
    text-align: left;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li::before {
    content: '\2713';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ==========================================================================
   17. FAQ / ACCORDION
   ========================================================================== */

.faq-section {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color var(--transition);
}

.faq-item.active {
    border-color: var(--accent);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 1.125rem 1.25rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: color var(--transition-fast);
}

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

.faq-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--bg-dark);
    transition: all var(--transition);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.faq-toggle-icon::before {
    content: '+';
    font-weight: 600;
    line-height: 1;
}

.faq-item.active .faq-toggle-icon {
    background: var(--accent);
    color: #fff;
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-answer-inner {
    padding: 0 1.25rem 1.125rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* ==========================================================================
   18. CONTACT FORM
   ========================================================================== */

.contact-form {
    max-width: 640px;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9375rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6l3.5 4 3.5-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-error {
    font-size: 0.8125rem;
    color: #f43f5e;
    margin-top: 0.375rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   19. SEARCH RESULTS
   ========================================================================== */

.search-header {
    margin-bottom: 2rem;
}

.search-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

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

.search-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    transition: all var(--transition);
    text-decoration: none;
}

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

.search-item-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    object-fit: cover;
    background: var(--bg-dark);
}

.search-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.search-item-snippet {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

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

.search-overlay-inner {
    width: 100%;
    max-width: 640px;
    padding: 0 1.5rem;
    position: relative;
}

.search-overlay-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.search-overlay-close {
    position: absolute;
    top: -3rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.search-overlay-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.search-overlay-input {
    width: 100%;
    padding: 1.125rem 1.5rem;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1.125rem;
    outline: none;
    transition: border-color var(--transition);
}

.search-overlay-input:focus {
    border-color: var(--accent);
}

.search-overlay-results {
    margin-top: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 400px;
    overflow-y: auto;
}

/* ==========================================================================
   20. RATING STARS
   ========================================================================== */

.rating {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.rating-stars {
    display: inline-flex;
    gap: 1px;
    position: relative;
    font-size: 0.875rem;
    line-height: 1;
}

.rating-stars .star {
    color: #cbd5e1;
    font-style: normal;
}

.rating-stars .star.filled {
    color: #f59e0b;
}

.rating-stars .star.half {
    position: relative;
    color: #cbd5e1;
}

.rating-stars .star.half::before {
    content: '\2605';
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
    color: #f59e0b;
}

.rating-value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-left: 0.25rem;
}

.rating-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================================================
   21. TAGS & BADGES
   ========================================================================== */

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
}

.category-badge-name {
    font-weight: 600;
}

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

.category-badge:hover {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent);
}

.badge-new {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent);
    padding: 0.15rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-updated {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-secondary);
    padding: 0.15rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-popular {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
    padding: 0.15rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ==========================================================================
   22. PAGINATION
   ========================================================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pagination__list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination__item {
    display: inline-flex;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--bg-card-hover);
}

.pagination .current,
.pagination a.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
}

.pagination .dots {
    background: none;
    border: none;
    color: var(--text-muted);
    min-width: auto;
    padding: 0 0.25rem;
}

.pagination .prev,
.pagination .next {
    font-weight: 600;
}

/* ==========================================================================
   23. BACK TO TOP
   ========================================================================== */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   24. ANIMATIONS
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.4s ease forwards;
}

/* Stagger delays for grid children */
.stagger > *:nth-child(1) { animation-delay: 0s; }
.stagger > *:nth-child(2) { animation-delay: 0.05s; }
.stagger > *:nth-child(3) { animation-delay: 0.1s; }
.stagger > *:nth-child(4) { animation-delay: 0.15s; }
.stagger > *:nth-child(5) { animation-delay: 0.2s; }
.stagger > *:nth-child(6) { animation-delay: 0.25s; }
.stagger > *:nth-child(7) { animation-delay: 0.3s; }
.stagger > *:nth-child(8) { animation-delay: 0.35s; }

/* ==========================================================================
   25. UTILITY CLASSES
   ========================================================================== */

/* Text alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Margin Top */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

/* Margin Bottom */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

/* Padding */
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 1rem; }
.pt-4 { padding-top: 1.5rem; }
.pt-5 { padding-top: 2rem; }

.pb-1 { padding-bottom: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 1rem; }
.pb-4 { padding-bottom: 1.5rem; }
.pb-5 { padding-bottom: 2rem; }

/* Flex */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.gap-5 { gap: 2rem; }

/* Visibility */
.hidden { display: none !important; }
.visible { display: block; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Text utilities */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.uppercase { text-transform: uppercase; letter-spacing: 0.04em; }

/* Width */
.w-full { width: 100%; }

/* Borders */
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }

/* Background */
.bg-card { background: var(--bg-card); }
.bg-dark { background: var(--bg-dark); }

/* Border radius */
.rounded { border-radius: var(--radius); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-full { border-radius: 9999px; }

/* ==========================================================================
   26. RESPONSIVE - MOBILE FIRST
   ========================================================================== */

/* -- max-width: 1280px -- */
@media (max-width: 1280px) {
    .footer-main,
    .footer-grid {
        grid-template-columns: 1.5fr repeat(2, 1fr);
    }
}

/* -- max-width: 1024px -- */
@media (max-width: 1024px) {
    .section {
        padding: 40px 0;
    }

    .hero {
        padding: 60px 0 40px;
    }

    .footer-main,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .header-search {
        max-width: 260px;
    }

    .grid-4 {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .post-card-image {
        width: 200px;
    }

    .app-detail-icon {
        width: 80px;
        height: 80px;
    }
}

/* -- max-width: 768px -- */
@media (max-width: 768px) {
    .site-header {
        height: 60px;
    }

    .site-header.scrolled {
        height: 54px;
    }

    .site-main {
        padding-top: 60px;
    }

    .mobile-menu-toggle {
        display: flex !important;
    }

    .main-nav {
        display: none !important;
    }

    .header-search {
        display: none;
    }

    .header-logo img,
    .header-logo .custom-logo {
        height: 30px;
        max-width: 140px;
    }

    .hero-title {
        font-size: clamp(1.625rem, 5vw, 2.25rem);
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .hero-stat-value {
        font-size: 1.375rem;
    }

    .section {
        padding: 32px 0;
    }

    .section-title {
        font-size: 1.375rem;
    }

    .post-card {
        flex-direction: column;
    }

    .post-card-image {
        width: 100%;
        min-height: 180px;
        max-height: 200px;
    }

    .footer-main,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2.5rem 0;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .app-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .app-detail-meta {
        justify-content: center;
    }

    .app-detail-actions {
        justify-content: center;
    }

    .screenshot-gallery img {
        width: 180px;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .content-sidebar {
        grid-template-columns: 1fr;
    }
}

/* -- max-width: 480px -- */
@media (max-width: 480px) {
    body {
        font-size: 0.9375rem;
    }

    .site-container {
        padding: 0 16px;
    }

    .hero {
        padding: 40px 0 30px;
    }

    .hero-search-input,
    .hero-search input {
        padding: 0.875rem 5.5rem 0.875rem 2.75rem;
        font-size: 0.9375rem;
        border-radius: 12px;
    }

    .hero-search-btn,
    .hero-search button[type="submit"] {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
        border-radius: 8px;
    }

    .hero-search-icon {
        left: 1rem;
        width: 18px;
        height: 18px;
    }

    .search-overlay {
        padding-top: 6vh;
    }

    .search-overlay-inner {
        padding: 0 1rem;
    }

    .search-overlay-form {
        flex-direction: column;
    }

    .search-overlay-close {
        top: -2.5rem;
        right: 1rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .hero-stat-value {
        font-size: 1.125rem;
    }

    .hero-stat-label {
        font-size: 0.6875rem;
    }

    .app-card {
        padding: 1rem;
    }

    .app-card-icon {
        width: 52px;
        height: 52px;
    }

    .app-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .btn-download {
        width: 100%;
        justify-content: center;
    }

    .app-detail-icon {
        width: 72px;
        height: 72px;
    }

    .screenshot-gallery img {
        width: 160px;
    }

    .pagination a,
    .pagination span {
        min-width: 36px;
        height: 36px;
        font-size: 0.8125rem;
    }

    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 40px;
        height: 40px;
    }

    .widget {
        padding: 1rem;
    }

    .card {
        padding: 1.125rem;
    }
}

/* ==========================================================================
   27. PRINT STYLES
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .back-to-top,
    .mobile-menu,
    .mobile-menu-overlay,
    .btn-download,
    .search-overlay,
    .pagination {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .site-main {
        padding-top: 0;
    }

    .app-card,
    .card,
    .widget {
        border: 1px solid #ccc;
        background: #fff;
    }
}

/* ==========================================================================
   28. DARK SCROLLBAR
   ========================================================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darkest);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--bg-darkest);
}

/* ==========================================================================
   29. ACCESSIBILITY - FOCUS STYLES
   ========================================================================== */

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   30. LOADING / SKELETON STATES
   ========================================================================== */

.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 14px;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   31. NOTIFICATION / TOAST
   ========================================================================== */

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-success {
    border-color: var(--accent);
}

.toast-error {
    border-color: #f43f5e;
}

/* ==========================================================================
   32. LAZY IMAGE PLACEHOLDER
   ========================================================================== */

img[data-src] {
    opacity: 0;
    transition: opacity 0.4s ease;
}

img[data-src].loaded {
    opacity: 1;
}

img.lazy-placeholder {
    background: var(--bg-card);
    min-height: 100px;
}
