:root {
    --primary-color: #2563eb;
    --danger-color: #dc2626;
    --success-color: #16a34a;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --bg-color: #ffffff;
    --border-color: #e5e7eb;
    --code-bg: #f3f4f6;
    --dm-bg: #fef2f2;
    --public-bg: #f0fdf4;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 500;
}

main {
    flex: 1;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.problem h2 {
    color: var(--danger-color);
}

.solution h2 {
    color: var(--success-color);
}

.problem, .solution, .explanation, .exceptions, .cta {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.problem {
    background-color: var(--dm-bg);
    border-color: #fca5a5;
}

.solution {
    background-color: var(--public-bg);
    border-color: #86efac;
}

.chat-example {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: var(--shadow);
}

.message {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.message:last-child {
    margin-bottom: 0;
}

.dm {
    background-color: #fee2e2;
    border-left: 4px solid var(--danger-color);
}

.public {
    background-color: #dcfce7;
    border-left: 4px solid var(--success-color);
}

.message strong {
    color: var(--text-color);
}

ul {
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

li strong {
    font-weight: 600;
}

.cta {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: white;
    text-align: center;
}

.cta p {
    margin-bottom: 0.5rem;
}

.cta p:last-child {
    margin-bottom: 0;
}

code {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9em;
}

footer {
    text-align: center;
    padding: 2rem 0 1rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

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

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

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.125rem;
    }
    
    .problem, .solution, .explanation, .exceptions, .cta {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    .message {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #f9fafb;
        --text-muted: #9ca3af;
        --bg-color: #111827;
        --border-color: #374151;
        --code-bg: #1f2937;
        --dm-bg: #1f1518;
        --public-bg: #0f1b0f;
    }
    
    .chat-example {
        background-color: #1f2937;
    }
    
    .dm {
        background-color: #2d1b1b;
    }
    
    .public {
        background-color: #1a2e1a;
    }
}
