/* ================================================================
   stickly — homepage component styles (Soft UI Edition)
   ================================================================ */

:root {
    --stickly-bg: #F8F9FB;
    --stickly-primary: #7B61FF;
    --stickly-primary-dark: #6246EA;
    --stickly-footer: #1D212F;
    --stickly-text: #1A1D26;
    --stickly-muted: #6B7280;
    --stickly-border: #E8ECF2;
    --stickly-radius: 16px;
    --stickly-radius-lg: 20px;
    --stickly-shadow: 0 10px 30px -10px rgba(123, 97, 255, 0.12);
    --stickly-gradient: linear-gradient(135deg, #7B61FF 0%, #5B8DEF 100%);
}

body.is-front {
    background: var(--stickly-bg);
}

/* Header */
.stickly-header {
    background: #fff;
    border-bottom: 1px solid var(--stickly-border);
}
.stickly-header__inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 68px;
}
.stickly-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--stickly-text);
    text-decoration: none;
    flex-shrink: 0;
}
.stickly-logo__icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--stickly-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}
.stickly-search {
    flex: 1;
    max-width: 520px;
    margin: 0 auto;
}
.stickly-search__field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--stickly-bg);
    border: 1px solid var(--stickly-border);
    border-radius: 999px;
    padding: 0.65rem 1.25rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.stickly-search__field:focus-within {
    border-color: rgba(123, 97, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.1);
}
.stickly-search__field input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--stickly-text);
}
.stickly-search__field input::placeholder { color: #9CA3AF; }
.stickly-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}
.stickly-nav-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}
.stickly-nav-link:hover {
    color: var(--stickly-primary);
    background: rgba(123, 97, 255, 0.06);
}
.stickly-icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #6B7280;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}
.stickly-icon-btn:hover {
    background: var(--stickly-bg);
    color: var(--stickly-primary);
}
.stickly-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #3B82F6;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.stickly-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px rgba(123, 97, 255, 0.25);
}
.stickly-cats-bar {
    background: #fff;
    border-bottom: 1px solid var(--stickly-border);
    overflow-x: auto;
    scrollbar-width: none;
}
.stickly-cats-bar::-webkit-scrollbar { display: none; }
.stickly-cats-bar__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 0;
    white-space: nowrap;
}
.stickly-cat-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #4B5563;
    text-decoration: none;
    transition: color 0.15s;
}
.stickly-cat-link:hover,
.stickly-cat-link.is-active { color: var(--stickly-primary); }

/* Buttons */
.stickly-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.9375rem;
    border-radius: 999px;
    padding: 0.875rem 1.75rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, filter 0.2s ease;
}
.stickly-btn--primary {
    color: #fff;
    background: var(--stickly-gradient);
    box-shadow: 0 8px 20px -6px rgba(123, 97, 255, 0.4);
}
.stickly-btn--primary:hover {
    color: #fff;
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 10px 24px -4px rgba(123, 97, 255, 0.5);
}
.stickly-btn--outline {
    color: var(--stickly-primary);
    background: #fff;
    border: 2px solid rgba(123, 97, 255, 0.35);
}
.stickly-btn--outline:hover {
    background: rgba(123, 97, 255, 0.06);
    transform: translateY(-2px);
}
.stickly-btn--block { width: 100%; }

/* Cards */
.stickly-card {
    background: #fff;
    border-radius: var(--stickly-radius-lg);
    border: 1px solid var(--stickly-border);
}
.stickly-card--flat { box-shadow: none; }

/* Hero */
.stickly-hero {
    padding: 3.5rem 0;
    background: var(--stickly-bg);
}
.stickly-hero__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

/* ИСПРАВЛЕНИЕ: Двухколоночный макет на главной, если нет третьей колонки */
@media (min-width: 1024px) {
    .stickly-hero__grid {
        grid-template-columns: 1.2fr 1fr;
        gap: 2rem;
    }
    .stickly-hero__grid:has(.stickly-top-authors) {
        grid-template-columns: 1fr 1.1fr 280px;
    }
}

.stickly-hero__title {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--stickly-text);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.stickly-hero__text {
    font-size: 1rem;
    color: var(--stickly-muted);
    line-height: 1.65;
    max-width: 460px;
    margin-bottom: 1.5rem;
}
.stickly-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.stickly-hero__visual {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.stickly-hero__cat {
    position: relative;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: linear-gradient(145deg, #FFE8D6 0%, #FFD4A8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7.5rem;
    animation: stickly-float 4s ease-in-out infinite;
    box-shadow: 0 15px 35px -10px rgba(249, 115, 22, 0.3);
}
.stickly-hero__bubble {
    position: absolute;
    top: 12%;
    right: 8%;
    background: #fff;
    border-radius: 16px;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: #F97316;
    border: 1px solid var(--stickly-border);
    transform: rotate(8deg);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.stickly-float-icon {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    border: 1px solid var(--stickly-border);
    animation: stickly-float 3s ease-in-out infinite;
    box-shadow: 0 8px 20px -6px rgba(0,0,0,0.1);
}
.stickly-float-icon--1 { top: 8%; left: 10%; animation-delay: 0.3s; }
.stickly-float-icon--2 { bottom: 20%; left: 5%; animation-delay: 0.8s; }
.stickly-float-icon--3 { bottom: 10%; right: 10%; animation-delay: 1.2s; }

@keyframes stickly-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Top authors card */
.stickly-top-authors { padding: 1.25rem; }
.stickly-top-authors__title {
    font-size: 0.9375rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--stickly-text);
}
.stickly-top-authors__list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.stickly-top-authors__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.stickly-top-authors__rank {
    width: 22px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #9CA3AF;
    flex-shrink: 0;
}
.stickly-top-authors__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.stickly-top-authors__name {
    flex: 1;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--stickly-text);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stickly-top-authors__earn {
    font-size: 0.75rem;
    font-weight: 800;
    color: #10B981;
    flex-shrink: 0;
}
.stickly-top-authors__link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--stickly-primary);
    text-decoration: none;
}
.stickly-top-authors__link:hover { text-decoration: underline; }

/* Features */
.stickly-features {
    padding: 0 0 2.5rem;
    background: var(--stickly-bg);
}
.stickly-features__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 640px) { .stickly-features__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .stickly-features__grid { grid-template-columns: repeat(4, 1fr); } }
.stickly-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: #fff;
    border-radius: var(--stickly-radius);
    border: 1px solid var(--stickly-border);
}
.stickly-feature__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
}
.stickly-feature__icon--violet { background: #EDE9FE; }
.stickly-feature__icon--green { background: #D1FAE5; }
.stickly-feature__icon--yellow { background: #FEF3C7; }
.stickly-feature__icon--blue { background: #DBEAFE; }
.stickly-feature__title {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--stickly-text);
    margin-bottom: 0.25rem;
}
.stickly-feature__text {
    font-size: 0.8125rem;
    color: var(--stickly-muted);
    line-height: 1.5;
}

/* Categories circles */
.stickly-categories { padding: 3rem 0; background: #fff; }
.stickly-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}
.stickly-section-head h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--stickly-text);
    letter-spacing: -0.01em;
}
.stickly-section-head a {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--stickly-primary);
    text-decoration: none;
}
.stickly-categories__row {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scrollbar-width: none;
}
.stickly-categories__row::-webkit-scrollbar { display: none; }
.stickly-category-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    width: 88px;
}

/* ИСПРАВЛЕНИЕ: Выравнивание, масштабирование и тени для иконок категорий */
.stickly-category-item__circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: var(--stickly-bg);
    border: 1px solid var(--stickly-border);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}
.stickly-category-item__circle img,
.stickly-category-item__circle span {
    max-width: 65%;
    max-height: 65%;
    object-fit: contain;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stickly-category-item:hover .stickly-category-item__circle {
    transform: translateY(-4px);
    border-color: var(--stickly-primary);
    box-shadow: 0 8px 20px rgba(123, 97, 255, 0.15);
    background: #ffffff;
}
.stickly-category-item__label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--stickly-text);
    text-align: center;
    transition: color 0.2s ease;
}
.stickly-category-item:hover .stickly-category-item__label {
    color: var(--stickly-primary);
}