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

/* Light mode (default) */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --accent-color: #0066cc;
    --accent-hover: #0052a3;
    --shadow: rgba(0, 0, 0, 0.1);
    --tag-bg: #e8f4fd;
    --tag-text: #0066cc;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --bg-card: #252525;
        --text-primary: #f0f0f0;
        --text-secondary: #a0a0a0;
        --border-color: #404040;
        --accent-color: #4d9fff;
        --accent-hover: #6bb0ff;
        --shadow: rgba(0, 0, 0, 0.3);
        --tag-bg: #1a3a52;
        --tag-text: #4d9fff;
    }
}

/* Base styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 1rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.tagline {
    color: var(--text-secondary);
    font-size: 1rem;
}

.disclaimer {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.75rem;
    font-style: italic;
}

/* Main content */
main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Filters */
.filters {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.filter-btn.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Deals Grid */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.deal-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.deal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px var(--shadow);
}

.deal-logo {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.deal-logo img {
    max-height: 50px;
    max-width: 100%;
    object-fit: contain;
}

.deal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.deal-content h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.deal-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--tag-bg);
    color: var(--tag-text);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex: 1;
    font-size: 0.95rem;
}

.deal-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.deal-link:hover {
    background-color: var(--accent-hover);
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .deals-grid {
        grid-template-columns: 1fr;
    }

    .filter-buttons,
    .option-buttons {
        flex-direction: column;
    }

    .filter-btn,
    .option-btn {
        width: 100%;
    }
}
