* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background-image: url('/Images/white_beach.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Back Arrow Button */
.back-arrow-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: #374151;
    text-decoration: none;
    font-size: 1rem;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.back-arrow-btn:hover {
    background: rgba(255, 255, 255, 1);
    color: #dc2626;
    transform: translateX(-2px) scale(1.05);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(220, 38, 38, 0.1);
}

.back-arrow-btn:active {
    transform: translateX(-1px) scale(1);
}

@media (max-width: 768px) {
    .back-arrow-btn {
        top: 15px;
        left: 15px;
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .back-arrow-btn {
        top: 12px;
        left: 12px;
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

.login-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.container {
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.8s ease-out;
}

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

.card {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.login-card {
    max-width: 500px;
    border-radius: 24px;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 32px 64px -12px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeInDown 0.8s ease-out 0.2s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header .logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.login-header .logo:hover {
    transform: scale(1.05);
}

.login-header h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.login-header p {
    color: #64748b;
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
}

.form-group {
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.form-group:nth-child(2) {
    animation-delay: 0.5s;
}

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

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    color: #374151;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(248, 250, 252, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    position: relative;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.1),
        0 4px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.form-control:hover {
    border-color: #cbd5e1;
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.form-control.error {
    border-color: #ef4444;
    background: rgba(254, 242, 242, 0.9);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-control.success {
    border-color: #10b981;
    background: rgba(240, 253, 244, 0.9);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

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

.password-toggle-icon {
    position: absolute;
    right: 20px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    padding: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.password-toggle-icon:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

.password-toggle-icon.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.15);
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 
        0 8px 32px rgba(220, 38, 38, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(220, 38, 38, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.btn-login:active {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(220, 38, 38, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.btn-login.loading {
    pointer-events: none;
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-login.loading .btn-text {
    display: none;
}

.btn-login.loading .btn-loading {
    display: inline;
}

.btn-loading {
    display: none;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 3px solid transparent;
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.forgot-password {
    text-align: center;
    margin-top: 2rem;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.forgot-password a {
    color: #dc2626;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    position: relative;
    display: inline-block;
}

.forgot-password a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.forgot-password a:hover {
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.1);
    transform: translateY(-2px);
}

.forgot-password a:hover::before {
    width: 100%;
}

@media (max-width: 768px) {
    .login-section {
        padding: 15px;
    }

    .card {
        padding: 2.5rem 2rem;
        border-radius: 20px;
    }

    .login-header h2 {
        font-size: 2rem;
    }

    .login-header p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .login-section {
        padding: 10px;
    }

    .card {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .login-header h2 {
        font-size: 1.75rem;
    }

    .login-header p {
        font-size: 0.95rem;
    }

    .form-control {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .btn-login {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .password-toggle-icon {
        right: 15px;
        font-size: 1.1rem;
        padding: 6px;
    }
}

@media (max-width: 320px) {
    .card {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }

    .login-header p {
        font-size: 0.9rem;
    }

    .form-control {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }

    .btn-login {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Form Switch Styling */
.form-switch {
    text-align: center;
    margin-top: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.form-switch p {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
}

.form-switch a {
    color: #dc2626;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    display: inline-block;
}

.form-switch a:hover {
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.1);
    transform: translateY(-1px);
}

/* Forgot Password Link Styling */
.forgot-password-link {
    text-align: right;
    margin-bottom: 1rem;
    margin-top: -0.5rem;
}

.forgot-password-link a {
    color: #dc2626;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    display: inline-block;
}

.forgot-password-link a:hover {
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.1);
    transform: translateY(-1px);
}

/* Form Text Helper */
.form-text {
    display: block;
    margin-top: 0.5rem;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 400;
}

/* Terms and Conditions Checkbox Styling */
.terms-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.terms-checkbox-wrapper:hover {
    border-color: #cbd5e1;
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.terms-checkbox-wrapper.error {
    border-color: #ef4444;
    background: rgba(254, 242, 242, 0.9);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.terms-checkbox {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #dc2626;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.terms-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.terms-label {
    display: block;
    color: #374151;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

.terms-link {
    color: #dc2626;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid transparent;
}

.terms-link:hover {
    color: #b91c1c;
    border-bottom-color: #b91c1c;
}

.terms-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    margin-left: 0.25rem;
    font-weight: 500;
    min-height: 1.2rem;
}