/* Base styles and variables */
:root {
    --background: #ffffff;
    --foreground: #333333;
    --primary: #ea384c;
    --primary-hover: #d3273b;
    --primary-foreground: #ffffff;
    --secondary: #f6f6f6;
    --secondary-foreground: #333333;
    --muted: #f6f6f6;
    --muted-foreground: #71717a;
    --accent: #f6f6f6;
    --accent-foreground: #333333;
    --destructive: #ea384c;
    --destructive-foreground: #ffffff;
    --border: #e4e4e7;
    --input: #e4e4e7;
    --radius: 1rem;
    --card-background: rgba(255, 255, 255, 0.8);
    --card-foreground: #333333;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
.rule-item {
    font-size: 14px;
    margin: 2px 0;
    color: #ff3333;
}

.rule-item.valid {
    color: #33cc66;
}

.rule-item.valid::before {
    content: '✔ ';
}

.rule-item::before {
    content: '✖ ';
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

/* Layout Styles */
.auth-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    background: var(--background);
    overflow: hidden;
}

.auth-layout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10rem;
    background: linear-gradient(to bottom, rgba(234, 56, 76, 0.08), transparent);
    z-index: 0;
}

#loadingOverlay .overlay-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8); /* Lightbox effect */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #ff3333; /* Red color */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Profile upload styles */
.profile-upload {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.profile-image-container {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--secondary);
    overflow: hidden;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-upload-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    transition: background-color 0.2s;
}

.profile-upload-icon:hover {
    background: var(--primary-hover);
    z-index: 9999;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    max-width: 400px;
    width: 90%;
    background: var(--foreground);
    color: var(--background);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 100;
    transform: translateY(1rem);
    transition: all 0.3s ease;
}

.toast.hidden {
    transform: translateY(200%);
    opacity: 0;
    visibility: hidden;
}

.toast-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.toast-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.toast-description {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Success message styles */
.success-container {
    text-align: center;
    padding: 1rem 0;
}

.success-icon {
    width: 4rem;
    height: 4rem;
    background-color: rgba(234, 56, 76, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--primary);
    font-size: 1.5rem;
}

.success-container h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.success-container p {
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

.resend-text {
    font-size: 0.875rem;
    margin-top: 1rem;
}

.text-button {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    padding: 0;
}

.text-button:hover {
    text-decoration: underline;
}

.hidden {
    display: none;
}

/* Password strength indicator */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background-color: var(--secondary);
    border-radius: 2px;
    overflow: hidden;
}

.strength-progress {
    height: 100%;
    width: 0;
    background-color: var(--strength-weak);
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-text {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.auth-submit-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: 0.75rem;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.auth-submit-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(234, 56, 76, 0.3);
}

.auth-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.back-link {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.auth-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(234, 56, 76, 0.3);
}

.auth-input::placeholder {
    color: var(--muted-foreground);
    opacity: 0.7;
}

.error-message {
    font-size: 0.75rem;
    color: var(--destructive);
    margin-top: 0.25rem;
}

.auth-layout::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10rem;
    background: linear-gradient(to top, rgba(234, 56, 76, 0.08), transparent);
    z-index: 0;
}

.background-accent {
    position: absolute;
    width: 24rem;
    height: 24rem;
    background: rgba(234, 56, 76, 0.1);
    border-radius: 50%;
    filter: blur(3rem);
    opacity: 0.3;
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.top-right {
    top: -50px;
    right: -50px;
}

.bottom-left {
    bottom: -50px;
    left: -50px;
}

.bg-pattern {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ea384c' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
}

.header {
    width: 100%;
    margin-bottom: 1.5rem;
    text-align: center;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.header p {
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

.auth-card {
    padding: 1.5rem;
    border-radius: 1rem;
    background: var(--card-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.password-input-container {
    position: relative;
}

.auth-input {
    background: var(--secondary);
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    width: 100%;
    transition: all 0.2s ease-in-out;
    font-size: 1rem;
}

.auth-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(234, 56, 76, 0.3);
}

.auth-input::placeholder {
    color: var(--muted-foreground);
    opacity: 0.7;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--foreground);
}

.error-message {
    font-size: 0.75rem;
    color: var(--destructive);
    margin-top: 0.25rem;
}

.forgot-password {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.auth-submit-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    margin-top: 1.5rem;
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: 0.75rem;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.auth-submit-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(234, 56, 76, 0.3);
}

.auth-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.social-login {
    margin-top: 1.5rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

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

.auth-divider::before {
    margin-right: 0.75rem;
}

.auth-divider::after {
    margin-left: 0.75rem;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .social-buttons {
        flex-direction: row;
    }
}

.social-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.social-button:hover {
    background: var(--secondary);
}

.social-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(234, 56, 76, 0.3);
}

.signup-link {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.footer {
    position: relative;
    z-index: 10;
    margin-top: 2rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    text-align: center;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    max-width: 400px;
    width: 90%;
    background: var(--foreground);
    color: var(--background);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 100;
    transform: translateY(1rem);
    transition: all 0.3s ease;
}

.toast.hidden {
    transform: translateY(200%);
    opacity: 0;
    visibility: hidden;
}

.toast-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.toast-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.toast-description {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Animations */
@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.2;
    }
}

.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-slide-up {
    opacity: 0;
    transform: translateY(10px);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-down {
    opacity: 0;
    transform: translateY(-10px);
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}