:root {
    --bg-primary: #f7f8fb;
    --bg-secondary: #ffffff;
    --text-primary: #172036;
    --text-secondary: #536078;
    --text-tertiary: #748097;
    --border-color: #e3e7ef;
    --card-border: #e3e7ef;
    --card-hover-border: #b4b0ef;
    --nav-bg: rgba(255, 255, 255, 0.93);
    --gradient-card: #ffffff;
    --gradient-card-hover: #ffffff;
    --shadow-premium: 0 20px 45px rgba(23, 32, 54, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #0c1220;
    --bg-secondary: #151e30;
    --text-primary: #f3f5fb;
    --text-secondary: #c0c9d8;
    --text-tertiary: #98a4b8;
    --border-color: #2b3549;
    --card-border: #2b3549;
    --card-hover-border: #7770d6;
    --nav-bg: rgba(21, 30, 48, 0.93);
    --gradient-card: #151e30;
    --gradient-card-hover: #1a2539;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.navbar {
    box-shadow: 0 1px 10px rgba(23, 32, 54, 0.04);
}

.nav-link:hover,
.nav-link.active {
    color: #5148d8;
    background: #eeedff;
    text-decoration: none;
}

.share-toggle {
    color: #5148d8;
    background: #eeedff;
    border: 1px solid #d8d5ff;
    box-shadow: none;
}

.share-toggle:hover {
    color: #ffffff;
    background: #5148d8;
    border-color: #5148d8;
    box-shadow: none;
}

.nav-cta {
    color: #ffffff;
    background: #5148d8;
    border: 1px solid #5148d8;
    box-shadow: none;
}

.nav-cta:hover {
    background: #4036bd;
    box-shadow: 0 8px 22px rgba(81, 72, 216, 0.2);
}

.nav-cta::before {
    display: none;
}

.header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
    align-items: center;
    gap: clamp(30px, 5vw, 80px);
    min-height: 500px;
    margin: 20px 0 46px;
    padding: clamp(36px, 5vw, 70px);
    text-align: left;
    background: radial-gradient(circle at 88% 8%, rgba(81, 72, 216, 0.13), transparent 30rem), #eff0fc;
    border: 1px solid #e6e5f7;
    border-radius: 28px;
    overflow: hidden;
}

.hero-copy {
    max-width: 610px;
}

.hero-kicker {
    display: inline-block;
    margin-bottom: 18px;
    color: #5148d8;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.header h1 {
    max-width: 630px;
    margin: 0 0 20px;
    color: #172036;
    background: none;
    -webkit-text-fill-color: currentColor;
    font-size: clamp(2.8rem, 5vw, 5.1rem);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 1.03;
}

.header .subtitle {
    max-width: 540px;
    margin: 0;
    color: #536078;
    font-size: clamp(1rem, 1.6vw, 1.22rem);
    font-weight: 450;
    line-height: 1.55;
}

.header-features {
    justify-content: flex-start;
    gap: 8px;
    max-width: none;
    margin: 26px 0 30px;
}

.header-features .footer-feature {
    display: inline-flex;
    align-items: center;
    min-height: 31px;
    padding: 6px 10px;
    color: #454e66;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #dfe1f3;
    border-radius: 8px;
    box-shadow: none;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 13px 18px;
    color: #ffffff;
    background: #5148d8;
    border: 1px solid #5148d8;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 750;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(81, 72, 216, 0.18);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.hero-cta:hover {
    color: #ffffff;
    background: #4036bd;
    transform: translateY(-2px);
}

.hero-cta span {
    font-size: 1.1rem;
    line-height: 1;
}

.hero-preview {
    min-width: 0;
    padding: 11px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(205, 206, 232, 0.9);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(47, 44, 117, 0.12);
    transform: rotate(2deg);
}

.hero-preview-top {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 34px;
    padding: 0 6px 9px;
    color: #677187;
    font-size: 0.66rem;
    font-weight: 700;
}

.preview-dots {
    display: inline-flex;
    gap: 4px;
}

.preview-dots i {
    width: 7px;
    height: 7px;
    background: #ccd2e2;
    border-radius: 50%;
}

.preview-dots i:first-child {
    background: #e86542;
}

.preview-ready {
    margin-left: auto;
    color: #138360;
}

.hero-preview-card {
    display: flex;
    flex-direction: column;
    padding: clamp(22px, 3vw, 35px);
    background: #ffffff;
    border: 1px solid #e5e8f0;
    border-radius: 14px;
}

.hero-preview-kicker {
    color: #5148d8;
    font-size: 0.57rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.hero-preview-card strong {
    margin: 8px 0 3px;
    color: #172036;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    letter-spacing: -0.035em;
}

.hero-preview-subtitle {
    color: #7c879c;
    font-size: 0.7rem;
}

.hero-preview svg {
    width: 100%;
    height: auto;
    margin-top: 20px;
}

.hero-preview-axis {
    display: flex;
    justify-content: space-around;
    color: #8993a6;
    font-size: 0.53rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.category-filter-section {
    margin: 0 auto 24px;
}

.explore-title {
    color: var(--text-primary);
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    font-weight: 780;
    letter-spacing: -0.035em;
}

.search-input {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(23, 32, 54, 0.035);
}

.category-buttons {
    gap: 8px;
}

.category-btn {
    padding: 9px 16px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    font-size: 0.8rem;
    box-shadow: none;
}

.category-btn:hover {
    color: #5148d8;
    background: #eeedff;
    border-color: #d8d5ff;
    box-shadow: none;
    transform: none;
}

.category-btn.active {
    background: #5148d8;
    border-color: #5148d8;
    box-shadow: none;
}

.tools-section.all-tools {
    padding-top: 22px;
}

.tools-section::before,
.tools-section::after {
    display: none;
}

.tools-grid {
    gap: 16px;
}

.tool-card {
    padding: 14px;
    background: var(--gradient-card);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(23, 32, 54, 0.025);
}

.tool-card::before {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .tool-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-premium);
    }
}

.tool-icon {
    height: 112px;
    margin-bottom: 16px;
    background: #f5f6fa;
    border: 1px solid #edf0f6;
    border-radius: 10px;
}

.tool-icon img {
    max-height: 104px;
}

h3.tool-title {
    margin-bottom: 7px;
    color: var(--text-primary);
    font-size: 1.03rem;
    font-weight: 760;
    letter-spacing: -0.02em;
}

.tool-description {
    color: var(--text-secondary);
    font-size: 0.79rem;
    line-height: 1.5;
    opacity: 1;
}

.tool-badge {
    top: 22px;
    right: 22px;
    padding: 5px 7px;
    border-radius: 5px;
    font-size: 0.56rem;
}

.tool-badge.popular,
.tool-badge.trending,
.tool-badge.new {
    box-shadow: none;
}

[data-theme="dark"] .header {
    background: radial-gradient(circle at 88% 8%, rgba(155, 148, 255, 0.17), transparent 30rem), #171d34;
    border-color: #323857;
}

[data-theme="dark"] .header h1 {
    color: #f3f5fb;
}

[data-theme="dark"] .header .subtitle,
[data-theme="dark"] .header-features .footer-feature {
    color: #c0c9d8;
}

[data-theme="dark"] .header-features .footer-feature {
    background: #252d47;
    border-color: #3a4461;
}

[data-theme="dark"] .category-btn.active {
    color: #ffffff;
    background: #5148d8;
    border-color: #5148d8;
}

[data-theme="dark"] .hero-kicker {
    color: #b5b0ff;
}

[data-theme="dark"] .tool-icon {
    border-color: #3a4560;
}

@media (max-width: 950px) {
    .header {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        padding: 42px;
    }

    .hero-preview {
        max-width: 620px;
        transform: none;
    }
}

@media (max-width: 600px) {
    .header {
        margin: 12px 0 30px;
        padding: 30px 22px;
        border-radius: 18px;
    }

    .header h1 {
        font-size: clamp(2.45rem, 12vw, 3.6rem);
    }

    .hero-preview {
        display: none;
    }

    .filter-header {
        align-items: stretch;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }

    .tool-card {
        min-height: 0;
    }

    .category-filter-section {
        padding: 0 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-cta,
    .tool-card {
        animation: none;
        transition: none;
    }
}
