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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    background: #1a1a2e;
    color: #eee;
    min-height: 100vh;
}

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

header {
    text-align: center;
    padding: 30px 0;
}

header h1 {
    font-size: 2.2em;
    background: linear-gradient(135deg, #09c6f9, #045de9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #888;
    margin-top: 5px;
    font-size: 1.1em;
}

.config-section, .results-section {
    background: #16213e;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #0f3460;
}

.config-section h2, .results-section h2 {
    margin-bottom: 20px;
    color: #e0e0e0;
    font-size: 1.3em;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.85em;
    color: #aaa;
    margin-bottom: 5px;
}

.form-group input,
.form-group select {
    padding: 10px 12px;
    border: 1px solid #0f3460;
    border-radius: 8px;
    background: #1a1a2e;
    color: #eee;
    font-size: 0.95em;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #045de9;
}

.btn-primary {
    background: linear-gradient(135deg, #045de9, #09c6f9);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    margin-top: 5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(4, 93, 233, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading {
    text-align: center;
    padding: 30px;
    color: #09c6f9;
    font-size: 1.1em;
}

.error {
    background: #2d1b1b;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.hidden {
    display: none;
}

.count-badge {
    background: #045de9;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.7em;
    vertical-align: middle;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.item-card {
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.item-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: #2a2a3e;
}

.item-card .no-photo {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2a3e;
    color: #666;
    font-size: 0.9em;
}

.item-card .item-info {
    padding: 14px;
}

.item-card .item-title {
    font-size: 0.95em;
    font-weight: 500;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-card .item-price {
    font-size: 1.2em;
    font-weight: 700;
    color: #09c6f9;
    margin-bottom: 6px;
}

.item-card .item-meta {
    font-size: 0.82em;
    color: #888;
}

.item-card .item-meta span {
    display: inline-block;
    margin-right: 10px;
}

.item-card .item-link {
    display: inline-block;
    margin-top: 10px;
    color: #09c6f9;
    text-decoration: none;
    font-size: 0.85em;
}

.item-card .item-link:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    header h1 {
        font-size: 1.6em;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .results-grid {
        grid-template-columns: 1fr;
    }
}
