:root {
    --primary-color: #ff9900;
    --primary-hover: #e88a04;
    --secondary-color: #232f3e;
    --accent-color: #37475a;
    --background-color: #f4f6f8;
    --white: #ffffff;
    --gray-light: #e1e4e8;
    --gray-medium: #b0b8c1;
    --gray-dark: #5a5f63;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --radius: 10px;
    --font-main: 'Roboto', sans-serif;

    body.dark-mode {
        --background-color: #121212;
        --gray-dark: #f0f0f0;
        --white: #1e1e1e;
        --accent-color: #2c3e50;
        --gray-medium: #ccc;
        --gray-light: #333;
        --shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
    }

    body.dark-mode .product-row:hover {
        background-color: #4b4b4b;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
        transform: scale(1.01);
    }

    body.dark-mode .results-container {
        background-color: var(--white);
    }

    body.dark-mode .search-form {
        background-color: var(--white);
    }

    body.dark-mode .search-input {
        background-color: #1e1e1e;
        color: var(--gray-dark);
    }

    body.dark-mode .search-button {
        background-color: var(--primary-color);
    }

    body.dark-mode .product-title {
        color: var(--gray-dark);
    }
}

body {
    font-family: var(--font-main);
    margin: 0;
    background: var(--background-color);
    color: var(--gray-dark);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(145deg, var(--secondary-color), var(--accent-color));
    padding: 30px 0;
    color: var(--white);
    text-align: center;
    box-shadow: var(--shadow);
}

h1 {
    font-size: 32px;
    margin: 0;
}

.search-container {
    margin: 30px 0;
    text-align: center;
}

.search-form {
    display: flex;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}

.search-input {
    flex: 1 1 70%;
    padding: 14px 16px;
    border: none;
    font-size: 16px;
    outline: none;
    background: #fdfdfd;
    min-width: 200px;
}

.search-button {
    flex: 1 1 30%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 14px 16px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    min-width: 100px;
}

.search-button:hover {
    background-color: var(--primary-hover);
}

.error {
    color: #c62828;
    background: #ffebee;
    padding: 15px;
    border-left: 5px solid #c62828;
    margin: 20px auto;
    max-width: 600px;
    border-radius: var(--radius);
}

.results-count {
    text-align: center;
    font-size: 16px;
    color: var(--gray-dark);
    margin-bottom: 20px;
}

.results-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.product-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.product-table th {
    background: var(--accent-color);
    color: #fff;
    padding: 15px;
    text-align: left;
    font-weight: 500;
}

.product-row {
    border-bottom: 1px solid var(--gray-light);
    transition: background 0.2s ease-in-out, transform 0.2s ease;
}

.product-row:hover {
    background-color: #f0f4f8;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1;
    position: relative;
}

.product-row td {
    padding: 20px 15px;
    vertical-align: top;
    border-radius: 8px;
    overflow: hidden;
}

.product-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--accent-color);
}

.product-brand {
    font-size: 14px;
    color: var(--gray-medium);
    margin-bottom: 5px;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: #b12704;
}

.product-link {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-block;
    margin-top: 8px;
}

.product-link:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

.product-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    border: 1px solid var(--gray-light);
    padding: 4px;
    max-width: 100%;
}

@media (max-width: 768px) {
    h1 {
        font-size: 24px;
    }

    .search-form {
        flex-direction: column;
        box-shadow: none;
        border-radius: 0;
    }

    .search-input,
    .search-button {
        width: 100%;
        border-radius: 0;
    }

    .search-input {
        border-top-left-radius: var(--radius);
        border-top-right-radius: var(--radius);
    }

    .search-button {
        border-bottom-left-radius: var(--radius);
        border-bottom-right-radius: var(--radius);
    }

    .results-container {
        border-radius: 0;
        margin-left: -20px;
        margin-right: -20px;
        width: calc(100% + 40px);
    }

    .product-table {
        min-width: 100%;
    }

    .product-table th,
    .product-table td {
        padding: 10px 8px;
        font-size: 14px;
    }

    .product-table td:nth-child(4) {
        width: 90px;
        min-width: 90px;
    }

    .product-image {
        width: 70px;
        height: 70px;
    }

    .product-title {
        font-size: 14px;
    }

    .product-brand,
    .product-link {
        font-size: 12px;
    }

    .product-price {
        font-size: 16px;
    }

    .results-count {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .pagination a,
    .pagination span {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .product-table td:nth-child(4) {
        width: 60px;
        min-width: 60px;
    }

    .product-image {
        width: 50px;
        height: 50px;
    }

    .product-table th,
    .product-table td {
        padding: 8px 5px;
    }

    .product-title {
        font-size: 13px;
    }

    .product-brand,
    .product-link {
        font-size: 11px;
    }

    .product-price {
        font-size: 14px;
    }
}


#theme-toggle {
    margin-left: auto;
    margin-right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

#theme-toggle:hover {
    color: var(--primary-color);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    position: relative;
}

.site-title {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 24px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
}