:root {
    --primary: #7C6CF6;
    --primary-hover: #6857EB;
    --bg: #FAFAFA;
    --surface: #FFFFFF;
    --text-main: #1C1C1E;
    --text-secondary: #8E8E93;
    --border: #E5E5EA;
    --focus-ring: rgba(124, 108, 246, 0.25);
    --radius-box: 20px;
    --radius-btn: 14px;
    --radius-input: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle top gradient */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(124, 108, 246, 0.04) 0%, var(--bg) 400px);
}

.container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 64px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header .logo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin-bottom: 24px;
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

header h1 {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

header p {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Support simple alternate header markup (used by privacy page) */
header .app-title {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--text-main);
}

.container--wide {
    max-width: 700px;
}

section {
    background-color: var(--surface);
    border-radius: var(--radius-box);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.about p {
    font-size: 17px;
    line-height: 1.5;
    color: var(--text-main);
    text-align: center;
}

.support-section h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.support-section > p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-main);
}

input, textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px; /* Prevents auto-zoom on iOS */
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    background-color: var(--bg);
    color: var(--text-main);
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    -webkit-appearance: none;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

input:hover, textarea:hover {
    border-color: #D1D1D6;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--surface);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

input::placeholder, textarea::placeholder {
    color: #AEAEB2;
    opacity: 1;
}

button {
    width: 100%;
    margin-top: 12px;
    padding: 16px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #FFFFFF;
    background-color: var(--primary);
    border: none;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
}

button:hover {
    background-color: var(--primary-hover);
}

button:active {
    transform: scale(0.98);
}

button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--focus-ring);
}

footer {
    text-align: center;
    padding: 32px 0 48px;
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-links {
    margin-top: 4px;
}

.footer-links a,
.back-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.footer-links a:hover,
.back-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-links a:focus-visible,
.back-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--focus-ring);
    border-radius: 10px;
}

.back-link {
    align-self: flex-start;
    display: inline-block;
    margin-bottom: 20px;
    font-size: 14px;
}

.policy h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 18px;
}

.policy h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-top: 22px;
    margin-bottom: 8px;
}

.policy p {
    font-size: 16px;
    color: var(--text-main);
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 48px 20px 24px;
    }
    
    section {
        padding: 24px;
        border-radius: 16px;
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
    }
    
    header h1 {
        font-size: 28px;
    }
}
