/* ==========================================================================
   Flavor Starter - Main Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
    /* Colors */
    --color-primary: #2563eb;
    --color-primary-dark: #1e40af;
    --color-primary-light: #3b82f6;
    --color-primary-50: #eff6ff;
    --color-primary-100: #dbeafe;
    --color-secondary: #7c3aed;
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #06b6d4;

    /* Backgrounds */
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-muted: #f1f5f9;
    --bg-overlay: rgba(0, 0, 0, 0.5);

    /* Text */
    --text: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-inverse: #ffffff;

    /* Borders */
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Spacing */
    --header-height: 64px;
    --container-max: 1280px;
    --container-padding: 1rem;

    /* Radius */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;

    /* Star colors */
    --star-filled: #f59e0b;
    --star-empty: #d1d5db;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-muted: #1e293b;
    --bg-overlay: rgba(0, 0, 0, 0.7);

    --text: #e2e8f0;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #64748b;

    --border: #334155;
    --border-light: #1e293b;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);

    --star-empty: #475569;
}

[x-cloak] { display: none !important; }

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

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

.prose {
    line-height: 1.75;
}
.prose h2 { margin-top: 2rem; margin-bottom: 0.75rem; }
.prose h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.25rem; }
.prose a { color: var(--color-primary); text-decoration: underline; }
.prose code { background: var(--bg-muted); padding: 0.125rem 0.375rem; border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 0.875em; }
.prose pre { background: var(--bg-muted); padding: 1rem; border-radius: var(--radius); overflow-x: auto; margin-bottom: 1rem; }
.prose img { border-radius: var(--radius); margin: 1rem 0; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

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

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-primary);
    color: var(--text-inverse);
    border-color: var(--color-primary);
}
.btn--primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.btn--outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn--outline:hover {
    background: var(--bg-muted);
    border-color: var(--text-muted);
}

.btn--ghost {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 0.5rem 0.75rem;
}
.btn--ghost:hover { color: var(--text); background: var(--bg-muted); }

.btn--social {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    width: 100%;
}
.btn--social:hover { background: var(--bg-muted); }

.btn--sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn--lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn--block { display: flex; width: 100%; }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn.is-loading { pointer-events: none; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-input,
.form-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-50);
}

[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-select:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

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

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.form-group--row { display: flex; align-items: center; justify-content: space-between; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow var(--transition-slow);
}

.site-header.is-scrolled {
    box-shadow: var(--shadow-md);
}

.header__inner {
    display: flex;
    align-items: center;
    height: var(--header-height);
    gap: 1rem;
}

.header__logo {
    flex-shrink: 0;
}
.header__logo a { display: flex; align-items: center; }
.header__logo img { height: 36px; width: auto; }

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.header__nav {
    flex: 1;
    display: none;
}
.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}
.nav-menu li { position: relative; }
.nav-menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius);
    transition: color var(--transition), background var(--transition);
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a {
    color: var(--color-primary);
    background: var(--color-primary-50);
}
[data-theme="dark"] .nav-menu a:hover,
[data-theme="dark"] .nav-menu .current-menu-item > a {
    background: rgba(37, 99, 235, 0.1);
}

.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    z-index: 100;
}
.nav-menu li:hover > .sub-menu { display: block; }
.nav-menu .sub-menu a {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.header__action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    color: var(--text-muted);
    transition: all var(--transition);
}
.header__action-btn:hover {
    color: var(--text);
    background: var(--bg-muted);
}

.header__points {
    display: none;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
    background: var(--color-primary-50);
    border-radius: var(--radius-full);
}

.header__user { position: relative; }
.header__user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    color: var(--text);
    transition: background var(--transition);
}
.header__user-btn:hover { background: var(--bg-muted); }
.header__avatar { width: 32px; height: 32px; border-radius: var(--radius-full); }
.header__username {
    display: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.header__dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    z-index: 100;
}

.header__dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.header__dropdown-item:hover { background: var(--bg-muted); color: var(--text); }
.header__dropdown-item--danger:hover { color: var(--color-danger); }
.header__dropdown-divider { height: 1px; background: var(--border); margin: 0.375rem 0; }

.header__register-btn { display: none; }

/* Search Overlay */
.header__search-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
}
.header__search-overlay .container { display: flex; align-items: center; gap: 1rem; }
.header__search-overlay .search-form { flex: 1; }
.header__search-close {
    color: var(--text-muted);
    display: flex;
}

/* Hamburger */
.header__hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}
.hamburger-line {
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: all var(--transition);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1001;
}
.mobile-menu__overlay {
    position: absolute;
    inset: 0;
    background: var(--bg-overlay);
}
.mobile-menu__drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: var(--bg-card);
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}
.mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}
.mobile-menu__title { font-weight: 600; }
.mobile-nav-menu { padding: 1rem; }
.mobile-nav-menu a {
    display: block;
    padding: 0.75rem 0;
    font-size: 1rem;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
}
.mobile-nav-menu .sub-menu { padding-left: 1rem; }
.mobile-nav-menu .sub-menu a { font-size: 0.875rem; color: var(--text-secondary); }
.mobile-menu__auth {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Skip Link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    position: fixed;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    z-index: 10000;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 3rem 0;
    color: white;
    text-align: center;
}

.hero__title {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.75rem;
}

.hero__subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero__search {
    max-width: 640px;
    margin: 0 auto 2rem;
}

.hero__search-form {
    display: flex;
    align-items: center;
    background: white;
    border-radius: var(--radius-lg);
    padding: 0.25rem;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.hero__search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
}

.hero__search-input {
    flex: 1;
    border: none;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    font-size: 1rem;
    color: var(--text);
    background: transparent;
    outline: none;
}

.hero__search-btn {
    border-radius: var(--radius);
}

.hero__stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.hero__stat { text-align: center; }
.hero__stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
}
.hero__stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
    padding: 3rem 0;
}

.section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.section__header--center {
    flex-direction: column;
    text-align: center;
    margin-bottom: 2rem;
}

.section__title {
    font-size: 1.5rem;
    font-weight: 700;
}

.section__subtitle {
    color: var(--text-muted);
    margin-top: 0.5rem;
    max-width: 600px;
}

.section__link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    transition: gap var(--transition);
}
.section__link:hover { gap: 0.5rem; }

/* --------------------------------------------------------------------------
   Items Grid
   -------------------------------------------------------------------------- */
.items-grid {
    display: grid;
    gap: 1.5rem;
}

.items-grid--3 {
    grid-template-columns: 1fr;
}

.items-grid--4 {
    grid-template-columns: 1fr;
}

.items-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}
.items-scroll .card-item {
    min-width: 280px;
    max-width: 320px;
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Card Item
   -------------------------------------------------------------------------- */
.card-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.card-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-item__thumb {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bg-muted);
}
.card-item__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.card-item:hover .card-item__img { transform: scale(1.03); }

.card-item__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--bg-muted);
}

.card-item__category {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.card-item__tag {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
}
.card-item__tag--free { background: var(--color-success); color: white; }
.card-item__tag--premium { background: var(--color-warning); color: white; }

.card-item__follow {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    color: var(--text-muted);
    transition: all var(--transition);
    opacity: 0;
}
.card-item:hover .card-item__follow { opacity: 1; }
.card-item__follow:hover { color: var(--color-danger); }

.card-item { display: flex; flex-direction: column; overflow: hidden; }
.card-item__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-item__title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.card-item__excerpt {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.card-item__title a { transition: color var(--transition); }
.card-item__title a:hover { color: var(--color-primary); }

.card-item__excerpt {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-item__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.card-item__downloads {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-item__version {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-light);
    background: var(--bg-muted);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
}

/* Skeleton */
.card-item--skeleton .card-item__thumb { background: var(--bg-muted); }
.skeleton {
    background: linear-gradient(90deg, var(--bg-muted) 25%, var(--border-light) 50%, var(--bg-muted) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
.skeleton--text { height: 1rem; margin-bottom: 0.5rem; }
.skeleton--short { width: 60%; }

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

/* --------------------------------------------------------------------------
   Star Rating
   -------------------------------------------------------------------------- */
.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

.star {
    display: inline-block;
    width: 14px;
    height: 14px;
    position: relative;
}

.star::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: var(--star-empty);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolygon fill='currentColor' points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolygon fill='currentColor' points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
}

.star--full::before { background: var(--star-filled); }
.star--half::before {
    background: linear-gradient(90deg, var(--star-filled) 50%, var(--star-empty) 50%);
}

.star-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}
.badge--free { background: rgba(34, 197, 94, 0.1); color: var(--color-success); }
.badge--premium { background: rgba(245, 158, 11, 0.1); color: var(--color-warning); }

.tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    background: var(--bg-muted);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.tag:hover { background: var(--color-primary-50); color: var(--color-primary); }

/* --------------------------------------------------------------------------
   Progress Bars
   -------------------------------------------------------------------------- */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar__fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.progress-bar__fill--animated {
    transition: width 0.3s linear;
}

/* --------------------------------------------------------------------------
   Spinner
   -------------------------------------------------------------------------- */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding: 1rem 0 0;
}
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb__sep { margin: 0 0.25rem; }

/* --------------------------------------------------------------------------
   Archive Page
   -------------------------------------------------------------------------- */
.archive-page__header {
    padding: 1.5rem 0;
}
.archive-page__title {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}
.archive-page__count {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 1.25rem;
}
.archive-page__desc {
    color: var(--text-muted);
}

.archive-page__layout {
    display: flex;
    gap: 2rem;
    padding-bottom: 3rem;
}

.archive-page__sidebar {
    display: none;
    width: 280px;
    flex-shrink: 0;
}
.archive-page__sidebar-inner {
    position: sticky;
    top: calc(var(--header-height) + 1rem);
}

.archive-page__content { flex: 1; min-width: 0; }

.archive-page__toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.archive-page__filter-toggle { display: flex; }
.archive-page__sort-mobile { margin-left: auto; }
.archive-page__sort-mobile select {
    padding: 0.375rem 2rem 0.375rem 0.5rem;
    font-size: 0.8125rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--bg-card);
    color: var(--text);
}

.archive-page__result-count {
    font-size: 0.8125rem;
    color: var(--text-muted);
    width: 100%;
}

.archive-page__empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    grid-column: 1 / -1;
}
.archive-page__empty svg { margin: 0 auto 1rem; opacity: 0.5; }

.archive-page__load-more {
    text-align: center;
    padding-top: 2rem;
}

/* Active Filters */
.active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    background: var(--color-primary-50);
    color: var(--color-primary);
    border-radius: var(--radius-full);
    border: 1px solid var(--color-primary-100);
}
.filter-chip button { display: flex; color: var(--color-primary); }
.filter-chip--clear {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
}

/* Mobile filter drawer */
.archive-page__sidebar.is-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1001;
    width: 100%;
    background: transparent;
}
.archive-page__sidebar.is-open .archive-page__sidebar-inner {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    overflow-y: auto;
    background: var(--bg-card);
    box-shadow: var(--shadow-xl);
    z-index: 2;
}
.archive-page__sidebar-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 1;
}

/* --------------------------------------------------------------------------
   Filter Sidebar
   -------------------------------------------------------------------------- */
.filter-sidebar {
    padding: 1rem;
}
.filter-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.filter-sidebar__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}
.filter-sidebar__close { display: none; color: var(--text-muted); }
.is-open .filter-sidebar__close { display: flex; }

.filter-group {
    margin-bottom: 1.25rem;
}
.filter-group__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.filter-search { position: relative; }
.filter-search__icon {
    position: absolute;
    left: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.filter-search__input { padding-left: 2rem; }

.filter-radios { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter-radio {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}
.filter-radio input { accent-color: var(--color-primary); }

.filter-checkboxes { display: flex; flex-direction: column; gap: 0.375rem; max-height: 200px; overflow-y: auto; }
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    font-size: 0.8125rem;
}
.filter-checkbox input { accent-color: var(--color-primary); }
.filter-checkbox__count { color: var(--text-light); font-size: 0.75rem; }

.filter-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.filter-tag {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}
.filter-tag:hover,
.filter-tag.is-active {
    background: var(--color-primary-50);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.filter-sidebar__actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   Single Item Page
   -------------------------------------------------------------------------- */
.single-item { padding-bottom: 3rem; }

.single-item__layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.single-item__main { flex: 1; min-width: 0; }

.single-item__gallery {
    margin-bottom: 2rem;
}
.gallery__main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-muted);
    aspect-ratio: 16/10;
}
.gallery__main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-muted);
}
.gallery__thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
}
.gallery__thumb {
    width: 80px;
    height: 60px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid transparent;
    flex-shrink: 0;
    cursor: pointer;
    transition: border-color var(--transition);
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb.is-active { border-color: var(--color-primary); }

/* Tabs */
.tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
    overflow: visible;
}
.tabs-nav__btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
}
.tabs-nav__btn:hover { color: var(--text); }
.tabs-nav__btn.is-active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tab-panel { animation: fadeIn 0.2s ease; }

/* Hide empty ad slots */
.ad-slot:empty,
.ad-slot--sidebar:empty { display: none; }
.ad-slot:not(:has(img)):not(:has(ins)):not(:has(script)):not(:has(iframe)) .ad-slot__label:only-child { display: none; }
.ad-slot:has(.ad-slot__label:only-child) { display: none; }

.screenshots-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}
.screenshot-item { border-radius: var(--radius); overflow: hidden; }
.screenshot-item img { width: 100%; }

/* Info Card (Sidebar) */
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.info-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}
.info-card__rating { margin: 0.75rem 0; }
.info-card__meta {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-bottom: 1rem;
}
.info-card__meta li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-light);
}
.info-card__meta-label { color: var(--text-muted); }
.info-card__meta-value { font-weight: 500; }
.info-card__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1rem;
}
.info-card__share {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.info-card__share-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.share-buttons { display: flex; gap: 0.5rem; }
.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all var(--transition);
}
.share-btn:hover { background: var(--bg-muted); color: var(--text); }
.share-btn--facebook:hover { color: #1877f2; }
.share-btn--twitter:hover { color: #1da1f2; }

/* Related Items */
.related-items {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.related-items__title { margin-bottom: 1rem; font-size: 1rem; }

.related-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    transition: opacity var(--transition);
}
.related-item:last-child { border-bottom: none; }
.related-item:hover { opacity: 0.8; }
.related-item__thumb {
    width: 56px;
    height: 42px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-muted);
}
.related-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-item__name { font-size: 0.8125rem; font-weight: 500; margin-bottom: 0.125rem; }
.related-item__downloads { font-size: 0.75rem; color: var(--text-muted); }

/* Ad Slot */
.ad-slot {
    background: var(--bg-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.ad-slot__label {
    font-size: 0.6875rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Download Box */
.download-box {
    margin: 1rem 0;
}
.download-box__btn { margin-bottom: 0.5rem; }
.download-box__btn-alt { margin-bottom: 0.5rem; font-size: 0.8125rem; }
.download-box__remaining {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 0.5rem;
}
.download-box__follow {
    margin-top: 0.5rem;
}
.download-box__follow.is-following { color: var(--color-danger); }

/* --------------------------------------------------------------------------
   Review Section
   -------------------------------------------------------------------------- */
.review-summary {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.review-summary__average { text-align: center; }
.review-summary__number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}
.review-summary__count {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.25rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}
.rating-bar__label { width: 0.5rem; text-align: right; }
.rating-bar__star { color: var(--star-filled); width: 12px; height: 12px; flex-shrink: 0; }
.rating-bar__track {
    flex: 1;
    height: 6px;
    background: var(--bg-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.rating-bar__fill { height: 100%; background: var(--star-filled); border-radius: var(--radius-full); }
.rating-bar__count { width: 1.5rem; font-size: 0.75rem; color: var(--text-muted); }

.review-sort {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.review-sort__btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: var(--radius-full);
    color: var(--text-muted);
    transition: all var(--transition);
}
.review-sort__btn:hover { background: var(--bg-muted); color: var(--text); }
.review-sort__btn.is-active { background: var(--color-primary-50); color: var(--color-primary); }

.review-form {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-muted);
    border-radius: var(--radius-lg);
}
.review-form__title { margin-bottom: 1rem; }
.review-form__rating { margin-bottom: 1rem; }
.review-form__label { font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; display: block; }
.review-form__stars { display: flex; gap: 0.25rem; }
.review-form__star { color: var(--star-empty); transition: color var(--transition); }
.review-form__star.is-active { color: var(--star-filled); }
.review-form__actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1rem; }
.review-form__error { color: var(--color-danger); font-size: 0.875rem; margin-bottom: 0.5rem; }
.review-form__success { color: var(--color-success); font-size: 0.875rem; margin-bottom: 0.5rem; }

/* --------------------------------------------------------------------------
   Features Grid
   -------------------------------------------------------------------------- */
.features-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--color-primary-50);
    color: var(--color-primary);
    margin-bottom: 1rem;
}
.feature-card__title { margin-bottom: 0.5rem; font-size: 1.125rem; }
.feature-card__text { font-size: 0.875rem; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   CTA Block
   -------------------------------------------------------------------------- */
.cta-block {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--secondary, #7c3aed) 100%);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-block__title { font-size: 1.75rem; color: white; margin-bottom: 0.75rem; }
.cta-block__text { font-size: 1rem; opacity: 0.9; max-width: 500px; margin: 0 auto 1.5rem; }
.cta-block__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cta-block__actions .btn--outline { border-color: rgba(255,255,255,0.3); color: white; }
.cta-block__actions .btn--outline:hover { background: rgba(255,255,255,0.1); }
.cta-block__visual { display: none; }

.cta-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    background: white;
}
.cta-shape--1 { width: 200px; height: 200px; top: -50px; right: -50px; }
.cta-shape--2 { width: 150px; height: 150px; bottom: -40px; left: -40px; }
.cta-shape--3 { width: 80px; height: 80px; top: 50%; right: 30%; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding-top: 3rem;
}

.footer__widgets {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    padding-bottom: 2rem;
}

.footer__brand { margin-bottom: 1rem; }
.footer__logo-text { font-size: 1.25rem; font-weight: 700; color: var(--color-primary); }
.footer__desc { font-size: 0.875rem; color: var(--text-muted); margin-top: 0.5rem; }

.footer__links li { margin-bottom: 0.5rem; }
.footer__links a {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color var(--transition);
}
.footer__links a:hover { color: var(--color-primary); }

.widget-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer__bottom {
    border-top: 1px solid var(--border);
    padding: 1.25rem 0;
}
.footer__bottom-inner {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    text-align: center;
}
.footer__copyright { font-size: 0.8125rem; color: var(--text-muted); }
.footer__copyright a { color: var(--text); font-weight: 500; }
.footer__legal { display: flex; gap: 1.5rem; }
.footer__legal a {
    font-size: 0.8125rem;
    color: var(--text-muted);
    transition: color var(--transition);
}
.footer__legal a:hover { color: var(--color-primary); }

/* --------------------------------------------------------------------------
   Back to Top
   -------------------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: 50;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--color-primary-dark); transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}
.modal__overlay {
    position: absolute;
    inset: 0;
    background: var(--bg-overlay);
}
.modal__content {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
}
.modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--text-muted);
    z-index: 1;
}
.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.modal__title { font-size: 1.25rem; }
.modal__footer { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; }

/* Auth Modal */
.auth-modal__tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
}
.auth-modal__tab {
    flex: 1;
    padding: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
}
.auth-modal__tab.is-active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.auth-form__forgot {
    font-size: 0.8125rem;
    color: var(--color-primary);
}
.auth-form__captcha { margin-bottom: 1rem; }
.auth-form__error {
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
.auth-form__success {
    padding: 0.75rem;
    background: rgba(34, 197, 94, 0.1);
    color: var(--color-success);
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
.auth-form__terms {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1rem;
}
.auth-form__terms a { color: var(--color-primary); text-decoration: underline; }

.auth-modal__divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
}
.auth-modal__divider::before,
.auth-modal__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-modal__social-btns { display: flex; gap: 0.75rem; }

/* Password Strength */
.password-strength { margin-top: 0.5rem; }
.password-strength__bar { height: 4px; background: var(--bg-muted); border-radius: 2px; overflow: hidden; }
.password-strength__fill { height: 100%; transition: all var(--transition); }
.password-strength__fill.weak { width: 25%; background: var(--color-danger); }
.password-strength__fill.fair { width: 50%; background: var(--color-warning); }
.password-strength__fill.good { width: 75%; background: var(--color-info); }
.password-strength__fill.strong { width: 100%; background: var(--color-success); }
.password-strength__text { font-size: 0.75rem; margin-top: 0.25rem; color: var(--text-muted); }

/* Captcha Placeholder */
.captcha-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-muted);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-muted);
}
.captcha-success {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(34, 197, 94, 0.1);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--color-success);
}

/* --------------------------------------------------------------------------
   Notification Dropdown
   -------------------------------------------------------------------------- */
.notification-dropdown { position: relative; }

.notification-dropdown__trigger { position: relative; }
.notification-dropdown__badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 0.625rem;
    font-weight: 700;
    background: var(--color-danger);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-dropdown__panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 360px;
    max-width: 90vw;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 100;
}

.notification-dropdown__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}
.notification-dropdown__header h4 { font-size: 0.9375rem; }
.notification-dropdown__mark-read {
    font-size: 0.75rem;
    color: var(--color-primary);
    cursor: pointer;
}

.notification-dropdown__list {
    max-height: 360px;
    overflow-y: auto;
}

.notification-dropdown__empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}
.notification-dropdown__empty svg { margin: 0 auto 0.5rem; opacity: 0.5; }

.notification-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}
.notification-item:hover { background: var(--bg-muted); }
.notification-item.is-unread { background: var(--color-primary-50); }
[data-theme="dark"] .notification-item.is-unread { background: rgba(37, 99, 235, 0.05); }
.notification-item__icon { flex-shrink: 0; width: 32px; height: 32px; }
.notification-item__text { font-size: 0.8125rem; margin-bottom: 0.125rem; }
.notification-item__time { font-size: 0.75rem; color: var(--text-muted); }

.notification-dropdown__footer {
    padding: 0.75rem;
    text-align: center;
    border-top: 1px solid var(--border);
}
.notification-dropdown__footer a {
    font-size: 0.8125rem;
    color: var(--color-primary);
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Profile Page
   -------------------------------------------------------------------------- */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 2rem 0;
}
.profile-header__avatar { position: relative; }
.profile-avatar { width: 96px; height: 96px; border-radius: var(--radius-full); border: 3px solid var(--bg-card); box-shadow: var(--shadow); }
/* Premium avatar styles */
.profile-header__avatar.is-premium .profile-avatar {
    border: 3px solid #f59e0b;
    border-radius: 50%;
}
.profile-header__badge-premium {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #f59e0b;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}
.profile-header__name { font-size: 1.5rem; }
.profile-header__meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.profile-header__level { background: var(--color-primary-50); color: var(--color-primary); padding: 0.125rem 0.5rem; border-radius: var(--radius-full); font-weight: 600; }
.profile-header__stats { display: flex; gap: 2rem; }
.profile-stat { text-align: center; }
.profile-stat__number { display: block; font-size: 1.25rem; font-weight: 700; }
.profile-stat__label { font-size: 0.75rem; color: var(--text-muted); }

.profile-progress {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}
.profile-progress__header {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.profile-badges { margin-bottom: 1.5rem; }
.profile-badges__title { margin-bottom: 0.75rem; }
.profile-badges__grid { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 80px;
}
.badge-item__icon { font-size: 1.5rem; }
.badge-item__name { font-size: 0.75rem; color: var(--text-muted); text-align: center; }

.profile-overview__section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}
.profile-overview__section h3 { margin-bottom: 0.5rem; }

.tab-loading {
    display: flex;
    justify-content: center;
    padding: 3rem;
}

/* --------------------------------------------------------------------------
   Earn Points Page
   -------------------------------------------------------------------------- */
.earn-page { padding-bottom: 3rem; }
.page-title { font-size: 1.75rem; margin-bottom: 1.5rem; }

.earn-page__balance {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    margin-bottom: 2rem;
}

.earn-page__points-card {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}
.earn-page__points-label { font-size: 0.875rem; opacity: 0.8; display: block; }
.earn-page__points-value { font-size: 2.5rem; font-weight: 800; display: block; }
.earn-page__points-unit { font-size: 0.875rem; opacity: 0.7; }

.earn-page__level-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.earn-page__level-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}
.earn-page__level-next { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.5rem; }

.earn-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.earn-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.earn-section__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
}
.earn-section__reward {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
    background: var(--color-primary-50);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
}

.earn-ads__info { margin-bottom: 1rem; }
.earn-ads__info p { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 0.25rem; }
.earn-ads__counter { font-size: 0.8125rem; color: var(--text-muted); font-weight: 500; }
.earn-ads__progress { margin-bottom: 1rem; }
.earn-ads__progress-text { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.25rem; }

.task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}
.task-item:last-child { border-bottom: none; }
.task-item__check { color: var(--text-muted); flex-shrink: 0; }
.task-item__check.is-completed { color: var(--color-success); }
.task-item__info { flex: 1; }
.task-item__name { font-size: 0.875rem; font-weight: 500; display: block; }
.task-item__desc { font-size: 0.75rem; color: var(--text-muted); }
.task-item__reward {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-success);
    flex-shrink: 0;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}
.achievement-item:last-child { border-bottom: none; }
.achievement-item__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border-radius: var(--radius);
    color: var(--text-muted);
    flex-shrink: 0;
}
.achievement-item__info { flex: 1; }
.achievement-item__name { font-size: 0.875rem; font-weight: 500; display: block; }
.achievement-item__desc { font-size: 0.75rem; color: var(--text-muted); }
.achievement-item__reward {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-success);
    flex-shrink: 0;
}

.referral-section p { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 1rem; }
.referral-section__code,
.referral-section__link { margin-bottom: 1rem; }
.referral-section__code label,
.referral-section__link label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.25rem;
}
.referral-section__input-group { display: flex; gap: 0.5rem; }
.referral-section__input-group .form-input { flex: 1; }
.referral-section__share { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Pricing Page
   -------------------------------------------------------------------------- */
.pricing-page__header {
    text-align: center;
    padding: 2rem 0 1.5rem;
}
.pricing-page__title { font-size: 2rem; margin-bottom: 0.5rem; }
.pricing-page__subtitle { color: var(--text-muted); max-width: 500px; margin: 0 auto; }

.pricing-comparison { margin-bottom: 2rem; overflow-x: auto; }
.pricing-table {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.pricing-table th,
.pricing-table td {
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
}
.pricing-table th {
    background: var(--bg-muted);
    font-weight: 600;
}
.pricing-table__feature-col { text-align: left; }
.pricing-table__plan-col--premium {
    background: var(--color-primary-50);
    color: var(--color-primary);
    font-weight: 600;
}
.pricing-table__highlight { font-weight: 600; }
.pricing-table td:first-child { text-align: left; color: var(--text-secondary); }

.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
}
.pricing-toggle .is-active { color: var(--text); font-weight: 600; }
.pricing-toggle__switch {
    width: 48px;
    height: 26px;
    background: var(--border);
    border-radius: var(--radius-full);
    position: relative;
    transition: background var(--transition);
    cursor: pointer;
}
.pricing-toggle__switch.is-yearly { background: var(--color-primary); }
.pricing-toggle__slider {
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform var(--transition);
}
.pricing-toggle__switch.is-yearly .pricing-toggle__slider { transform: translateX(22px); }
.pricing-toggle__savings {
    background: var(--color-success);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    margin-left: 0.25rem;
}

.pricing-cards {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    position: relative;
}
.pricing-card--featured {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-lg);
}
.pricing-card__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 1rem;
    background: var(--color-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
}
.pricing-card__header { text-align: center; margin-bottom: 1.5rem; }
.pricing-card__name { font-size: 1.25rem; margin-bottom: 0.5rem; }
.pricing-card__price { display: flex; align-items: baseline; justify-content: center; gap: 0.125rem; }
.pricing-card__amount { font-size: 2.5rem; font-weight: 800; }
.pricing-card__period { font-size: 0.875rem; color: var(--text-muted); }
.pricing-card__billed { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.25rem; }
.pricing-card__features { margin-bottom: 1.5rem; }
.pricing-card__feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}
.pricing-card__feature--disabled { color: var(--text-muted); }

/* FAQ Accordion */
.pricing-faq { max-width: 700px; margin: 0 auto 3rem; }
.pricing-faq__title { text-align: center; margin-bottom: 1.5rem; }

.accordion__item {
    border-bottom: 1px solid var(--border);
}
.accordion__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}
.accordion__trigger svg { flex-shrink: 0; color: var(--text-muted); transition: transform var(--transition); }
.accordion__trigger svg.is-rotated { transform: rotate(180deg); }
.accordion__content { padding-bottom: 1rem; }
.accordion__content p { font-size: 0.875rem; color: var(--text-secondary); }

/* --------------------------------------------------------------------------
   Search Form
   -------------------------------------------------------------------------- */
.search-form__inner {
    display: flex;
    align-items: center;
    position: relative;
}
.search-form__icon {
    position: absolute;
    left: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
}
.search-form__input {
    flex: 1;
    padding: 0.625rem 0.875rem 0.625rem 2.5rem;
    font-size: 0.9375rem;
    border: 1px solid var(--border);
    border-radius: var(--radius) 0 0 var(--radius);
    color: var(--text);
    background: var(--bg-card);
    outline: none;
}
.search-form__input:focus { border-color: var(--color-primary); }
.search-form__btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
}
.search-form__btn:hover { background: var(--color-primary-dark); }

/* --------------------------------------------------------------------------
   404 Page
   -------------------------------------------------------------------------- */
.error-404 { padding: 3rem 0; }
.error-404__content { text-align: center; max-width: 600px; margin: 0 auto 3rem; }
.error-404__number {
    font-size: 8rem;
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1;
    opacity: 0.15;
}
.error-404__title { font-size: 1.75rem; margin-bottom: 0.75rem; }
.error-404__text { color: var(--text-muted); margin-bottom: 1.5rem; }
.error-404__search { max-width: 400px; margin: 0 auto 1.5rem; }
.error-404__actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* Auth Required */
.auth-required {
    text-align: center;
    padding: 4rem 1rem;
}
.auth-required h1 { margin-bottom: 0.5rem; }
.auth-required p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.animate-fade-in { animation: fadeIn 0.3s ease; }
.animate-slide-up { animation: slideUp 0.4s ease; }

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */

/* 480px+ */
@media (min-width: 480px) {
    .items-grid--3 { grid-template-columns: repeat(2, 1fr); }
    .items-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .screenshots-grid { grid-template-columns: repeat(2, 1fr); }
    .earn-page__balance { grid-template-columns: 1fr 1fr; }
    .pricing-cards { grid-template-columns: repeat(2, 1fr); }

    .hero__title { font-size: 2.5rem; }
}

/* 768px+ */
@media (min-width: 768px) {
    :root { --container-padding: 1.5rem; }

    h1 { font-size: 2.25rem; }

    .header__nav { display: block; }
    .header__hamburger { display: none; }
    .header__register-btn { display: inline-flex; }
    .header__points { display: flex; }
    .header__username { display: block; }

    .hero { padding: 4rem 0; }
    .hero__title { font-size: 2.75rem; }

    .footer__widgets { grid-template-columns: 2fr 1fr 1fr; }
    .footer__bottom-inner { flex-direction: row; justify-content: space-between; }

    .archive-page__filter-toggle { display: none; }
    .archive-page__result-count { width: auto; }

    .single-item__layout { flex-direction: row; }
    .single-item__sidebar { width: 360px; flex-shrink: 0; }

    .review-summary { flex-direction: row; }
    .review-summary__average { padding-right: 2rem; border-right: 1px solid var(--border); }
    .review-summary__bars { flex: 1; }

    .profile-header { flex-direction: row; text-align: left; }
    .profile-header__info { flex: 1; }
    .profile-header__actions { margin-left: auto; }
}

/* 1024px+ */
@media (min-width: 1024px) {
    .items-grid--3 { grid-template-columns: repeat(3, 1fr); }
    .items-grid--4 { grid-template-columns: repeat(4, 1fr); }
    .features-grid { grid-template-columns: repeat(4, 1fr); }

    .archive-page__sidebar {
        display: block;
    }

    .archive-page__sidebar-overlay { display: none; }
}

/* 1280px+ */
@media (min-width: 1280px) {
    :root { --container-padding: 2rem; }
}
