/* Keyframe animations for dynamic effects */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7f7f7; 
    overflow-x: hidden; /* Prevent horizontal scrollbars */
}

.header-container {
    animation: fadeInDown 0.8s ease-out;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo {
    height: 45px; /* Adjust height for better fit */
    width: auto; /* Allow width to adjust based on aspect ratio */
    border-radius: 0; /* Remove the circular border */
    margin-right: 10px;
}

.site-name {
    font-size: 1.5em;
    font-weight: bold;
    color: #8C2224;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    position: relative;
    font-weight: 600;
    transition: color 0.3s ease;
    padding-bottom: 5px;
}

.nav-links a:hover {
    color: #8C2224;
}

.nav-links .active {
    color: #8C2224;
    border-bottom: 2px solid #8C2224;
}

/* Underline effect for nav links on hover */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #8C2224;
    transition: width 0.4s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.auth-buttons {
    display: flex;
    border: 2px solid #8C2224;
    border-radius: 50px;
    overflow: hidden;
}

.auth-buttons button {
    border: none;
    padding: 10px 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
}

#register-btn {
    background-color: #8C2224;
    color: #fff;
}

#login-btn {
    background-color: #fff;
    color: #8C2224;
}

.auth-buttons.login-active #register-btn {
    background-color: #fff;
    color: #8C2224;
}

.auth-buttons.login-active #login-btn {
    background-color: #8C2224;
    color: #fff;
}

.hero-section {
    position: relative;
    min-height: 90vh; /* Restore the minimum height to fill the screen */
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: left;
    margin-bottom: 320px; /* Space for card (220px) + footer (100px) */
}

.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Places the image at the back */
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the full area without distortion */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(140, 34, 36, 0.5); /* Semi-transparent maroon overlay */
    z-index: 1; /* Places the overlay above the image */
}

.hero-content {
    position: absolute;
    top: 20%;
    left: 10%;
    max-width: 500px;
    z-index: 2; /* Ensures text content is on top */
    animation: fadeInUp 1s ease-out 0.5s;
    animation-fill-mode: both; /* Keeps the state of the animation after it's done */
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    animation: fadeInUp 1s ease-out 0.7s;
    animation-fill-mode: both;
}

.hero-content p {
    font-size: 1.2rem;
    font-weight: 400;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: #fff;
    color: #8C2224;
    padding: 15px 30px;
    font-weight: bold;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Registration Card Styling */
.registration-card {
    position: absolute;
    bottom: -220px; /* Match the margin-bottom adjustment */
    right: 10%;
    transform: translateX(0);
    z-index: 3;
    display: flex;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px); /* Frosted glass effect */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    height: 450px;
    width: 90%;    max-width: 800px;
    animation: fadeInUp 1s ease-out 0.3s;
    animation-fill-mode: both;
}

.card-image {
    width: 50%;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-form {
    width: 50%;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.form-tabs {
    display: flex;
    margin-bottom: 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 4px;
    gap: 2px;
}

.tab-btn {
    flex: 1;
    padding: 8px 4px;
    border: none;
    background-color: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #666;
}

.tab-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.tab-text {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-btn.active {
    background-color: #8C2224;
    color: white;
    box-shadow: 0 2px 8px rgba(140, 34, 36, 0.25);
    transform: translateY(-1px);
}

.tab-btn.active .tab-icon {
    transform: scale(1.1);
}

.tab-btn:hover:not(.active) {
    background-color: #e9ecef;
    color: #495057;
}

/* Smooth transition for view switching */
#register-view, #login-view, #email-login-view {
    animation: fadeIn 0.5s ease;
}



.card-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 10px 0; /* Removed negative margin to fix alignment */
    color: #333;
    white-space: normal; /* Allow title to wrap */
}

.card-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 20px;
}

.card-form label {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 5px;
    font-weight: 600;
}

.phone-input-group {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;    
    width: 100%; /* Make input group full width of the form padding */
    margin-bottom: 20px;
}

.country-code {
    background-color: #f0f0f0;
    padding: 12px;
    border-right: 1px solid #ccc;
    color: #666;
    font-weight: 600;
}

.phone-input-group input {
    width: 100%;
    border: none;
    padding: 12px;
    outline: none;
    font-size: 1rem;
}

/* Form group styling for login */
.form-group {
    margin-bottom: 20px;
    width: 100%;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 12px;
    outline: none;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    border-color: #8C2224;
    box-shadow: 0 0 0 2px rgba(140, 34, 36, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

.btn-otp {
    width: 100%;
    background-color: #8C2224;
    color: #fff;
    padding: 15px;
    font-size: 1.1rem;
    width: 100%; /* Make button full width */
    border-radius: 25px;
    margin-top: auto; /* Pushes the button to the bottom */
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-otp:hover {
    background-color: #a1282a;
    transform: scale(1.02);
}

.or-separator {
    text-align: center;
    position: relative;
    width: 80%;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.or-separator::before,
.or-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background-color: #ddd;
}

.or-separator::before {
    left: 0;
}

.or-separator::after {
    right: 0;
}

.btn-email {
    width: 80%;
    background-color: #fff;
    color: gray;
    border: 1px solid #ccc;
    padding: 15px;
    font-size: 1.0rem;
    text-transform: none;
    font-weight:100;
    border-radius: 25px;
}

.terms-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: #999;
    margin-top: 20px;
    text-align: center;
}

.modal-overlay {
  display: none; /* hidden by default */
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-box {
  background: #fff;
  padding: 20px;
  width: 320px;
  border-radius: 12px;
  text-align: center;
  animation: fadeInUp 0.3s ease;
}

.modal-box h3 {
  margin-bottom: 10px;
  color: #333;
}

.modal-box p {
  margin-bottom: 20px;
  font-size: 14px;
  color: #555;
}

.modal-actions {
  display: flex;
  justify-content: space-around;
}

.btn-primary {
  background: #ff4d6d;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-secondary {
  background: #eee;
  color: #333;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-primary:hover {
  background: #e63e5c;
}
.btn-secondary:hover {
  background: #ddd;
}

/* --- Overlay Screen Styles --- */
.overlay-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none; /* Initially hidden */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.overlay-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.4s ease;
}

.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #882b53, #9f1e58);
    color: white;
}

.overlay-header h2 {
    margin: 0;
    font-size: 24px;
}

.overlay-close {
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 0;
}

.overlay-body {
    padding: 30px;
    overflow-y: auto;
    line-height: 1.6;
    color: #333;
}

/* --- MOBILE RESPONSIVE STYLES for Login Page --- */
@media (max-width: 768px) {
    body {
        padding-bottom: 0; /* Remove if you had any */
    }

    .hero-section {
        min-height: auto; /* Let content define height */
        padding: 20px 15px 40px; /* Bottom padding for spacing */
        flex-direction: column;
        justify-content: flex-start;
        margin-bottom: 0; /* No margin needed on mobile */
        background: linear-gradient(135deg, #f9dce5, #fce4ec); /* Simple gradient background for mobile */
    }

    /* Hide desktop-specific hero elements */
    .hero-image-container,
    .hero-overlay {
        display: none;
    }

    .hero-content {
        position: static; /* Remove absolute positioning */
        text-align: center;
        color: #333; /* Change text color for light background */
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        color: #8C2224;
    }

    .registration-card {
        position: static; /* Remove relative positioning from desktop */
        flex-direction: column;
        width: 90%;
        max-width: 400px;
        margin: 30px auto 80px; /* 80px bottom margin for footer space */
        right: auto; /* Reset desktop right positioning */
        bottom: auto; /* Reset desktop bottom positioning */
        transform: none; /* Reset desktop transform to fix centering on mobile */
        height: auto; /* Allow height to be determined by content */
    }

    .registration-card .card-image {
        display: none; /* Hide the image on mobile */
    }

    .registration-card .card-form {
        width: 100%; /* Form takes full width of the card */
        padding: 25px;
    }

    .phone-input-group,
    .btn-otp {
        width: 100%; /* Make form elements full-width */
    }
}
