:root {
    /* Light Theme (Default) */
    --bg-body: #ffffff;
    --bg-surface: #f3f4f6; /* Very light gray */
    --bg-card: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --primary: #2563eb; /* Bright Royal Blue */
    --primary-hover: #1d4ed8;
    --accent: #10b981; /* Emerald Green */
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 1rem;
}

[data-theme="dark"] {
    /* Dark Theme */
    --bg-body: #111827; /* Dark Gray/Blue tint */
    --bg-surface: #1f2937;
    --bg-card: #1f2937;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --primary: #3b82f6; /* Lighter Blue */
    --primary-hover: #60a5fa;
    --accent: #34d399; /* Lighter Green */
    --border: #374151;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.18);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.025em;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background-color: var(--bg-body);
    border-color: var(--text-muted);
}

/* Main Content */
main {
    padding: 4rem 0;
}

h1, h2, h3 {
    color: var(--text-main);
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

/* Sections */
.hero {
    text-align: center;
    padding: 4rem 0 6rem;
}

.hero p {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn:disabled {
    background-color: var(--text-muted);
    opacity: 0.7;
    cursor: not-allowed;
}

/* Forms (for generators) */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 1rem;
    transition: border-color 0.2s;
}

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

.result-box {
    background-color: var(--bg-surface);
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: monospace;
    word-break: break-all;
    margin-top: 1rem;
    border: 1px solid var(--border);
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }
    
    h1 {
        font-size: 2.25rem;
    }
}
