:root {
            --bg-primary: #0f172a;
            --bg-secondary: #1e293b;
            --bg-card: #334155;
            --accent: #3b82f6;
            --accent-hover: #2563eb;
            --danger: #ef4444;
            --success: #10b981;
            --text-main: #f8fafc;
            --text-muted: #94a3b8;
            --border: #475569;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background-color: var(--bg-primary);
            color: var(--text-main);
            min-height: 100vh;
            min-height: 100dvh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px;
            background-image: 
                radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 85% 85%, rgba(30, 41, 59, 0.5) 0%, transparent 50%);
        }

        .register-container {
            width: 100%;
            max-width: 400px;
            display: flex;
            flex-direction: column;
            gap: 20px;
            animation: fadeIn 0.35s ease-out;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .header {
            text-align: center;
            padding-bottom: 16px;
            border-bottom: 1px solid var(--border);
        }

        .logo {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--accent);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .subtitle {
            font-size: 0.75rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-top: 6px;
            font-weight: 600;
        }

        .alert {
            padding: 12px 14px;
            border-radius: 8px;
            font-size: 0.85rem;
            text-align: center;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .alert-danger {
            background: rgba(239, 68, 68, 0.18);
            border: 1px solid var(--danger);
            color: #fca5a5;
        }

        .alert-success {
            background: rgba(16, 185, 129, 0.18);
            border: 1px solid var(--success);
            color: #6ee7b7;
        }

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

        label {
            display: block;
            font-size: 0.78rem;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 6px;
        }

        .input-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        /* 16px minimum font size explicitly stops mobile iOS webkit auto-zoom */
        input[type="text"],
        input[type="email"],
        input[type="password"] {
            width: 100%;
            background: var(--bg-secondary);
            color: var(--text-main);
            border: 1px solid var(--border);
            padding: 14px 14px;
            border-radius: 8px;
            font-size: 16px !important;
            outline: none;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        input[type="text"]:focus,
        input[type="email"]:focus,
        input[type="password"]:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
        }

        /* Padding adjustment for password input to clear the eye toggle */
        input.password-input {
            padding-right: 42px;
        }

        .input-actions {
            position: absolute;
            right: 10px;
            display: flex;
            align-items: center;
        }

        .input-action-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 8px;
            font-size: 0.95rem;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            transition: color 0.2s;
        }

        .input-action-btn:hover {
            color: var(--text-main);
        }

        .invite-input {
            font-family: monospace;
            letter-spacing: 0.1em;
        }

        .btn-submit {
            width: 100%;
            background: var(--accent);
            color: white;
            border: none;
            padding: 14px 16px;
            border-radius: 8px;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s, transform 0.1s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
        }

        .btn-submit:hover {
            background: var(--accent-hover);
        }

        .btn-submit:active {
            transform: scale(0.98);
        }

        .footer-link {
            text-align: center;
            font-size: 0.85rem;
            color: var(--text-muted);
            margin-top: 4px;
        }

        .footer-link a {
            color: var(--accent);
            text-decoration: none;
            font-weight: 600;
        }

        .footer-link a:hover {
            text-decoration: underline;
        }
    


:root { --ui-spring:cubic-bezier(.22,1.35,.36,1); }
button, a, .btn, .btn-primary, .btn-danger, .btn-action, .btn-submit, .btn-post, .btn-sm, .action-btn, .nav-item, .tab, select { -webkit-tap-highlight-color:transparent; transition:transform .22s var(--ui-spring), box-shadow .22s ease, background-color .22s ease, border-color .22s ease, color .22s ease !important; }
button:active, a.btn:active, a.btn-action:active, .btn:active, .btn-primary:active, .btn-danger:active, .btn-action:active, .btn-submit:active, .btn-post:active, .btn-sm:active, .action-btn:active, .nav-item:active, .tab:active { transform:scale(.94); }
button:hover, a.btn:hover, a.btn-action:hover, .btn:hover, .btn-primary:hover, .btn-danger:hover, .btn-action:hover, .btn-submit:hover, .btn-post:hover, .btn-sm:hover { transform:translateY(-1px); box-shadow:0 7px 18px color-mix(in srgb,var(--accent) 22%,transparent); }
.bottom-nav { min-height:68px; padding:10px 12px calc(10px + env(safe-area-inset-bottom)) !important; }
.bottom-nav .nav-item { min-width:56px; min-height:48px; padding:8px 12px !important; }
.bottom-nav .nav-item i { font-size:1.3rem !important; }
.toast, #toastContainer .toast { border-color:var(--accent); background:color-mix(in srgb,var(--bg-secondary) 94%,var(--accent)); color:var(--text-main); }
.toast.error, #toastContainer .toast.error { border-color:var(--danger); background:color-mix(in srgb,var(--bg-secondary) 90%,var(--danger)); }
.toast.success, #toastContainer .toast.success { border-color:var(--success); background:color-mix(in srgb,var(--bg-secondary) 90%,var(--success)); }
@media (max-width:600px) { button, a.btn, .btn, .btn-primary, .btn-danger, .btn-action, .btn-submit, .btn-post, .btn-sm, .action-btn { min-height:44px; } }
