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

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --border-hover: #d1d5db;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    min-height: 100vh;
    padding: 24px;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 48px;
    padding-top: 32px;
}

.header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.header p {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.search-container {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 32px;
}

.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 44px 12px 16px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    transition: all 0.2s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 1rem;
    pointer-events: none;
    width: 16px;
    height: 16px;
}

.search-icon::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-radius: 50%;
    top: 0;
    left: 0;
}

.search-icon::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 6px;
    background: currentColor;
    transform: rotate(45deg);
    top: 10px;
    left: 10px;
    border-radius: 1px;
}

.loading {
    text-align: center;
    padding: 16px;
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 500;
}

.error {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 16px;
    border: 1px solid #fecaca;
    font-size: 0.875rem;
}

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

.result-card {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.result-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.result-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.5;
    letter-spacing: -0.01em;
}

.result-isbn {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 12px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-summary {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.tag {
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-weight: 500;
}

.tag.rating {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.tag.genre {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.tag.age {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

.no-results {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-secondary);
    font-size: 1rem;
}

.no-results p {
    font-weight: 500;
}

.stats {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 24px;
    font-size: 0.875rem;
    font-weight: 500;
}
