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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

header {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

#last-updated {
    font-size: 0.875rem;
    opacity: 0.9;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

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

.monitor-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.monitor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.monitor-card.in-stock {
    border-left: 5px solid #10b981;
}

.monitor-card.out-of-stock {
    border-left: 5px solid #ef4444;
}

.monitor-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.provider-name {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.status-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1rem 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-badge.in {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.out {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.unknown {
    background: #f3f4f6;
    color: #6b7280;
}

.last-checked {
    font-size: 0.75rem;
    color: #9ca3af;
}

.subscribe-btn {
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.subscribe-btn:hover {
    background: #4338ca;
}

.subscribe-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

#loading, #error {
    text-align: center;
    padding: 3rem;
    color: white;
    font-size: 1.125rem;
}

#error {
    background: rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    color: #fee2e2;
}

footer {
    text-align: center;
    padding: 2rem;
    color: white;
    opacity: 0.8;
    font-size: 0.875rem;
}

@media (max-width: 640px) {
    header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .monitor-grid {
        grid-template-columns: 1fr;
    }
}
