:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #fbfbfe;
    --text: #0f172a;
    --muted: #667085;
    --border: #e6e8ef;
    --border-2: #eef0f6;
    --shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
    --shadow-2: 0 6px 18px rgba(16, 24, 40, 0.06);
    --brand: #2563eb;
    --brand-2: #1d4ed8;
    --brand-soft: rgba(37, 99, 235, 0.16);
    --radius: 16px;
    --radius-lg: 20px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
        "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(37, 99, 235, 0.12), transparent 60%),
        radial-gradient(900px 500px at 95% 10%, rgba(99, 102, 241, 0.10), transparent 55%),
        var(--bg);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

#root {
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px 16px 44px;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.logo-block {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 999px;
}

.logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.logo-text h1 {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.logo-text p {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.header-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.app-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.30);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.16), rgba(37, 99, 235, 0.08));
    color: #1e40af;
    font-weight: 700;
    font-size: 13px;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease,
        border-color 0.12s ease;
}

.app-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.22);
    border-color: rgba(37, 99, 235, 0.42);
}

.app-btn:active {
    transform: translateY(0);
}

.app-btn--secondary {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #ffffff, #fbfbfe);
    color: var(--text);
}

.search-container {
    margin: 18px 0 14px;
    display: flex;
    justify-content: center;
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 860px;
}

.search-input {
    width: 100%;
    height: 44px;
    padding: 0 44px 0 44px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    outline: none;
    font-size: 14px;
    box-shadow: var(--shadow-2);
    transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.08s ease;
}

.search-input::placeholder {
    color: #98a2b3;
}

.search-input:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 14px 30px rgba(16, 24, 40, 0.10), 0 0 0 4px var(--brand-soft);
    transform: translateY(-1px);
}

.search-wrapper::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    opacity: 0.65;
    background-repeat: no-repeat;
    background-size: 16px 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: #667085;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.search-clear:hover {
    transform: translateY(-50%) scale(1.02);
    box-shadow: var(--shadow-2);
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 10px;
    list-style: none;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    max-height: 320px;
    overflow-y: auto;
    z-index: 40;
}

.search-suggestion-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 10px;
    border-radius: 12px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    transition: background-color 0.12s ease;
}

.search-suggestion-item:hover {
    background: #f2f4f7;
}

.suggestion-main {
    font-weight: 600;
}

.suggestion-sub {
    color: var(--muted);
    font-size: 12px;
}

mark {
    background: rgba(37, 99, 235, 0.14);
    border-radius: 6px;
    padding: 0 3px;
}

.autosalon-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.autosalon-container.single-result {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.car-card {
    display: grid;
    grid-template-columns: 190px 1fr 240px;
    gap: 16px;
    align-items: center;
    padding: 14px 14px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-2);
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.car-card:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.22);
    box-shadow: var(--shadow);
}

.car-image-wrapper {
    height: 96px;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f7f8fc);
    border: 1px solid var(--border-2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow: hidden;
}

.car-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 12px rgba(16, 24, 40, 0.10));
}

.car-card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.car-card-content .model {
    margin: 0;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: var(--text);
}

.model-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.model-code::before {
    display: none !important;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 12.5px;
    color: var(--muted);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-2);
    background: var(--surface-2);
    white-space: nowrap;
}

.meta-item b {
    color: var(--text);
    font-weight: 700;
}

.price-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.price-usd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff, #f6f7fb);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 15px;
}

.copy-btn{
    width: auto;
    height: 24px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid var(--border-2);
    background: #f8fafc;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: none;
    transition: background-color .12s ease, color .12s ease, border-color .12s ease;
}

.copy-btn:hover{
    background: #f1f5f9;
    border-color: var(--border);
    color: var(--text);
}

.copy-btn:active {
    transform: translateY(0);
}

.empty-state {
    margin-top: 18px;
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
    background: rgba(255, 255, 255, 0.75);
    padding: 22px;
    text-align: center;
    box-shadow: var(--shadow-2);
}

.empty-state p {
    margin: 0;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -0.02em;
}

.empty-state span {
    display: inline-block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.pagination {
    margin: 18px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-2);
    width: fit-content;
}

.pagination button {
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease, border-color 0.12s ease;
}

.pagination button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-2);
    border-color: rgba(37, 99, 235, 0.22);
}

.pagination button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pagination span {
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    z-index: 60;
    font-size: 13px;
}

.toast b {
    font-weight: 800;
}

.skeleton-card {
    overflow: hidden;
}

.skeleton-image,
.skeleton-line {
    background: linear-gradient(90deg, #f1f2f6 0%, #f8f9fc 50%, #f1f2f6 100%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite linear;
}

.skeleton-image {
    height: 96px;
    border-radius: 14px;
    border: 1px solid var(--border-2);
}

.skeleton-line {
    height: 12px;
    border-radius: 8px;
}

.skeleton-line-lg {
    width: 62%;
    height: 14px;
}

.skeleton-line-sm {
    width: 44%;
}

.skeleton-line-price {
    width: 60%;
    height: 18px;
    border-radius: 999px;
}

.skeleton-line-btn {
    width: 200px;
    height: 38px;
    border-radius: 999px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (max-width: 980px) {
    #root {
        padding: 18px 14px 40px;
    }

    .car-card {
        grid-template-columns: 160px 1fr 220px;
    }

    .copy-btn {
        width: 190px;
    }

    .skeleton-line-btn {
        width: 190px;
    }
}

@media (max-width: 780px) {
    .header {
        border-radius: 18px;
        padding: 12px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .header-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .car-card {
        grid-template-columns: 1fr;
        gap: 12px;
        align-items: start;
    }

    .car-image-wrapper {
        height: 140px;
    }

    .price-panel {
        align-items: flex-start;
    }

    .copy-btn {
        width: 100%;
        max-width: 100%;
    }

    .skeleton-line-btn {
        width: 100%;
    }
}