/* Base styles */
:root {
    --primary-color: #0047CC;
    --primary-light: #3367D6;
    --primary-dark: #003399;
    --text-color: #333333;
    --text-light: #666666;
    --gray-light: #F5F5F5;
    --gray-medium: #E0E0E0;
    --white: #FFFFFF;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Login Section */
.login-section {
    width: 50%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem 1rem 1rem;
    position: relative;
}

.register-page .login-section {
  overflow-y: auto;
  padding-top: 12rem;
}

.logo {
    position: fixed;
    top: 0;
    left: 0;
    width: 50%;
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    background-color: white;
    border-bottom: 1px solid #ddd;
    z-index: 1000;
}

.login-container {
    width: 100%;
    max-width: 480px;
    padding: 5rem 1rem 1rem 1rem;
}

.logo-img {
    height: 40px;
    object-fit: cover;
    margin-right: 10px;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.5px;
    margin-right: 8px;
}

.logo-subtext {
    font-size: 0.9rem;
    color: var(--text-light);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.welcome-text {
    margin-bottom: 2rem;
}

.welcome-text h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1.3;
}

.welcome-text p {
    color: var(--text-light);
    font-size: 0.95rem;
    max-width: 90%;
}

.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--gray-medium);
    border-radius: 4px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 71, 204, 0.1);
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--primary-color);
}

.captcha-container {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.captcha-img {
    height: 50px;
    width: 180px;
    object-fit: cover;
    border: 1px solid var(--gray-medium);
    border-radius: 4px;
}

.refresh-captcha {
    background: none;
    border: none;
    margin-left: 10px;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.refresh-captcha:hover {
    color: var(--primary-color);
}

.checkbox-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.9rem;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  height: 0;
  width: 0;
  cursor: pointer;
}

.checkmark {
  height: 18px;
  width: 18px;
  background-color: var(--white);
  border: 1px solid var(--gray-medium);
  border-radius: 3px;
  margin-right: 8px;
  position: relative;
  flex-shrink: 0;
}

.checkbox-container input:checked + .checkmark {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.checkmark::after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked + .checkmark::after {
  display: block;
}

.label-text {
  line-height: 1;
}

.forgot-password {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--primary-color);
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-button {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    padding: 0.9rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.login-button:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(0, 71, 204, 0.2);
}

input.is-invalid {
    border: 2px solid #e74c3c;
    background-color: #fdecea;
    outline: none;
}

.invalid-feedback {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 4px;
    font-weight: 600;
}

.invalid-feedback.d-block {
    display: block;
    margin-top: 4px;
}

.text-center {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.text-center a {
    color: #007BFF;
    text-decoration: none;
}

.text-center a:hover {
    text-decoration: underline;
}

/* Feature Section */
.feature-section {
    width: 50%;
    height: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: auto;
}

.feature-carousel {
    position: relative;
    height: 100%;
    width: 100%;
}

.feature-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-slide.active {
    opacity: 1;
    visibility: visible;
}

.feature-content {
    padding: 3rem;
    max-width: 90%;
    text-align: center;
    height: 100vh;
}

.feature-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.feature-content p {
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    opacity: 0.9;
}

.feature-image {
    max-width: 300px;
    margin: 0 auto 2rem;
}

.feature-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.bus-info {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 320px;
    margin: 0 auto;
}

.bus-status {
    display: flex;
    align-items: center;
}

.status-dot {
    width: 12px;
    height: 12px;
    background-color: #4ADE80;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
}

.status-dot:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(74, 222, 128, 0.3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}

.bus-details h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.bus-details p {
    font-size: 0.85rem;
    margin-bottom: 0;
    opacity: 0.8;
}

.bus-arrival {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.carousel-controls {
    position: absolute;
    bottom: 2rem;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.prev-btn, .next-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: var(--transition);
}

.prev-btn:hover, .next-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.carousel-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: white;
    width: 24px;
    border-radius: 4px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }

    .logo {
        width: 100%;
    }

    .feature-section {
        display: none !important;
    }
    
    .login-section,
    .feature-section {
        width: 100%;
        height: auto;
    }

    .login-section {
        padding: 2rem 1rem;
    }

    .register-page .login-section {
        padding-top: 2rem;
    }
    
    .feature-section {
        min-height: 50vh;
    }

    .feature-content {
        padding: 2rem 1.5rem;
    }

    .feature-content h2 {
        font-size: 1.8rem;
    }

    .feature-content p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }

    .container {
        flex-direction: column;
    }

    .login-section {
        width: 100%;
        padding: 1rem 1rem;
    }

    .register-page .login-section
    {
        padding-top: 15rem;
    }

    .logo {
        width: 100%;
    }

    .feature-section {
        display: none !important;
    }

    .welcome-text h2 {
        font-size: 1.5rem;
    }

    .bus-info {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .feature-image {
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.5rem;
    }

    .logo-subtext {
        font-size: 0.8rem;
    }

    .logo {
        width: 100%;
    }

    .feature-section {
        display: none !important;
    }

    .welcome-text h2 {
        font-size: 1.3rem;
    }

    .welcome-text p {
        font-size: 0.9rem;
    }

    .feature-content h2 {
        font-size: 1.5rem;
    }

    .feature-content p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .feature-image {
        max-width: 200px;
    }

    .feature-section {
        display: none !important;
    }
}