/* Signup Page Design - Light Theme */

body {
    background-color: #f8fafc;
    background-image: 
        linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: center;
    background-attachment: fixed;
    color: #0f172a;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.signup-main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 70px 20px 16px;
    box-sizing: border-box;
}

.container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 26px 32px 20px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    animation: cardEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

h1 {
    text-align: center;
    margin-bottom: 12px;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #0f172a 40%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

form {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 9px 14px;
    font-size: 0.88rem;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    box-sizing: border-box;
    color: #0f172a;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: #ffffff;
}

.form-group input[type="submit"] {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.2);
    font-family: 'Outfit', sans-serif;
}

.form-group input[type="submit"]:hover:not(:disabled) {
    background: linear-gradient(135deg, #4338ca, #4f46e5);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
}

.form-group input[type="submit"]:disabled {
    background: transparent;
    color: #94a3b8;
    border: 1.5px dashed rgba(148, 163, 184, 0.4);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 1;
}

.error-message {
    color: #dc3545;
    font-size: 0.76rem;
    margin-top: 1px;
    display: block;
    font-weight: 500;
    min-height: 0;
}

/* Flash Messages */
.flash-messages {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.flash-messages li {
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
}

.flash-messages .success {
    background-color: rgba(34, 197, 94, 0.08);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.15);
}

.flash-messages .danger {
    background-color: rgba(239, 68, 68, 0.08);
    color: #dc3545;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.text-center {
    text-align: center;
    margin-top: 10px;
    padding-top: 0;
    font-size: 0.84rem;
    color: #64748b;
}

.text-center a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.text-center a:hover {
    color: #6366f1;
    text-decoration: underline;
}

/* Password show/hide toggle */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding-right: 44px !important;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 0.9rem;
    padding: 4px;
    transition: color 0.15s;
    line-height: 1;
    display: flex;
    align-items: center;
}

.toggle-password:hover {
    color: #4f46e5;
}

/* Password strength meter */
.password-strength {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.strength-bar {
    flex: 1;
    height: 3px;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-fill.weak   { background: #ef4444; width: 33%; }
.strength-fill.medium { background: #f59e0b; width: 66%; }
.strength-fill.strong { background: #22c55e; width: 100%; }

.strength-label {
    font-size: 0.7rem;
    color: #94a3b8;
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
    min-width: 80px;
    text-align: right;
}

/* Auth nav hint */
.auth-nav-hint {
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    color: #94a3b8;
}

.auth-nav-hint a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
}

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

/* Spinner and Overlay Styles */
.spinner-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(248, 250, 252, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.spinner {
    border: 4px solid rgba(99, 102, 241, 0.15);
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
