:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --radius: 8px;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    line-height: 1.5;
}

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

/* Header */
.main-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    margin-bottom: 30px;
}

.main-header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.main-header p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 0.9rem;
}

/* Search Section */
.search-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

input, select, button {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
}

input[type="text"] {
    flex-grow: 1;
}

button {
    cursor: pointer;
    transition: background-color 0.2s;
}

/* Layout */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

/* Gallery */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.gallery-item {
    background: var(--white);
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.gallery-item.selected {
    border-color: var(--primary-color);
    background-color: #eff6ff;
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 10px;
}

/* Sidebar */
.config-sidebar .sticky-panel {
    position: sticky;
    top: 20px;
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.config-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    width: 100%;
    font-weight: 600;
    margin-top: 20px;
}

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

.primary-btn:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
}

.text-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 0.8rem;
    padding: 0;
    text-decoration: underline;
}

.hidden {
    display: none;
}
