:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #0a0a0f;
    --bg-secondary: #131318;
    --bg-tertiary: #1f1f25;
    --bg-card: rgba(31, 31, 37, 0.6);
    --bg-glass: rgba(20, 20, 28, 0.55);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(139, 92, 246, 0.4);
    --text-primary: #e4e1e9;
    --text-secondary: rgba(228, 225, 233, 0.72);
    --text-muted: rgba(228, 225, 233, 0.42);
    --accent: #8b5cf6;
    --accent-hover: #a078ff;
    --accent-glow: rgba(139, 92, 246, 0.45);
    --gradient-1: linear-gradient(90deg, #8b5cf6 0%, #3b82f6 100%);
    --gradient-2: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 0 60px var(--accent-glow);
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.65);
    --border: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(139, 92, 246, 0.45);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent: #8b5cf6;
    --accent-hover: #6d3bd7;
    --accent-glow: rgba(139, 92, 246, 0.28);
    --gradient-1: linear-gradient(90deg, #8b5cf6 0%, #3b82f6 100%);
    --gradient-2: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.16);
    --shadow-glow: 0 0 60px var(--accent-glow);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; height: -webkit-fill-available; }
html[data-theme="dark"] { background: #0a0a0f; }
html[data-theme="light"] { background: #f8fafc; }
body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
    -webkit-overflow-scrolling: touch;
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
body.modal-open { overflow: hidden; position: fixed; width: 100%; height: 100%; touch-action: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.bg-animation { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 0; overflow: visible; pointer-events: none; }
.bg-gradient { position: absolute; top: -100px; left: -100px; right: -100px; bottom: -100px; background: var(--bg-primary); transition: background var(--transition); }
.bg-grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
    opacity: 0.5;
}
.bg-glow { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.4; animation: float 20s ease-in-out infinite; }
.bg-glow--1 { width: 640px; height: 640px; background: #8b5cf6; top: -220px; right: -180px; animation-delay: 0s; opacity: 0.32; }
.bg-glow--2 { width: 560px; height: 560px; background: #3b82f6; bottom: -180px; left: -160px; animation-delay: -7s; opacity: 0.32; }
.bg-glow--3 { width: 420px; height: 420px; background: #6366f1; top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: -14s; opacity: 0.18; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 30px) scale(1.02); }
}

.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 1rem 0;
    background: rgba(19, 19, 24, 0.78); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); isolation: isolate;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06); box-shadow: 0 8px 32px 0 rgba(139, 92, 246, 0.05); transition: all var(--transition);
}
[data-theme="light"] .header { background: rgba(255, 255, 255, 0.78); border-bottom-color: rgba(15, 23, 42, 0.06); }
.header__container { display: flex; align-items: center; justify-content: space-between; max-width: 1400px; margin: 0 auto; padding: 0 clamp(1rem, 5vw, 3rem); }
.header__logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.25rem; }
.header__logo-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: var(--gradient-1); border-radius: var(--radius-md); transition: transform var(--transition); }
.header__logo-icon svg { fill: white; }
.header__logo-icon--img { padding: 0; background: transparent; object-fit: cover; }
.header__logo:hover .header__logo-icon { transform: rotate(-10deg) scale(1.05); }
.header__actions { display: flex; align-items: center; gap: 0.75rem; }
.theme-toggle { position: relative; width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--bg-glass); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; transition: all var(--transition); overflow: hidden; }
.theme-toggle:hover { border-color: var(--border-hover); background: var(--bg-tertiary); }
.theme-toggle__icon { position: absolute; fill: var(--text-secondary); transition: all var(--transition); }
.theme-toggle__icon--sun { opacity: 0; transform: rotate(-90deg) scale(0); }
.theme-toggle__icon--moon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .theme-toggle__icon--sun { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .theme-toggle__icon--moon { opacity: 0; transform: rotate(90deg) scale(0); }
.header__avatar { width: 44px; height: 44px; border-radius: var(--radius-md); object-fit: cover; border: 2px solid var(--border); cursor: pointer; transition: all var(--transition); }
.header__avatar:hover { border-color: var(--accent); transform: scale(1.05); }
.header__avatar--menu { display: flex; align-items: center; justify-content: center; padding: 0; background: var(--bg-card); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.header__avatar--menu svg { fill: var(--text-secondary); transition: fill var(--transition); }
.header__avatar--menu:hover { border-color: var(--accent); transform: scale(1.05); }
.header__avatar--menu:hover svg { fill: var(--accent); }
@media (max-width: 480px) { .header__logo-text { display: none; } }

.mobile-menu {
    position: fixed; top: 0; right: 0; width: min(400px, 92vw); height: 100vh;
    background: linear-gradient(180deg, rgba(19, 19, 24, 0.92) 0%, rgba(10, 10, 15, 0.96) 100%);
    backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
    border-left: 1px solid var(--border); z-index: 200; padding: 1.5rem;
    transform: translateX(100%); transition: transform var(--transition);
    display: flex; flex-direction: column; overflow: hidden;
}
[data-theme="light"] .mobile-menu { background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.98) 100%); }
.mobile-menu::before { content: ''; position: absolute; top: -100px; right: -100px; width: 320px; height: 320px; background: radial-gradient(circle, rgba(139, 92, 246, 0.22) 0%, transparent 70%); pointer-events: none; }
.mobile-menu::after { content: ''; position: absolute; bottom: -80px; left: -80px; width: 280px; height: 280px; background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, transparent 70%); pointer-events: none; }
.mobile-menu > * { position: relative; z-index: 1; }
.mobile-menu.active { transform: translateX(0); }
.mobile-menu__header { display: flex; align-items: center; gap: 1rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.mobile-menu__avatar { width: 56px; height: 56px; border-radius: 18px; object-fit: cover; border: 2px solid transparent; background: linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box, var(--gradient-1) border-box; box-shadow: 0 8px 24px var(--accent-glow); }
.mobile-menu__info { flex: 1; min-width: 0; }
.mobile-menu__name { display: block; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.mobile-menu__status { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.mobile-menu__close { width: 44px; height: 44px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.mobile-menu__close:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--border-hover); transform: rotate(90deg); }
[data-theme="light"] .mobile-menu__close:hover { background: rgba(15, 23, 42, 0.04); }
.mobile-menu__close svg { fill: var(--text-secondary); }
.mobile-menu__nav { flex: 1; display: flex; flex-direction: column; gap: 0.625rem; padding: 1.75rem 0; }
.mobile-menu__link { position: relative; display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-radius: 18px; font-weight: 600; font-size: 1rem; color: var(--text-secondary); background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.05); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: all var(--transition); overflow: hidden; }
[data-theme="light"] .mobile-menu__link { border-color: rgba(15, 23, 42, 0.06); }
.mobile-menu__link::before { content: ''; position: absolute; inset: 0; background: var(--gradient-1); opacity: 0; transition: opacity var(--transition); z-index: -1; }
.mobile-menu__link:hover { color: white; border-color: transparent; transform: translateX(4px); box-shadow: 0 12px 32px var(--accent-glow); }
.mobile-menu__link:hover::before { opacity: 1; }
.mobile-menu__link-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(139, 92, 246, 0.12); font-size: 1.125rem; flex-shrink: 0; transition: all var(--transition); }
.mobile-menu__link:hover .mobile-menu__link-icon { background: rgba(255, 255, 255, 0.18); }
.mobile-menu__link-text { flex: 1; }
.mobile-menu__link-arrow { fill: var(--text-muted); flex-shrink: 0; opacity: 0.6; transition: all var(--transition); }
.mobile-menu__link:hover .mobile-menu__link-arrow { fill: white; opacity: 1; transform: translateX(2px); }
.mobile-menu__footer { padding-top: 1.25rem; border-top: 1px solid var(--border); }
.mobile-menu__theme { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 1rem 1.25rem; border-radius: 18px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); font-weight: 600; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: all var(--transition); }
.mobile-menu__theme:hover { background: var(--gradient-1); border-color: transparent; color: white; box-shadow: 0 12px 32px var(--accent-glow); }
.mobile-menu__theme-icon { font-size: 1.25rem; }
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px); z-index: 150; opacity: 0; visibility: hidden; transition: all var(--transition); }
.overlay.active { opacity: 1; visibility: visible; }


.hero { min-height: 100vh; display: flex; align-items: center; padding: 8rem 0 4rem; position: relative; z-index: 1; }
.hero__container { max-width: 1400px; margin: 0 auto; padding: 0 clamp(1rem, 5vw, 3rem); text-align: center; }
.hero__badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: var(--bg-glass); border: 1px solid var(--border); border-radius: 100px; font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 2rem; }
.hero__badge-dot { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } }
.hero__title { font-size: clamp(2.75rem, 9vw, 6rem); font-weight: 900; line-height: 1.05; margin-bottom: 1.5rem; letter-spacing: -0.035em; }
.hero__title-gradient { background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero__subtitle { font-size: clamp(1rem, 2.5vw, 1.25rem); color: var(--text-secondary); max-width: 600px; margin: 0 auto 2.5rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-bottom: 4rem; }
.hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; max-width: 760px; width: 100%; margin: 0 auto; }
.hero__stat { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; padding: 1.5rem 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 24px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: all var(--transition); }
.hero__stat:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.hero__stat-value { display: block; font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 900; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -0.02em; }
.hero__stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.15em; font-weight: 500; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.875rem 1.75rem; border-radius: 9999px; font-weight: 700; font-size: 0.9375rem; transition: all var(--transition); }
.btn--primary { background: var(--gradient-1); color: white; box-shadow: var(--shadow-md), 0 0 40px var(--accent-glow); }
.btn--primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: var(--shadow-lg), 0 0 70px var(--accent-glow); }
.btn--primary:active { transform: scale(0.98); }
.btn--primary svg { fill: currentColor; }
.btn--glass { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.btn--glass:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--border-hover); }
[data-theme="light"] .btn--glass:hover { background: rgba(15, 23, 42, 0.04); }
.btn--lg { padding: 1.05rem 2.25rem; font-size: 1rem; border-radius: 9999px; }
.btn--full { width: 100%; }
.btn--reset { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; padding: 1.125rem; margin-top: 2rem; background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 18px; color: var(--text-secondary); font-weight: 700; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: all var(--transition); }
[data-theme="light"] .btn--reset { border-color: rgba(15, 23, 42, 0.06); }
.btn--reset:hover { background: linear-gradient(90deg, #ef4444, #f97316); border-color: transparent; color: white; box-shadow: 0 12px 32px rgba(239, 68, 68, 0.35); }
.btn--reset svg { fill: currentColor; }

.pricing { padding: 6rem 0; position: relative; z-index: 1; }
.pricing__container { max-width: 880px; margin: 0 auto; padding: 0 clamp(1rem, 5vw, 3rem); }
.pricing__card { position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: 40px; padding: clamp(1.75rem, 4vw, 3rem); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); overflow: hidden; }
.pricing__card::before { content: ''; position: absolute; top: -120px; right: -120px; width: 320px; height: 320px; background: radial-gradient(circle, rgba(139, 92, 246, 0.18) 0%, transparent 70%); pointer-events: none; z-index: -1; }
.pricing__header { text-align: center; margin-bottom: 2.5rem; }
.pricing__title { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 900; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.pricing__desc { color: var(--text-secondary); font-weight: 500; }
.pricing__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2rem; }
.pricing__item { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; padding: 1.75rem; background: rgba(20, 20, 28, 0.65); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 24px; transition: all var(--transition); cursor: pointer; font: inherit; color: inherit; text-align: left; width: 100%; }
[data-theme="light"] .pricing__item { background: rgba(248, 250, 252, 0.6); border-color: rgba(15, 23, 42, 0.06); }
.pricing__item:hover { border-color: rgba(139, 92, 246, 0.4); transform: translateY(-2px); }
.pricing__item--popular { box-shadow: 0 0 30px rgba(139, 92, 246, 0.15); }
.pricing__item--selected { border-width: 2px; border-color: rgba(139, 92, 246, 0.7); box-shadow: 0 0 36px rgba(139, 92, 246, 0.28), inset 0 0 0 1px rgba(139, 92, 246, 0.18); }
.pricing__item--selected .pricing__duration { color: #c4b5fd; }
.pricing__badge { position: absolute; top: 1rem; right: 1rem; left: auto; transform: none; padding: 0.25rem 0.625rem; background: #8b5cf6; color: white; font-size: 0.625rem; font-weight: 700; border-radius: 9999px; text-transform: uppercase; letter-spacing: -0.02em; white-space: nowrap; }
.pricing__duration { font-size: 0.875rem; color: var(--text-secondary); font-weight: 600; margin-bottom: 0; }
.pricing__item--popular .pricing__duration { color: #c4b5fd; }
.pricing__price { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 900; letter-spacing: -0.02em; }



.apps { padding: 4rem 0 6rem; position: relative; z-index: 1; }
.apps__container { max-width: 1400px; margin: 0 auto; padding: 0 clamp(1.5rem, 5vw, 3rem); }
.apps__header { text-align: center; margin-bottom: 3rem; }
.apps__title { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 900; letter-spacing: -0.025em; margin-bottom: 0.5rem; }
.apps__subtitle { color: var(--text-secondary); }

.search-bar { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-bottom: 2.5rem; max-width: 600px; margin-left: auto; margin-right: auto; padding: 0; }
.search { position: relative; flex: 1; min-width: 0; }
.search__icon { position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%); fill: var(--text-secondary); pointer-events: none; z-index: 2; transition: fill var(--transition); }
.search:focus-within .search__icon { fill: var(--accent); }
.search__input { width: 100%; padding: 1rem 3.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 9999px; color: var(--text-primary); font-size: 1rem; transition: all var(--transition); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.search__input::placeholder { color: var(--text-muted); }
.search__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow), var(--shadow-lg); }
.search__input:focus ~ .search__icon { fill: var(--accent); }
.search__clear { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; opacity: 0; visibility: hidden; transition: all var(--transition); }
.search__clear svg { fill: var(--text-muted); }
.search__clear:hover { background: var(--bg-tertiary); }
.search__clear:hover svg { fill: var(--text-primary); }
.search__input:not(:placeholder-shown) ~ .search__clear { opacity: 1; visibility: visible; }
.settings-btn { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; padding: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 50%; color: var(--text-secondary); transition: all var(--transition); backdrop-filter: blur(10px); flex-shrink: 0; }
.settings-btn span { display: none; }
.settings-btn svg { fill: currentColor; width: 22px; height: 22px; }
.settings-btn:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }

.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
.app-item { background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 28px; padding: 1.5rem; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: all var(--transition); animation: fadeInUp 0.5s ease forwards; opacity: 0; }
[data-theme="light"] .app-item { border-color: rgba(15, 23, 42, 0.06); }
.app-item:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: var(--shadow-lg); background: rgba(255, 255, 255, 0.06); }
[data-theme="light"] .app-item:hover { background: rgba(255, 255, 255, 1); }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.app-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.app-header img { width: 60px; height: 60px; border-radius: 16px; object-fit: cover; flex-shrink: 0; box-shadow: var(--shadow-md); }
.app-header__info { flex: 1; min-width: 0; }
.app-header__info h3 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-header__info p { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
.app-item hr { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }
.app-description { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.pagination { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.pagination button { min-width: 44px; height: 44px; padding: 0 0.875rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; color: var(--text-secondary); font-weight: 600; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: all var(--transition); }
.pagination button:hover:not(:disabled) { border-color: var(--accent); color: var(--text-primary); }
.pagination button:disabled { background: var(--gradient-1); border-color: transparent; color: white; cursor: default; box-shadow: 0 8px 24px var(--accent-glow); }


.modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; visibility: hidden; pointer-events: none; transition: all var(--transition); -webkit-overflow-scrolling: touch; }
.modal.active { opacity: 1; visibility: visible; pointer-events: auto; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); touch-action: none; }
.modal__content { position: relative; width: 100%; max-width: 480px; max-height: 85vh; overflow-y: auto; overflow-x: hidden; background: linear-gradient(180deg, rgba(31, 31, 37, 0.92) 0%, rgba(19, 19, 24, 0.96) 100%); border: 1px solid var(--border); border-radius: 32px; backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px); transform: scale(0.95) translateY(20px); transition: transform var(--transition); scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04); }
[data-theme="light"] .modal__content { background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.98) 100%); }
.modal__content::before { content: ''; position: absolute; top: -120px; right: -120px; width: 320px; height: 320px; background: radial-gradient(circle, rgba(139, 92, 246, 0.18) 0%, transparent 70%); pointer-events: none; z-index: 0; }
.modal__content > * { position: relative; z-index: 1; }
.modal__content::-webkit-scrollbar { display: none; }
.modal.active .modal__content { transform: scale(1) translateY(0); }
.modal__header { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem; border-bottom: 1px solid var(--border); }
.modal__title { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; }
.modal__close { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border); transition: all var(--transition); }
.modal__close:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--border-hover); transform: rotate(90deg); }
[data-theme="light"] .modal__close:hover { background: rgba(15, 23, 42, 0.04); }
.modal__close svg { fill: var(--text-secondary); }
.modal__body { padding: 1.5rem; }

.settings-section { margin-bottom: 1.75rem; }
.settings-section__title { font-size: 1rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 1rem; color: var(--text-primary); display: flex; align-items: center; gap: 0.5rem; }
.settings-chips { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.chip { cursor: pointer; }
.chip input { display: none; }
.chip span { display: block; padding: 0.75rem 1.5rem; background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 14px; font-size: 0.875rem; font-weight: 700; color: var(--text-secondary); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: all var(--transition); }
[data-theme="light"] .chip span { border-color: rgba(15, 23, 42, 0.06); }
.chip:hover span { border-color: var(--border-hover); color: var(--text-primary); transform: translateY(-1px); }
.chip input:checked + span { background: var(--gradient-1); border-color: transparent; color: white; box-shadow: 0 8px 24px var(--accent-glow); }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.category-chip { cursor: pointer; position: relative; overflow: hidden; }
.category-chip input { display: none; }
.category-chip span { display: block; text-align: center; }
.category-chip > span:first-of-type { display: none; }
.category-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; padding: 1.125rem 0.5rem; background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 18px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: all var(--transition); aspect-ratio: 1 / 1; }
[data-theme="light"] .category-chip { border-color: rgba(15, 23, 42, 0.06); }
.category-chip span:first-of-type { display: block; font-size: 1.875rem; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25)); transition: transform var(--transition); }
.category-chip span:last-of-type { font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary); transition: color var(--transition); }
.category-chip:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.category-chip:hover span:first-of-type { transform: scale(1.1); }
.category-chip:has(input:checked) { background: var(--gradient-1); border-color: transparent; box-shadow: 0 12px 32px var(--accent-glow); }
.category-chip:has(input:checked) span:last-of-type { color: white; font-weight: 700; }
@media (max-width: 480px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }

.modal__content--app { max-width: 560px; border-radius: 32px; }
.app-detail { display: flex; flex-direction: column; gap: 1.75rem; }
.app-detail__header { position: relative; display: flex; gap: 1.25rem; align-items: center; padding-bottom: 0.5rem; }
.app-detail__header::before { content: ''; position: absolute; top: -20px; left: -20px; width: 200px; height: 200px; background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%); pointer-events: none; z-index: -1; opacity: 0.6; }
.app-detail__icon { width: 92px; height: 92px; border-radius: 22px; object-fit: cover; flex-shrink: 0; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.app-detail__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.625rem; }
.app-detail__name { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.app-detail__category { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.875rem; background: var(--gradient-1); color: white; font-size: 0.75rem; font-weight: 700; border-radius: 9999px; box-shadow: 0 6px 18px var(--accent-glow); width: fit-content; }
.app-detail__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.app-detail__meta-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1.25rem 0.75rem; background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 20px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); text-align: center; transition: all var(--transition); }
[data-theme="light"] .app-detail__meta-item { border-color: rgba(15, 23, 42, 0.06); }
.app-detail__meta-item:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.app-detail__meta-icon { font-size: 1.625rem; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25)); }
.app-detail__meta-value { font-size: 1rem; font-weight: 800; letter-spacing: -0.01em; color: var(--text-primary); }
.app-detail__meta-label { font-size: 0.625rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; }
.app-detail__section { position: relative; display: flex; flex-direction: column; gap: 0.875rem; padding: 1.25rem; background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 22px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
[data-theme="light"] .app-detail__section { border-color: rgba(15, 23, 42, 0.06); }
.app-detail__section-title { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.6875rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.15em; }
.app-detail__section-title::before { content: ''; width: 14px; height: 2px; background: var(--gradient-1); border-radius: 2px; }
.app-detail__description { font-size: 0.9375rem; line-height: 1.7; color: var(--text-secondary); white-space: pre-line; }
.app-detail__updated { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.625rem 1rem; background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 9999px; font-size: 0.8125rem; color: var(--text-muted); width: fit-content; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
[data-theme="light"] .app-detail__updated { border-color: rgba(15, 23, 42, 0.06); }
.app-detail__updated svg { fill: var(--accent); }
@media (max-width: 480px) {
    .app-detail__icon { width: 64px; height: 64px; }
    .app-detail__name { font-size: 1.125rem; }
    .app-detail__meta { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
    .app-detail__meta-item { padding: 0.75rem 0.5rem; }
    .app-detail__meta-icon { font-size: 1.25rem; }
    .app-detail__meta-value { font-size: 0.75rem; }
    .app-detail__meta-label { font-size: 0.625rem; }
}

.footer { padding: 2rem 0; padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0)); border-top: 1px solid var(--border); position: relative; z-index: 1; }
.footer__container { max-width: 1400px; margin: 0 auto; padding: 0 clamp(1rem, 5vw, 3rem); text-align: center; }
.footer__copy { font-size: 0.875rem; color: var(--text-muted); }

.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

.btn--telegram { background: #229ED9; color: white; margin-top: 0.625rem; box-shadow: 0 12px 32px rgba(34, 158, 217, 0.35); }
.btn--telegram:hover { background: #1f8fc4; transform: translateY(-2px); box-shadow: 0 16px 40px rgba(34, 158, 217, 0.45); }
.btn--telegram svg { fill: currentColor; }

.toast { position: fixed; left: 50%; bottom: calc(2rem + env(safe-area-inset-bottom, 0)); transform: translateX(-50%) translateY(calc(100% + 2rem)); padding: 0.875rem 1.25rem; background: linear-gradient(90deg, #8b5cf6, #3b82f6); color: white; font-weight: 600; font-size: 0.9375rem; border-radius: 9999px; box-shadow: 0 16px 48px var(--accent-glow), 0 0 0 1px rgba(255, 255, 255, 0.1); z-index: 400; opacity: 0; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease; pointer-events: none; max-width: calc(100vw - 2rem); text-align: center; }
.toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 5px; border: 2px solid var(--bg-secondary); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
::selection { background: var(--accent); color: white; }

@media (max-width: 1200px) {
    .apps-grid { grid-template-columns: repeat(2, 1fr); }
    .hero__stats { gap: 2.5rem; }
}

@media (max-width: 1024px) {
    .hero { padding: 7rem 0 4rem; }
    .hero__title { font-size: clamp(2.5rem, 7vw, 4rem); }
    .hero__subtitle { font-size: 1.1rem; }
    .apps-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
    .pricing { padding: 5rem 0; }
    .apps { padding: 3rem 0 5rem; }
}

@media (max-width: 900px) {
    .apps-grid { grid-template-columns: repeat(2, 1fr); }
    .app-item { padding: 1.25rem; }
    .app-header img { width: 56px; height: 56px; }
}

@media (max-width: 768px) {
    .hero { padding: 6rem 0 3rem; min-height: auto; }
    .hero__title { font-size: clamp(2rem, 9vw, 3rem); }
    .hero__subtitle { font-size: 1rem; margin-bottom: 2rem; }
    .hero__badge { font-size: 0.8125rem; padding: 0.4rem 0.875rem; margin-bottom: 1.5rem; }
    .hero__actions { flex-direction: column; align-items: center; gap: 0.75rem; margin-bottom: 3rem; }
    .hero__actions .btn { width: 100%; max-width: 280px; }
    .hero__stats { gap: 1.5rem; }
    .hero__stat-value { font-size: 1.75rem; }
    .hero__stat-label { font-size: 0.75rem; }
    .pricing { padding: 4rem 0; }
    .pricing__card { padding: 1.5rem; }
    .pricing__title { font-size: 1.5rem; }
    .pricing__desc { font-size: 0.9rem; }
    .pricing__grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .pricing__item { padding: 1rem; }
    .pricing__duration { font-size: 0.75rem; }
    .pricing__price { font-size: 1.25rem; }
    .pricing__badge { font-size: 0.5625rem; padding: 0.15rem 0.45rem; top: 0.625rem; right: 0.625rem; }
    .apps { padding: 3rem 0 4rem; }
    .apps__header { margin-bottom: 2rem; }
    .apps__title { font-size: 1.5rem; }
    .apps__subtitle { font-size: 0.9rem; }
    .apps-grid { grid-template-columns: 1fr; gap: 1rem; padding: 0 0.25rem; }
    .app-item { padding: 1.25rem; }
    .search-bar { gap: 0.625rem; }
    .search__input { padding: 0.875rem 3rem; font-size: 1rem; }
    .settings-btn { width: 48px; height: 48px; }
    .settings-btn svg { width: 20px; height: 20px; }
    .pagination button { min-width: 40px; height: 40px; font-size: 0.875rem; }
    .modal__content { margin: 0.5rem; border-radius: var(--radius-lg); }
    .modal__header { padding: 1.25rem; }
    .modal__body { padding: 1.25rem; }
    .category-grid { grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
    .category-chip { padding: 0.75rem 0.25rem; gap: 0.375rem; }
    .category-chip span:first-of-type { font-size: 1.25rem; }
    .category-chip span:last-of-type { font-size: 0.6875rem; }
    .footer { padding: 1.5rem 0; }
    .footer__copy { font-size: 0.8125rem; }
}

@media (max-width: 600px) {
    .hero__container { padding: 0 1rem; }
    .hero__stats { gap: 1.25rem; }
    .hero__stat-value { font-size: 1.5rem; }
    .pricing__container { padding: 0 1rem; }
    .apps__container { padding: 0 1rem; }
    .app-header img { width: 52px; height: 52px; }
    .app-header__info h3 { font-size: 0.9375rem; }
    .app-header__info p { font-size: 0.8125rem; }
    .app-description { font-size: 0.8125rem; }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
    .header { padding: 0.75rem 0; }
    .header__container { padding: 0 1rem; }
    .header__logo-text { display: none; }
    .header__actions { gap: 0.5rem; }
    .theme-toggle { width: 40px; height: 40px; }
    .header__avatar { width: 40px; height: 40px; }
    .hero { padding: 5.5rem 0 2.5rem; }
    .hero__badge { font-size: 0.75rem; padding: 0.375rem 0.75rem; }
    .hero__title { font-size: 1.875rem; margin-bottom: 1rem; }
    .hero__subtitle { font-size: 0.9375rem; margin-bottom: 1.5rem; }
    .hero__actions { margin-bottom: 2.5rem; gap: 0.625rem; }
    .hero__actions .btn { padding: 0.875rem 1.5rem; font-size: 0.9375rem; max-width: 100%; }
    .hero__stats { gap: 1rem; }
    .hero__stat-value { font-size: 1.375rem; }
    .hero__stat-label { font-size: 0.6875rem; }
    .pricing { padding: 3rem 0; }
    .pricing__card { padding: 1.25rem; border-radius: var(--radius-lg); }
    .pricing__header { margin-bottom: 1.5rem; }
    .pricing__title { font-size: 1.375rem; }
    .pricing__desc { font-size: 0.8125rem; }
    .pricing__grid { gap: 0.625rem; margin-bottom: 1.5rem; }
    .pricing__item { padding: 0.875rem 0.5rem; border-radius: var(--radius-md); }
    .pricing__duration { font-size: 0.6875rem; }
    .pricing__price { font-size: 1.125rem; }
    .pricing__badge { font-size: 0.5rem; padding: 0.125rem 0.4rem; top: 0.5rem; right: 0.5rem; }
    .btn--full { padding: 0.875rem; font-size: 0.875rem; }
    .apps { padding: 2.5rem 0 3rem; }
    .apps__header { margin-bottom: 1.5rem; }
    .apps__title { font-size: 1.375rem; }
    .apps__subtitle { font-size: 0.8125rem; }
    .search-bar { margin-bottom: 1.5rem; gap: 0.5rem; }
    .search__input { padding: 0.75rem 2.75rem; font-size: 1rem; }
    .search__icon { left: 1rem; width: 18px; height: 18px; }
    .settings-btn { width: 44px; height: 44px; }
    .settings-btn svg { width: 18px; height: 18px; }
    .apps-grid { gap: 0.875rem; padding: 0 0.25rem; }
    .app-item { padding: 1rem; border-radius: var(--radius-md); }
    .app-header { gap: 0.75rem; margin-bottom: 0.75rem; }
    .app-header img { width: 48px; height: 48px; border-radius: var(--radius-sm); }
    .app-header__info h3 { font-size: 0.875rem; }
    .app-header__info p { font-size: 0.75rem; }
    .app-item hr { margin: 0.75rem 0; }
    .app-description { font-size: 0.75rem; -webkit-line-clamp: 2; line-clamp: 2; }
    .pagination { gap: 0.375rem; }
    .pagination button { min-width: 36px; height: 36px; font-size: 0.8125rem; border-radius: var(--radius-sm); }
    .modal__header { padding: 1rem; }
    .modal__title { font-size: 1.125rem; }
    .modal__close { width: 36px; height: 36px; }
    .modal__body { padding: 1rem; }
    .settings-section { margin-bottom: 1.25rem; }
    .settings-section__title { font-size: 0.875rem; margin-bottom: 0.75rem; }
    .chip span { padding: 0.5rem 1rem; font-size: 0.8125rem; }
    .category-grid { gap: 0.5rem; }
    .category-chip { padding: 0.625rem 0.25rem; gap: 0.25rem; border-radius: var(--radius-sm); }
    .category-chip span:first-of-type { font-size: 1.125rem; }
    .category-chip span:last-of-type { font-size: 0.625rem; }
    .btn--reset { padding: 0.875rem; margin-top: 1.25rem; font-size: 0.875rem; }
    .mobile-menu { padding: 1.25rem; }
    .mobile-menu__header { padding-bottom: 1.25rem; gap: 0.75rem; }
    .mobile-menu__avatar { width: 48px; height: 48px; }
    .mobile-menu__name { font-size: 1rem; }
    .mobile-menu__status { font-size: 0.8125rem; }
    .mobile-menu__close { width: 40px; height: 40px; }
    .mobile-menu__nav { padding: 1.25rem 0; gap: 0.375rem; }
    .mobile-menu__link { padding: 0.875rem 1rem; font-size: 0.9375rem; }
    .mobile-menu__theme { padding: 0.875rem 1rem; font-size: 0.9375rem; }
}

@media (max-width: 380px) {
    .hero__title { font-size: 1.625rem; }
    .hero__subtitle { font-size: 0.875rem; }
    .hero__stats { flex-direction: row; justify-content: space-around; width: 100%; }
    .hero__stat { flex: 1; min-width: 0; }
    .hero__stat-value { font-size: 1.25rem; }
    .hero__stat-label { font-size: 0.625rem; }
    .pricing__card { padding: 1rem; }
    .pricing__grid { gap: 0.5rem; }
    .pricing__item { padding: 0.75rem 0.375rem; }
    .pricing__duration { font-size: 0.625rem; }
    .pricing__price { font-size: 1rem; }
    .pricing__badge { font-size: 0.5rem; }
    .apps__title { font-size: 1.25rem; }
    .app-header img { width: 44px; height: 44px; }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 320px) {
    .hero__container { padding: 0 0.75rem; }
    .hero__title { font-size: 1.5rem; }
    .hero__badge { font-size: 0.6875rem; }
    .hero__stat-value { font-size: 1.125rem; }
    .pricing__container { padding: 0 0.75rem; }
    .pricing__title { font-size: 1.25rem; }
    .pricing__price { font-size: 0.9375rem; }
    .apps__container { padding: 0 0.75rem; }
    .apps__title { font-size: 1.125rem; }
    .search__input { padding: 0.625rem 2.5rem; font-size: 1rem; }
    .app-item { padding: 0.875rem; }
    .app-header img { width: 40px; height: 40px; }
    .app-header__info h3 { font-size: 0.8125rem; }
    .category-chip span:first-of-type { font-size: 1rem; }
    .category-chip span:last-of-type { font-size: 0.5625rem; }
}
