@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap');

/* Login Page */

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

:root {
    --bg: #f2f2f7;
    --surface: #ffffff;
    --border: #e0e0e5;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.04);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
    --text: #1c1c1e;
    --text-muted: #6b6b70;
    --accent: #d4622a;
    --accent-dim: rgba(212, 98, 42, 0.1);
    --radius: 12px;
    --logo-stroke: #1c1c1e;
    --google-bg: #ffffff;
    --google-text: #1f1f1f;
    --google-border: #dadce0;
    --google-hover: #f7f8f8;
}

[data-theme="dark"] {
    --bg: #111113;
    --surface: #1c1c1e;
    --border: #38383a;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
    --text: #f2f2f7;
    --text-muted: #98989e;
    --accent: #e0723a;
    --accent-dim: rgba(224, 114, 58, 0.15);
    --logo-stroke: #f2f2f7;
    --google-bg: #131314;
    --google-text: #e3e3e3;
    --google-border: #8e918f;
    --google-hover: #1e1f20;
}

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* ── Full-screen centered layout ─────────────────────────── */
.login-scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: 40px 24px;
    position: relative;
    overflow: hidden;
}

/* ── Ambient glow ────────────────────────────────────────── */
.login-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 320px;
    height: 320px;
    transform: translate(-50%, -62%);
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0.08;
    pointer-events: none;
    animation: glow-pulse 4s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
    0%   { opacity: 0.06; transform: translate(-50%, -62%) scale(0.95); }
    100% { opacity: 0.12; transform: translate(-50%, -62%) scale(1.05); }
}

[data-theme="dark"] .login-glow {
    opacity: 0.12;
}
[data-theme="dark"] @keyframes glow-pulse {
    0%   { opacity: 0.08; }
    100% { opacity: 0.18; }
}

/* ── Content block ───────────────────────────────────────── */
.login-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    position: relative;
    z-index: 1;
    animation: login-rise 0.6s ease-out both;
}

@keyframes login-rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Logo ────────────────────────────────────────────────── */
.login-logo {
    width: 72px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 12px rgba(212, 98, 42, 0.25));
}

.login-logo-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Typography ──────────────────────────────────────────── */
.login-title {
    font-family: 'Permanent Marker', cursive;
    font-size: 42px;
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.1;
    margin-bottom: 6px;
    text-align: center;
    color: var(--accent);
}

.login-subtitle {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 40px;
    text-align: center;
}

/* ── Google Sign-In Button (brand guidelines) ────────────── */
.google-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    padding: 0 24px 0 16px;
    background: var(--google-bg);
    color: var(--google-text);
    border: 1px solid var(--google-border);
    border-radius: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.google-btn:hover {
    background: var(--google-hover);
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.google-btn:active {
    transform: scale(0.97);
}

.google-btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.google-btn-label {
    white-space: nowrap;
}

/* ── Email / password form ───────────────────────────────── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin-top: 4px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.auth-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.auth-input {
    height: 46px;
    padding: 0 14px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}
.auth-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}
.auth-input:disabled { opacity: 0.6; }

.auth-btn {
    height: 48px;
    border: none;
    border-radius: 24px;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}
.auth-btn:hover { filter: brightness(1.06); }
.auth-btn:active { transform: scale(0.97); }
.auth-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-top: 2px;
}
.auth-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
}
.auth-link:hover { text-decoration: underline; }

/* Divider between Google and email form */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin: 22px 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Status / error message */
.auth-message {
    width: 100%;
    max-width: 320px;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
    margin-bottom: 4px;
}
.auth-message.error { background: rgba(220, 53, 69, 0.12); color: #c5303e; }
.auth-message.info  { background: var(--accent-dim); color: var(--accent); }
.auth-message.success { background: rgba(40, 167, 69, 0.12); color: #1d8a3a; }
.auth-message.hidden { display: none; }

/* A simple card used by awaiting/verify/reset pages */
.auth-card {
    width: 100%;
    max-width: 360px;
    text-align: center;
}
.auth-body-text {
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ── Footer ──────────────────────────────────────────────── */
.login-footer {
    position: absolute;
    bottom: 28px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    opacity: 0.6;
    letter-spacing: 0.2px;
    animation: login-rise 0.6s ease-out 0.2s both;
}

/* ── Desktop max-width ───────────────────────────────────── */
@media (min-width: 600px) {
    .login-logo { width: 80px; }
    .login-title { font-size: 48px; }
}
