:root {
    --primary: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #81C784;
    --accent: #FFC107;
    --bg: #FAFAFA;
    --surface: #FFFFFF;
    --text: #212121;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border: #E0E0E0;
    --error: #E53935;
    --max-width: 1120px;
    --radius: 12px;
    --radius-lg: 20px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121212;
        --surface: #1E1E1E;
        --text: #E0E0E0;
        --text-secondary: #AAAAAA;
        --text-muted: #777777;
        --border: #333333;
    }
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

img { max-width: 100%; height: auto; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── Navigation ─── */
.nav {
    position: sticky;
    top: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    backdrop-filter: blur(12px);
}

.nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
}

.nav-brand img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
    text-decoration: none;
}

@media (max-width: 640px) {
    .nav-links { display: none; }
}

/* ─── Hero ─── */
.hero {
    padding: 80px 0 60px;
    text-align: center;
}

.hero-logo {
    width: 140px;
    margin: 0 auto 24px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.hero h1 .highlight {
    color: var(--primary);
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 36px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-accent {
    background: var(--error);
    color: #fff;
}

/* ─── Features ─── */
.features {
    padding: 80px 0;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 48px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ─── How It Works ─── */
.how-it-works {
    padding: 80px 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.how-it-works h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 48px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    text-align: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.steps h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.steps p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ─── Donate section ─── */
.donate-section {
    padding: 80px 0;
    text-align: center;
}

.donate-section h2 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.donate-section .subtitle {
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 32px;
}

/* ─── Footer ─── */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 12px;
    list-style: none;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ─── Legal pages ─── */
.legal {
    padding: 60px 0;
    max-width: 720px;
    margin: 0 auto;
}

.legal h1 {
    font-size: 2rem;
    margin-bottom: 24px;
}

.legal h2 {
    font-size: 1.3rem;
    margin-top: 32px;
    margin-bottom: 12px;
}

.legal p, .legal li {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.legal ul {
    padding-left: 24px;
}

/* ─── Web Viewer ─── */
.viewer {
    padding: 40px 0;
    min-height: 70vh;
}

.viewer-login {
    text-align: center;
    padding: 80px 0;
}

.viewer-login p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.list-viewer {
    max-width: 640px;
    margin: 0 auto;
}

.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.list-header h2 {
    font-size: 1.5rem;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    transition: opacity 0.2s;
}

.list-item.checked {
    opacity: 0.5;
}

.list-item.checked .item-name {
    text-decoration: line-through;
}

.list-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.item-name {
    flex: 1;
    font-size: 1rem;
}

.item-qty {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.add-item-row {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.add-item-row input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--surface);
    color: var(--text);
}

.add-item-row button {
    padding: 12px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

/* ─── Translation Portal ─── */
.translate-section {
    padding: 80px 0;
}

.translate-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 12px;
}

.translate-section .subtitle {
    text-align: center;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 36px;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    max-width: 640px;
    margin: 0 auto 36px;
}

.lang-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
}

.lang-badge .check {
    color: var(--primary);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .hero { padding: 48px 0 40px; }
    .hero h1 { font-size: 2.2rem; }
    .hero .subtitle { font-size: 1.05rem; }
    .features, .how-it-works, .donate-section, .translate-section { padding: 48px 0; }
}
