/* ======== SHARED PANEL STYLES ======== */
.hero,
.card,
.tool-panel,
.blog-article,
.feature-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.card,
.tool-panel,
.blog-article,
.feature-panel {
    padding: 28px 32px;
}

.tool-panel {
    margin-bottom: 16px;
}

/* ======== MINI CARD ======== */
.mini-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.mini-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(16, 185, 129, 0.04) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.mini-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.1),
        0 0 0 1px rgba(59, 130, 246, 0.1);
}

.mini-card:hover::after {
    opacity: 1;
}

.mini-card.disabled {
    opacity: 0.35;
    pointer-events: none;
}

.mini-card-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.35s ease;
}

.mini-card:hover .mini-card-icon {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.25);
    transform: scale(1.08);
}

.mini-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.mini-card-body h3 {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--text);
}

.mini-card-body p {
    font-size: 0.82rem;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    margin: 0;
    line-height: 1.5;
}

.mini-card-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 6px;
    font-size: 0.72rem;
    color: var(--muted);
}

.mini-card-cat {
    padding: 3px 10px;
    border-radius: 6px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-weight: 600;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: 'JetBrains Mono', monospace;
}

/* ======== TYPE BADGES ======== */
.type-badge {
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: 'JetBrains Mono', monospace;
}

.type-badge.tool {
    background: rgba(59, 130, 246, 0.1);
    color: var(--brand-strong);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.type-badge.blog {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.type-badge.asset {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* ======== RESULT GRID (thumbnails) ======== */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.result-item {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding: 12px;
    transition: border-color 0.3s ease;
}

.result-item:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.result-item img {
    width: 100%;
    border-radius: 8px;
    display: block;
    margin-bottom: 10px;
}

/* ======== FEATURE PANEL ======== */
.feature-panel {
    margin-top: 16px;
}

.stats-row,
.share-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.stats-row span,
.chip-link,
.text-btn {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    border-radius: 8px;
    padding: 8px 14px;
    font: inherit;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.chip-link,
.text-btn {
    cursor: pointer;
}

.chip-link:hover {
    background: var(--surface-2);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--brand-strong);
}

/* ======== BLOG ARTICLE ======== */
.blog-article {
    padding: 40px;
}

.blog-article h1 {
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}

.blog-article h2 {
    margin: 28px 0 10px;
    font-size: 1.15rem;
    color: var(--text);
}

.blog-article p {
    margin: 0 0 14px;
    line-height: 1.7;
}

/* ======== BACK BUTTON ======== */
.back-btn-wrapper {
    margin-bottom: 28px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--muted);
    transition: all 0.2s ease;
    cursor: pointer;
}

.back-btn:hover {
    color: var(--brand-strong);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(-4px);
}

/* ======== ASSET HERO ======== */
.asset-hero {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.06) 0%, var(--surface) 50%, rgba(16, 185, 129, 0.04) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(36px, 6vw, 64px);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.asset-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.asset-hero-content {
    position: relative;
    z-index: 1;
}

.asset-hero-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    z-index: 2;
}

.asset-tagline {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--muted);
    max-width: 560px;
    margin: 10px auto 20px;
    line-height: 1.6;
}

.asset-rating-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.asset-stars {
    font-size: 1.1rem;
}

.asset-score {
    font-weight: 700;
    color: var(--text);
    font-size: 0.95rem;
}

/* ======== ASSET FEATURES GRID ======== */
.asset-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.asset-feature-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 24px;
    transition: all 0.3s ease;
}

.asset-feature-card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: var(--shadow-card);
}

.asset-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 14px;
}

.asset-feature-card h3 {
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.asset-feature-card p {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ======== ASSET PRICING GRID ======== */
.asset-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.asset-price-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 28px 24px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.asset-price-card:hover {
    border-color: rgba(59, 130, 246, 0.2);
}

.asset-price-card.featured {
    border-color: var(--brand);
    background: rgba(59, 130, 246, 0.04);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.08);
}

.asset-price-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    border-radius: 6px;
    background: var(--brand);
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.asset-price-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.asset-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.asset-price span {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--muted);
}

.asset-price-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.asset-price-card li {
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
}

.asset-price-card li:last-child {
    border-bottom: none;
}

.asset-price-card li::before {
    content: '✓ ';
    color: var(--accent);
    font-weight: 700;
}

/* ======== ASSET PROS & CONS ======== */
.asset-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.asset-pros,
.asset-cons {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 24px;
}

.asset-pros h3,
.asset-cons h3 {
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.asset-pros ul,
.asset-cons ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.asset-pros li,
.asset-cons li {
    padding: 6px 0;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.5;
}

/* ======== PROFILE SECTION ======== */
.profile-section {
    margin: 40px 0 20px;
}

.profile-card {
    display: flex;
    gap: 40px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.profile-avatar {
    flex-shrink: 0;
}

.profile-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
}

.profile-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.profile-info h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.profile-bio {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--muted);
    max-width: 520px;
    margin-bottom: 24px;
}

.profile-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 20px;
}

.profile-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
}

.profile-stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.1em;
}

.profile-socials {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-social-link {
    padding: 8px 16px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    transition: all 0.2s ease;
}

.profile-social-link:hover {
    color: var(--brand-strong);
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.06);
}

/* ======== YOUTUBE VIDEO EMBED ======== */
.video-embed-wrapper {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    overflow: hidden;
}

.video-input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.video-input-row input {
    flex: 1;
}

.video-input-row .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

.video-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-soft);
    border: 1px solid var(--line);
}

.video-player iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--radius-sm);
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--muted);
}

.video-placeholder-icon {
    font-size: 3rem;
    opacity: 0.3;
}

.video-placeholder p {
    font-size: 0.9rem;
}

/* ======== AUTH FORM (inside profile card) ======== */
.auth-form {
    margin-top: 8px;
    max-width: 400px;
}

.auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--surface-2);
    border-radius: 10px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.auth-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-fields input {
    width: 100%;
}

.auth-error {
    font-size: 0.8rem;
    color: #ef4444;
    min-height: 20px;
    margin: 0;
}

/* ======== FLOATING SHARE BAR ======== */
.share-bar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.share-bar-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin-bottom: 8px;
}

.share-bar-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.share-bar-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    font-family: inherit;
}

.share-bar-btn:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--brand-strong);
    transform: scale(1.1);
}

/* ======== RESPONSIVE ======== */
@media (max-width: 768px) {
    .mini-card {
        padding: 16px;
    }

    .blog-article {
        padding: 24px;
    }

    .asset-pros-cons,
    .asset-pricing-grid,
    .asset-features-grid {
        grid-template-columns: 1fr;
    }

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

    .profile-card {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
    }

    .profile-stats {
        justify-content: center;
    }

    .profile-socials {
        justify-content: center;
    }

    .profile-bio {
        max-width: 100%;
    }

    .auth-form {
        max-width: 100%;
        margin: 8px auto 0;
    }

    .video-input-row {
        flex-direction: column;
    }

    /* Share bar on mobile: bottom horizontal bar */
    .share-bar {
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        transform: none;
        flex-direction: row;
        justify-content: center;
        background: var(--bg-soft);
        border-top: 1px solid var(--line);
        padding: 10px 16px;
        gap: 8px;
    }

    .share-bar-label {
        writing-mode: horizontal-tb;
        transform: none;
        margin-bottom: 0;
        margin-right: 8px;
    }

    .share-bar-links {
        flex-direction: row;
    }

    .share-bar-btn {
        width: 36px;
        height: 36px;
    }
}

/* ======== CUSTOMIZER FAB ======== */
.customizer-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 990;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
}

.customizer-fab:hover {
    transform: scale(1.1) rotate(45deg);
    border-color: var(--brand);
    color: var(--brand);
}

.customizer-fab.open {
    transform: rotate(180deg);
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

/* ======== CUSTOMIZER PANEL ======== */
.customizer-panel {
    position: fixed;
    bottom: 84px;
    right: 24px;
    width: 320px;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 991;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.96);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.customizer-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.customizer-panel::-webkit-scrollbar {
    width: 4px;
}

.customizer-panel::-webkit-scrollbar-track {
    background: transparent;
}

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

.cust-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cust-header span {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text);
}

.cust-close {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cust-close:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.cust-section {
    margin-bottom: 20px;
}

.cust-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
    margin-bottom: 10px;
}

/* Theme Grid */
.cust-theme-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cust-theme-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cust-theme-btn:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--surface-2);
}

.cust-theme-btn.active {
    border-color: var(--brand);
    color: var(--text);
    background: rgba(59, 130, 246, 0.06);
}

.cust-swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Font & Size Options */
.cust-option-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cust-opt-btn {
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cust-opt-btn:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.cust-opt-btn.active {
    border-color: var(--brand);
    color: var(--text);
    background: rgba(59, 130, 246, 0.06);
}

/* Reset */
.cust-reset {
    width: 100%;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cust-reset:hover {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

@media (max-width: 768px) {
    .customizer-panel {
        right: 12px;
        left: 12px;
        width: auto;
        bottom: 80px;
    }

    .customizer-fab {
        bottom: 16px;
        right: 16px;
    }
}

/* ======== FAVORITE BUTTON ======== */
.fav-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--surface);
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    z-index: 5;
    opacity: 0;
    line-height: 1;
    padding: 0;
}

.mini-card:hover .fav-btn {
    opacity: 1;
}

.fav-btn.active {
    opacity: 1;
}

.fav-btn:hover {
    transform: scale(1.2);
}

/* ======== THEME TOGGLE ======== */
.theme-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    padding: 0;
}

.theme-toggle-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
}

/* ======== GLOBAL SEARCH ======== */
.global-search-wrapper {
    position: relative;
    margin-left: 8px;
}

.global-search-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.global-search-toggle:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.global-search-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    padding: 12px;
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s ease;
}

.global-search-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.global-search-panel input {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.global-search-results {
    max-height: 320px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s ease;
}

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

.search-result-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

.search-result-item strong {
    font-size: 0.8rem;
    display: block;
}

.search-result-type {
    font-size: 0.65rem;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.search-empty {
    padding: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
}

/* ======== SKELETON LOADING ======== */
.skeleton-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.skeleton-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
}

.skeleton-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
}

.shimmer {
    background: linear-gradient(90deg,
            var(--surface) 25%,
            var(--surface-2) 50%,
            var(--surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite ease-in-out;
}

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

    100% {
        background-position: -200% 0;
    }
}

@media (max-width: 768px) {
    .global-search-panel {
        right: -60px;
        width: calc(100vw - 32px);
    }

    .fav-btn {
        opacity: 1;
    }
}

/* ======== HAMBURGER MENU ======== */
.hamburger-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 8px;
    transition: background 0.2s;
    order: 10;
    margin-left: auto;
}

.hamburger-btn:hover {
    background: var(--surface);
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }

    .site-header .container nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-soft);
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        padding: 12px 20px 20px;
        gap: 4px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .site-header .container nav.mobile-open {
        display: flex;
    }

    .site-header .container nav a {
        padding: 12px 16px;
        width: 100%;
        border-radius: 8px;
    }

    .site-header .container nav a:hover {
        background: var(--surface);
    }

    .site-header .container {
        position: relative;
    }

    .global-search-wrapper,
    .theme-toggle-btn,
    .profile-icon-btn,
    .profile-dropdown {
        display: none !important;
    }

    .header-search-bar {
        display: none !important;
    }
}

/* ======== SCROLL TO TOP ======== */
.scroll-top-btn {
    position: fixed;
    bottom: 88px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 998;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 0;
}

.scroll-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-2px);
}

/* ======== HERO STATS ======== */
.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 32px;
    justify-content: center;
}

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

.hero-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-stat-label {
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: 'JetBrains Mono', monospace;
}

/* ======== TESTIMONIALS ======== */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.testimonial-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.testimonial-stars {
    font-size: 0.85rem;
    letter-spacing: 2px;
}

.testimonial-text {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text);
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.testimonial-author strong {
    display: block;
    font-size: 0.8rem;
}

.testimonial-author span {
    font-size: 0.65rem;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 768px) {
    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        gap: 20px;
    }

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

/* ======== COOKIE CONSENT ======== */
.cookie-banner {
    position: fixed;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 600px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: bottom 0.4s ease;
}

.cookie-banner.visible {
    bottom: 24px;
}

.cookie-text {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-text span {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.cookie-text p {
    font-size: 0.75rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}

.cookie-text a {
    color: var(--brand);
}

.cookie-accept {
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
    }
}

/* ======== BIGGER HEADER SEARCH BAR ======== */
.header-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
    white-space: nowrap;
}

.header-search-bar:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.header-search-bar svg {
    flex-shrink: 0;
}

.header-search-bar span {
    font-family: 'JetBrains Mono', monospace;
}

/* ======== TYPE BADGE ======== */
.type-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.55rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ======== NEWSLETTER POPUP ======== */
.newsletter-popup {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 360px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
    z-index: 9998;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s ease;
    pointer-events: none;
    overflow: hidden;
}

.newsletter-popup::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
}

.newsletter-popup.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nl-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.nl-close:hover {
    background: var(--surface);
    color: var(--text);
}

.nl-content {
    padding: 24px 20px 20px;
}

.nl-content h3 {
    font-size: 1rem;
    margin: 0 0 6px;
}

.nl-content>p {
    font-size: 0.75rem;
    color: var(--muted);
    margin: 0 0 16px;
    line-height: 1.5;
}

.nl-form {
    display: flex;
    gap: 8px;
}

.nl-form input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    font-size: 0.8rem;
}

.nl-form .btn {
    flex-shrink: 0;
}

.nl-note {
    font-size: 0.6rem;
    color: var(--muted);
    margin: 10px 0 0;
}

@media (max-width: 480px) {
    .newsletter-popup {
        left: 12px;
        right: 12px;
        width: auto;
        bottom: 16px;
    }

    .nl-form {
        flex-direction: column;
    }
}