:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eff6ff;
    --primary-soft-strong: #dbeafe;
    --text-main: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --border: #dfe3ea;
    --border-strong: #cfd7e3;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --shadow: rgba(15, 23, 42, 0.08);
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

html {
    font-size: 14px;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family: var(--font-family);
    color: var(--text-main);
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 58%, #f8fafc 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    width: 100%;
    height: 58px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.86);
    backdrop-filter: blur(12px);
}

.header-content {
    width: 100%;
    max-width: 1180px;
    height: 100%;
    margin: 0 auto;
    padding: 0 42px;
    display: flex;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo-text {
    color: var(--primary);
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.08em;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-left: auto;
}

.nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 58px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    transition: color 0.18s ease;
}

.nav-item::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    transform: translateX(-50%);
    border-radius: 2px;
    background: var(--primary);
    transition: width 0.18s ease;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary);
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 30px;
}

.main-section {
    min-height: 100vh;
    padding: 138px 20px 150px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.search-wrapper {
    width: 100%;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-container {
    width: 100%;
    margin: 0 0 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.main-logo {
    color: var(--primary);
    font-size: clamp(58px, 10vw, 86px);
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0.1em;
    text-indent: 0.1em;
    text-shadow: 0 10px 30px rgba(37, 99, 235, 0.12);
}

.tagline {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: 0.03em;
}

.search-box-container {
    width: 680px;
    max-width: calc(100vw - 40px);
    margin: 0 auto;
}

.search-box {
    width: 100%;
    height: 54px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 4px 5px 4px 20px;
    box-shadow: 0 8px 28px var(--shadow);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.14), 0 0 0 3px rgba(37, 99, 235, 0.09);
}

.search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 21px;
    height: 21px;
    margin-right: 13px;
    color: var(--text-light);
}

.search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-main);
    font-size: 16px;
    line-height: 1;
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-button {
    flex: 0 0 auto;
    width: 96px;
    height: 44px;
    border: 0;
    border-radius: 24px;
    background: var(--primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.22);
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.search-button:hover,
.search-button:focus-visible {
    background: var(--primary-dark);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.26);
}

.search-button:active {
    transform: translateY(1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.22);
}

.category-buttons {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.category-btn {
    min-width: 86px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 18px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.035);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.category-btn:hover,
.category-btn.active {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
    box-shadow: 0 5px 14px rgba(37, 99, 235, 0.1);
}

.category-btn:active {
    transform: translateY(1px);
}

.engine-name {
    line-height: 1;
    white-space: nowrap;
}

.engine-tip {
    margin-top: 16px;
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 26px;
    z-index: 2;
    width: 100%;
    background: transparent;
    pointer-events: none;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    pointer-events: auto;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    transition: color 0.18s ease;
}

.footer-link:hover {
    color: var(--primary);
}

.link-separator {
    color: #cbd5e1;
    font-size: 11px;
    line-height: 1;
}

.copyright p {
    color: var(--text-light);
    font-size: 11px;
    line-height: 1;
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 24px;
    }

    .header-logo-text {
        font-size: 20px;
    }

    .header-center {
        gap: 24px;
    }

    .main-section {
        padding-top: 118px;
        padding-bottom: 170px;
    }

    .logo-container {
        margin-bottom: 28px;
    }

    .search-box-container {
        width: calc(100vw - 32px);
    }

    .category-buttons {
        max-width: 460px;
        margin-top: 24px;
        gap: 10px;
    }

    .footer {
        bottom: 20px;
    }

    .footer-links {
        flex-wrap: wrap;
        max-width: 330px;
        gap: 10px;
    }

    .link-separator {
        display: none;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 18px;
    }

    .header-logo-text {
        font-size: 19px;
    }

    .nav-item {
        font-size: 13px;
    }

    .header-center {
        gap: 18px;
    }

    .main-section {
        padding-top: 108px;
    }

    .tagline {
        font-size: 13px;
    }

    .search-box {
        height: 50px;
        padding-left: 15px;
    }

    .search-input {
        font-size: 15px;
    }

    .search-button {
        width: 78px;
        height: 40px;
    }

    .category-btn {
        min-width: 76px;
        height: 34px;
        padding: 0 14px;
        font-size: 12px;
    }
}
