/* Auth Pages - Stripe-style Design */

:root {
    --auth-primary: #635bff;
    --auth-primary-dark: #5851ea;
    --auth-text: #1d1d1f;
    --auth-text-muted: #6e6e73;
    --auth-border: #d2d2d7;
}

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

body.auth-page {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: white;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Full page container */
.auth-container {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* Canvas background - full page */
.auth-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

/* Logo - top left */
.brand-logo {
    position: fixed;
    top: 24px;
    left: 32px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    z-index: 10;
}

.brand-logo img {
    height: 36px;
}

.brand-logo span {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Form Card */
.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 5;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h2 {
    font-size: 26px;
    font-weight: 600;
    color: var(--auth-text);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 15px;
    color: var(--auth-text-muted);
}

/* Auth Buttons */
.auth-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--auth-border);
    background: white;
    color: var(--auth-text);
}

.auth-btn:hover {
    background: #fafafa;
    border-color: #a1a1a6;
}

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

.auth-btn-wallet img {
    object-fit: contain;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.auth-divider span {
    font-size: 12px;
    color: var(--auth-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Form */
.auth-form {
    margin-bottom: 24px;
}

.form-field {
    margin-bottom: 18px;
}

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

.form-field input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    font-size: 16px;
    color: var(--auth-text);
    background: #fafafa;
    transition: all 0.2s ease;
}

.form-field input:focus {
    outline: none;
    border-color: var(--auth-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.1);
}

.form-field input::placeholder {
    color: #a1a1a6;
}

.auth-submit {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: var(--auth-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.auth-submit:hover {
    background: var(--auth-primary-dark);
}

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

/* Footer */
.auth-footer {
    text-align: center;
    font-size: 14px;
    color: var(--auth-text-muted);
    margin-bottom: 16px;
}

.auth-footer a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    border: none;
    background: none;
}

@media (hover: hover) {
    .auth-footer a:hover {
        text-decoration: underline;
    }
}

.auth-legal {
    text-align: center;
    font-size: 12px;
    color: #a1a1a6;
}

.auth-legal a {
    color: var(--auth-text-muted);
    text-decoration: none;
}

.auth-legal a:hover {
    text-decoration: underline;
}

/* Auth Overlay */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.auth-overlay.active {
    display: flex;
}

.overlay-content {
    text-align: center;
}

.overlay-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--auth-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.overlay-content p {
    font-size: 15px;
    color: var(--auth-text-muted);
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .auth-container {
        padding: 70px 20px 20px;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .auth-card {
        padding: 24px 20px;
        max-width: 340px;
        border-radius: 14px;
    }

    .brand-logo {
        top: 14px;
        left: 50%;
        transform: translateX(-50%);
    }

    .brand-logo img {
        height: 28px;
    }

    .brand-logo span {
        font-size: 18px;
        text-shadow: 0 0 8px white, 0 0 12px white, 0 0 16px white;
    }

    .auth-header {
        margin-bottom: 20px;
    }

    .auth-header h2 {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .auth-header p {
        font-size: 13px;
    }

    .auth-methods {
        gap: 8px;
        margin-bottom: 16px;
    }

    .auth-btn {
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 8px;
    }

    .auth-divider {
        margin-bottom: 16px;
    }

    .auth-divider span {
        font-size: 11px;
    }

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

    .form-field {
        margin-bottom: 12px;
    }

    .form-field label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .form-field input {
        padding: 11px 12px;
        font-size: 15px;
        border-radius: 8px;
    }

    .auth-submit {
        padding: 11px 14px;
        font-size: 15px;
        border-radius: 8px;
        margin-top: 4px;
    }

    .auth-footer {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .auth-legal {
        font-size: 11px;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .auth-container {
        padding: 60px 16px 16px;
    }

    .auth-card {
        padding: 20px 16px;
        max-width: 300px;
    }

    .auth-header h2 {
        font-size: 18px;
    }

    .auth-btn {
        padding: 9px 10px;
        font-size: 13px;
    }

    .form-field input {
        padding: 10px 10px;
        font-size: 14px;
    }

    .auth-submit {
        padding: 10px 12px;
        font-size: 14px;
    }
}
