* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b2b;
    --secondary-color: #1a1a1a;
    --accent-color: #e85520;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #e74c3c;

    /* Light Theme (Default) */
    --bg: #f5f5f5;
    --container-bg: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #6c757d;
    --border-color: #e0e0e0;
    --input-bg: #f8f9fa;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
    --blob-opacity: 0.1;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --display-sun: none;
    --display-moon: block;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #050505;
        --container-bg: #151515;
        --text-main: #f8f8f8;
        --text-muted: #a0a0a0;
        --border-color: #333333;
        --input-bg: #1f1f1f;
        --secondary-color: #f8f8f8;
        --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
        --blob-opacity: 0.15;
        --display-sun: block;
        --display-moon: none;
    }
}

[data-theme="dark"] {
    --bg: #050505;
    --container-bg: #151515;
    --text-main: #f8f8f8;
    --text-muted: #a0a0a0;
    --border-color: #333333;
    --input-bg: #1f1f1f;
    --secondary-color: #f8f8f8;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    --blob-opacity: 0.15;
    --display-sun: block;
    --display-moon: none;
}

.theme-transition,
.theme-transition *,
.theme-transition *::before,
.theme-transition *::after {
    transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        filter 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    transition: var(--transition);
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--container-bg);
    box-shadow: var(--shadow-md);
}

.theme-toggle .fa-sun {
    display: var(--display-sun);
}

.theme-toggle .fa-moon {
    display: var(--display-moon);
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

body {
    font-family: 'Alexandria', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Background Animations */
.bg-animations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, var(--input-bg) 0%, var(--bg) 100%);
}

.blob {
    position: absolute;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, rgba(255, 107, 43, var(--blob-opacity)) 0%, rgba(192, 57, 43, var(--blob-opacity)) 100%);
    border-radius: 50%;
    filter: blur(80px);
    animation: move 20s infinite alternate;
}

.blob:nth-child(1) {
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.blob:nth-child(2) {
    bottom: -150px;
    right: -100px;
    background: linear-gradient(135deg, rgba(142, 68, 173, 0.1) 0%, rgba(41, 128, 185, 0.1) 100%);
    animation-delay: -5s;
    width: 500px;
    height: 500px;
}

.blob:nth-child(3) {
    top: 20%;
    right: 10%;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1) 0%, rgba(211, 84, 0, 0.1) 100%);
    animation-delay: -10s;
}

.blob:nth-child(4) {
    bottom: 20%;
    left: 10%;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.08) 0%, rgba(22, 160, 133, 0.08) 100%);
    animation-delay: -15s;
    width: 300px;
    height: 300px;
}

@keyframes move {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(50px, 100px) scale(1.1);
    }

    66% {
        transform: translate(-50px, 50px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Auth Container */
.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--container-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    max-width: 1000px;
    width: 100%;
    min-height: 600px;
}

/* Brand Section */
.auth-brand {
    background: url('../pictures/auth_restaurant_bg.png') center/cover no-repeat;
    color: white;
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Dark overlay for better contrast */
.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(26, 26, 26, 0.6) 100%);
    z-index: 0;
}

/* Subtle glowing accent overlay */
.auth-brand::after {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 107, 43, 0.35) 0%, transparent 70%);
    z-index: 0;
    animation: pulseGlow 8s infinite alternate;
}

@keyframes pulseGlow {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.2) translate(10%, 10%);
        opacity: 0.8;
    }
}

.brand-content {
    text-align: center;
    position: relative;
    z-index: 1;
    /* Glassmorphism card */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 380px;
    animation: slideUpFade 0.6s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-brand-logo {
    margin-bottom: 25px;
    animation: float 4s ease-in-out infinite;
    max-width: 180px;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
        filter: drop-shadow(0 5px 15px rgba(255, 107, 43, 0.4));
    }

    50% {
        transform: translateY(-10px);
        filter: drop-shadow(0 15px 25px rgba(255, 107, 43, 0.2));
    }
}

.brand-content h1 {
    font-size: 34px;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #ffd5c2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-tagline {
    font-size: 15px;
    margin-bottom: 35px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    line-height: 1.5;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.feature {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.25);
    padding: 14px 20px;
    border-radius: 14px;
    width: 100%;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.feature i {
    font-size: 16px;
    color: var(--primary-color);
    background: rgba(255, 107, 43, 0.2);
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 107, 43, 0.3);
    transition: all 0.3s ease;
}

.feature:hover i {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 15px rgba(255, 107, 43, 0.6);
}

.feature span {
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Forms Section */
.auth-forms {
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--container-bg);
    align-self: stretch;
}

.form-wrapper {
    width: 100%;
    margin: auto 0;
    display: none;
    animation: slideIn 0.4s ease-out;
}

.form-wrapper.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-content {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.form-header {
    margin-bottom: 35px;
    text-align: center;
}

.form-header h2 {
    font-size: 28px;
    color: var(--text-main);
    margin-bottom: 8px;
    font-weight: 700;
}

.form-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Form Group */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper>i {
    position: absolute;
    left: 15px;
    color: var(--border-color);
    font-size: 16px;
    pointer-events: none;
    transition: var(--transition);
}

.input-wrapper input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--input-bg);
    color: var(--text-main);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--container-bg);
    box-shadow: 0 0 0 3px rgba(255, 107, 43, 0.1);
}

.input-wrapper input:focus+i,
.input-wrapper input:not(:placeholder-shown)+i {
    color: var(--primary-color);
}

.toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 16px;
    padding: 5px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* Error Message */
.error-message {
    display: block;
    color: var(--error-color);
    font-size: 12px;
    margin-top: 5px;
    min-height: 16px;
    animation: shake 0.3s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.password-strength::after {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    transition: var(--transition);
}

.password-strength.weak::after {
    width: 33%;
    background: var(--error-color);
}

.password-strength.fair::after {
    width: 66%;
    background: var(--warning-color);
}

.password-strength.strong::after {
    width: 100%;
    background: var(--success-color);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    gap: 10px;
    flex-wrap: wrap;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-main);
    user-select: none;
}

.checkbox-wrapper input {
    display: none;
}

.checkbox-wrapper .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.checkbox-wrapper input:checked+.checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.checkbox-wrapper input:checked+.checkmark::after {
    content: '✓';
    font-size: 12px;
    font-weight: bold;
}

.checkbox-wrapper a {
    color: var(--primary-color);
    text-decoration: none;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Form Divider */
.form-divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.form-divider span {
    padding: 0 15px;
}

/* Social Login */
.social-login {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
    justify-content: center;
    align-items: center;
}

.social-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-color);
    background: var(--container-bg);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    font-size: 20px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-btn:hover {
    border-color: var(--primary-color);
    background: var(--container-bg);
    color: var(--primary-color);
}

.social-btn.google:hover {
    color: #db4437;
}

.social-btn.github:hover {
    color: #333;
}

.social-btn.facebook:hover {
    color: #1877f2;
}

/* Form Footer */
.form-footer {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.form-footer p {
    margin: 0;
}

.switch-form {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
}

.switch-form:hover {
    text-decoration: underline;
}

/* Success Modal */
.success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.success-modal.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.success-content {
    background: var(--container-bg);
    padding: 50px 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    animation: scaleIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-content i {
    font-size: 60px;
    color: var(--success-color);
    margin-bottom: 20px;
    display: block;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {

    0%,
    100% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.1);
    }
}

.success-content h3 {
    color: var(--text-main);
    font-size: 24px;
    margin-bottom: 10px;
}

.success-content p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-brand {
        display: none;
    }

    .auth-forms {
        padding: 40px 25px;
    }

    .form-header h2 {
        font-size: 24px;
    }

    .brand-features {
        display: none;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .social-login {
        gap: 10px;
    }

    .social-btn {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .auth-forms {
        padding: 30px 15px;
    }

    .form-header {
        margin-bottom: 25px;
    }

    .form-header h2 {
        font-size: 20px;
    }

    .form-header p {
        font-size: 13px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-divider {
        margin: 20px 0;
    }

    .success-content {
        padding: 40px 25px;
        max-width: 90%;
    }

    .success-content i {
        font-size: 48px;
    }

    .success-content h3 {
        font-size: 20px;
    }
}