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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 10%, rgba(56, 142, 226, 0.6) 30%, rgba(100, 170, 240, 0.8) 50%, rgba(56, 142, 226, 0.6) 70%, transparent 90%);
    z-index: 10;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 350px;
    background: radial-gradient(ellipse 70% 100% at 50% 0%, rgba(56, 142, 226, 0.2) 0%, rgba(56, 142, 226, 0.08) 40%, transparent 80%);
    pointer-events: none;
    z-index: 0;
}

/* Theme toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
    padding: 0;
    line-height: 1;
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.theme-toggle:hover {
    color: #aaa;
}

.icon-sun { display: none; }
.icon-moon { display: inline; }

.container {
    flex: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}


.app-icon {
    display: block;
    width: 128px;
    height: 128px;
    margin: 0 auto 24px;
    border-radius: 28px;
}

h1 {
    font-size: 2.6rem;
    font-weight: 800;
    color: #ffffff;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.tagline {
    text-align: center;
    color: #888;
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.app-store-badge {
    display: block;
    text-align: center;
}

.app-store-badge img {
    height: 48px;
}

nav {
    display: flex;
    justify-content: center;
    gap: 24px;
}

nav a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

nav a:hover {
    color: #fff;
}

/* Legal pages */
.legal {
    flex: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 24px 40px;
    width: 100%;
}

.legal .back {
    display: inline-block;
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 32px;
    transition: color 0.2s;
}

.legal .back:hover {
    color: #fff;
}

.legal h1 {
    text-align: left;
    margin-bottom: 8px;
    font-size: 2rem;
}

.legal .updated {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 32px;
}

.legal h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin-top: 32px;
    margin-bottom: 12px;
}

.legal p {
    color: #bbb;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.legal ul {
    color: #bbb;
    margin-bottom: 16px;
    padding-left: 24px;
    font-size: 0.95rem;
}

.legal li {
    margin-bottom: 8px;
}

.legal a {
    color: #aaa;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal a:hover {
    color: #fff;
}

/* Footer */
footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 20px 32px;
}

.footer-left {
    color: #555;
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #aaa;
}

.footer-sep {
    display: none;
}

footer .theme-toggle {
    justify-self: end;
}

/* Light theme */
body.light {
    background-color: #ffffff;
    color: #333;
}

body.light::before,
body.light::after {
    display: none;
}

body.light h1 { color: #000; }
body.light .tagline { color: #666; }
body.light nav a { color: #555; }
body.light nav a:hover { color: #000; }
body.light .legal .back { color: #666; }
body.light .legal .back:hover { color: #000; }
body.light .legal h1 { color: #000; }
body.light .legal .updated { color: #999; }
body.light .legal h2 { color: #000; }
body.light .legal p,
body.light .legal ul { color: #444; }
body.light .legal a { color: #555; }
body.light .legal a:hover { color: #000; }
body.light .footer-left { color: #999; }
body.light .footer-links a { color: #999; }
body.light .footer-links a:hover { color: #555; }
body.light .footer-sep { color: #ccc; }
body.light .theme-toggle { color: #999; }
body.light .theme-toggle:hover { color: #555; }
body.light .icon-sun { display: inline; }
body.light .icon-moon { display: none; }

@media (max-width: 600px) {
    .container {
        padding: 48px 16px 32px;
    }

    .legal {
        padding: 32px 16px 32px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .legal h1 {
        font-size: 1.6rem;
    }

    footer {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 16px;
    }

    .footer-links {
        width: 100%;
        justify-content: center;
        order: -1;
    }

    .footer-left {
        font-size: 0.8rem;
    }

    .footer-sep {
        display: inline;
        color: #444;
        font-size: 0.8rem;
    }

    footer .theme-toggle {
        justify-self: auto;
    }
}
