/* Auth Pages Styles */

:root {
    --primary: #1DB954;
    --primary-dark: #169c46;
    --bg-dark: #070b09;
    --text-primary: #ffffff;
    --text-secondary: #A9A6A6;
    --text-muted: #6b7280;
    --border-color: #1f2d26;
    --danger: #ef4444;
    --success: #1DB954;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: url('/assets/images/landing/login.webp') no-repeat center center;
    background-size: cover;
    position: relative;
}

/* Dark overlay for better readability */
.auth-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

.back-btn {
    position: absolute;
    top: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    z-index: 10;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(29, 185, 84, 0.5);
    transform: translateX(-3px);
}

/* Glassmorphism Card */
.auth-card {
    width: 100%;
    max-width: 580px;
    background: rgb(225 225 225 / 6%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 45px 40px;
    position: relative;
    z-index: 1;
    box-shadow: 
        inset 1px 1px 20px 0px rgba(255, 255, 255, 0.08),
        0 25px 50px rgba(0, 0, 0, 0.5);
}

/* Larger card for register form */
.auth-card.register-card {
    max-width: 680px;
    padding: 40px 45px;
}

/* Gradient border effect */
.auth-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(29, 185, 84, 0.3) 0%, rgba(29, 185, 84, 0.05) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.auth-title {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    color: #ffffff;
}

.auth-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 30px;
    font-size: 15px;
}

.auth-subtitle a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.auth-subtitle a:hover {
    color: var(--primary);
}

/* Form Styles */
.auth-form .form-group {
    margin-bottom: 20px;
    position: relative;
}

/* Two column layout for register form */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.auth-form label {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="tel"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: #ffffff;
    font-size: 15px;
    transition: all 0.3s ease;
}

.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.auth-form input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.03);
}

/* Error State */
.auth-form input.error {
    border-color: var(--danger);
}

.form-group.error input {
    border-color: var(--danger);
}

/* Shake Animation for Errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.form-group.shake {
    animation: shake 0.5s ease-in-out;
}

.form-group.shake input {
    border-color: var(--danger);
}

/* Error Message */
.error-msg {
    display: none;
    color: var(--danger);
    font-size: 12px;
    margin-top: 6px;
    padding-left: 16px;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.error-msg:not(:empty) {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.form-group.error .error-msg {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Forgot Password Link */
.forgot-link {
    display: block;
    text-align: right;
    color: #ffffff;
    font-size: 13px;
    margin-bottom: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: var(--primary);
}

/* Primary Button */
.btn {
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(90deg, #30C083 0%, #175A3D 100%);
    color: white;
    box-shadow: 0 0 30px rgba(29, 185, 84, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(29, 185, 84, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
}

/* Loading State */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::after {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

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

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
}

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

.auth-divider span {
    padding: 0 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 500;
}

/* Google Button */
.google-btn-wrapper {
    width: 100%;
}

#google-btn-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

#google-btn-container > div {
    width: 100% !important;
    max-width: 100% !important;
}

#google-btn-container > div > div {
    width: 100% !important;
}

#google-btn-container iframe {
    width: 100% !important;
    max-width: 100% !important;
}

.google-btn {
    width: 100%;
    padding: 16px 24px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: #333;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.google-btn:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.google-btn img {
    width: 20px;
    height: 20px;
}

/* Checkbox */
.checkbox-group {
    margin-bottom: 24px !important;
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-label a {
    color: var(--primary);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Password Strength */
.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.password-strength::after {
    content: '';
    display: block;
    height: 100%;
    width: var(--strength, 0%);
    background: var(--strength-color, var(--danger));
    transition: all 0.3s ease;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

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

/* Success Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 28px;
    border-radius: 50px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success { 
    background: var(--success); 
    box-shadow: 0 5px 20px rgba(29, 185, 84, 0.4);
}

.toast.error { 
    background: var(--danger); 
    box-shadow: 0 5px 20px rgba(239, 68, 68, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        padding: 15px;
        align-items: flex-start;
        padding-top: 100px;
    }
    
    .auth-card {
        max-width: 100%;
        padding: 35px 25px;
        border-radius: 20px;
    }
    
    .auth-card.register-card {
        max-width: 100%;
        padding: 35px 25px;
    }
    
    /* Single column on mobile */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .auth-title {
        font-size: 26px;
    }
    
    .auth-subtitle {
        font-size: 14px;
        margin-bottom: 25px;
    }
    
    .back-btn {
        top: 20px;
        left: 20px;
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .auth-form .form-group {
        margin-bottom: 18px;
    }
    
    .auth-form input[type="text"],
    .auth-form input[type="email"],
    .auth-form input[type="tel"],
    .auth-form input[type="password"] {
        padding: 14px 18px;
        font-size: 14px;
    }
    
    .btn {
        padding: 15px 28px;
        font-size: 14px;
    }
    
    .auth-divider {
        margin: 20px 0;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
        padding-top: 80px;
    }
    
    .auth-card {
        padding: 30px 20px;
        border-radius: 18px;
    }
    
    .auth-card.register-card {
        padding: 30px 20px;
    }
    
    .auth-card::before {
        border-radius: 18px;
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    .auth-subtitle {
        font-size: 13px;
        margin-bottom: 22px;
    }
    
    .back-btn {
        top: 15px;
        left: 15px;
        padding: 8px 14px;
        font-size: 12px;
        gap: 6px;
    }
    
    .back-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .auth-form .form-group {
        margin-bottom: 16px;
    }
    
    .auth-form label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .auth-form input[type="text"],
    .auth-form input[type="email"],
    .auth-form input[type="tel"],
    .auth-form input[type="password"] {
        padding: 13px 16px;
        font-size: 14px;
    }
    
    .forgot-link {
        font-size: 12px;
        margin-bottom: 20px;
    }
    
    .btn {
        padding: 14px 24px;
        font-size: 14px;
    }
    
    .auth-divider {
        margin: 18px 0;
    }
    
    .auth-divider span {
        font-size: 12px;
        padding: 0 15px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .auth-container {
        padding: 8px;
        padding-top: 70px;
    }
    
    .auth-card {
        padding: 25px 16px;
        border-radius: 16px;
    }
    
    .auth-card.register-card {
        padding: 25px 16px;
    }
    
    .auth-title {
        font-size: 22px;
    }
    
    .auth-subtitle {
        font-size: 12px;
    }
    
    .auth-form input[type="text"],
    .auth-form input[type="email"],
    .auth-form input[type="tel"],
    .auth-form input[type="password"] {
        padding: 12px 14px;
        font-size: 13px;
    }
    
    .btn {
        padding: 13px 20px;
        font-size: 13px;
    }
}