:root {
    --primary-red: #FE5757;
    --dark-blue: #132d4d;
    --light-red: #fe8a8a;
    --bright-red: #fe2424;
    --medium-blue: #1d4576;
    --very-dark-blue: #091524;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --gray: #e9ecef;
    --text-dark: #2d3748;
    --text-light: #718096;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--very-dark-blue) 0%, var(--dark-blue) 50%, var(--medium-blue) 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.login-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.login-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    width: 50%;
}

.image-section {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 50%;
}

.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(19, 45, 77, 0.85) 0%, rgba(29, 69, 118, 0.75) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.overlay-content {
    text-align: center;
    color: var(--white);
    max-width: 400px;
}

.overlay-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.overlay-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
}

.feature sl-icon {
    color: var(--primary-red);
    font-size: 1.25rem;
}

.login-card {
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin: 0;
}

.login-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

.login-form h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.social-btn {
    width: 100%;
    --sl-button-font-size-large: 0.95rem;
    --sl-button-height-large: 3.25rem;
    transition: all 0.3s ease;
}

.social-btn::part(base) {
    border: 2px solid var(--gray);
    color: var(--text-dark);
    background: var(--white);
    font-weight: 500;
    border-radius: 12px;
}

.social-btn:hover::part(base) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.google-btn:hover::part(base) {
    border-color: #4285f4;
    box-shadow: 0 8px 25px rgba(66, 133, 244, 0.2);
}

.microsoft-btn:hover::part(base) {
    border-color: #0078d4;
    box-shadow: 0 8px 25px rgba(0, 120, 212, 0.2);
}

.apple-btn:hover::part(base) {
    border-color: #000000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.facebook-btn:hover::part(base) {
    border-color: #1877f2;
    box-shadow: 0 8px 25px rgba(24, 119, 242, 0.2);
}

.amazon-btn:hover::part(base) {
    border-color: #ff9900;
    box-shadow: 0 8px 25px rgba(255, 153, 0, 0.2);
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-red);
}

.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-red), var(--light-red));
    opacity: 0.08;
    animation: float 25s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 70%;
    left: 15%;
    animation-delay: -8s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    top: 30%;
    left: 25%;
    animation-delay: -15s;
}

.shape-4 {
    width: 80px;
    height: 80px;
    top: 50%;
    left: 10%;
    animation-delay: -20s;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0) rotate(0deg) scale(1); 
    }
    25% { 
        transform: translateY(-30px) rotate(90deg) scale(1.1); 
    }
    50% { 
        transform: translateY(-15px) rotate(180deg) scale(0.9); 
    }
    75% { 
        transform: translateY(-45px) rotate(270deg) scale(1.05); 
    }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }
    
    .image-section {
        display: none;
    }
    
    .login-section {
        width: 100%;
        padding: 1.5rem;
    }
    
    .login-card {
        padding: 2rem;
        border-radius: 16px;
    }
    
    .logo h1 {
        font-size: 1.75rem;
    }
    
    .login-header h2 {
        font-size: 1.25rem;
    }
    
    .social-btn {
        --sl-button-height-large: 3rem;
        --sl-button-font-size-large: 0.9rem;
    }
    
    .footer-links {
        gap: 1.5rem;
    }
    
    .shape {
        opacity: 0.05;
    }
    
    .shape-1, .shape-2 {
        width: 120px;
        height: 120px;
    }
    
    .shape-3, .shape-4 {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .login-header {
        margin-bottom: 2rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .overlay-content h3 {
        font-size: 1.5rem;
    }
    
    .overlay-content p {
        font-size: 1rem;
    }
}

/* Loading animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Custom Shoelace component styling */
sl-button::part(base) {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

sl-button:active::part(base) {
    transform: translateY(0) !important;
}

/* Base layout: two columns, both vertically centered */
html, body {
  height: 100%;
  margin: 0;
}

.login-container {
  display: flex;
  flex-direction: row;
  height: 100vh; /* ensure exact viewport height for centering */
}

.login-section,
.image-section {
  flex: 1 1 50%;
  display: flex;
  align-items: center;   /* vertical centering */
  justify-content: center; /* horizontal centering */
  min-height: 100vh;     /* make each pane fill the viewport height */
}

.login-card {
  width: 100%;
  max-width: 420px;                 /* nice readable width */
  padding: 1rem;
}

.image-container {
  position: relative;
  width: 100%;
  height: 100vh;  /* fill the viewport height */
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;    /* fill and crop as needed */
  object-position: center;
}

/* Shoelace social buttons full-width on narrow cards (optional) */
.social-buttons sl-button {
  width: 100%;
}

/* ---------- Responsive: stack vertically on small screens ---------- */
@media (max-width: 900px) {
  .login-container {
    flex-direction: column;  /* stack */
    height: auto;            /* allow the page to grow vertically */
    min-height: 100vh;       /* but at least fill the viewport */
  }

  .login-section {
    order: 1;            /* form first */
    padding: 2rem 1rem;
    min-height: auto;    /* stop inheriting 100vh from base */
  }

  .image-section {
    order: 2;            /* image second */
    height: 40vh;        /* balanced height on small screens */
    min-height: 260px;
  }

  .image-container, .image-section {
    width: 100%;
  }
  .image-container {
    height: 100%; /* override global 100vh so it doesn't overlap the form */
  }

  .hero-image {
    max-height: 100%;
  }
}

/* Extra-small tweaks */
@media (max-width: 480px) {
  .login-card {
    max-width: 100%;
    padding: 0.75rem;
  }
}