/* ========================================
   WELCOME PAGE - MOBILE-FIRST RESPONSIVE
   ======================================== */

/* ========================================
   BASE STYLES - MOBILE FIRST (320px+)
   ======================================== */

* {
  box-sizing: border-box;
}

.welcome-container {
  width: 100%;
  min-height: 100vh;
  background:
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("/static/img/bg.jpg") no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  padding: 15px;
  font-family: var(--font-family, 'Comfortaa', sans-serif);
  overflow-x: hidden;
  box-sizing: border-box;
  margin: 0;
  border: none;
}

/* Optimized background for high-resolution displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
  .welcome-container {
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
      url("/static/img/bg.jpg");
  }
}

/* Enhanced background positioning for different aspect ratios */
@media (max-aspect-ratio: 4/3) {
  .welcome-container {
    background-size: cover;
    background-position: center top;
  }
}

@media (min-aspect-ratio: 16/9) {
  .welcome-container {
    background-size: cover;
    background-position: center center;
  }
}

/* ========================================
   HEADER SECTION - LOGO
   ======================================== */

.welcome-header {
  flex-shrink: 0;
  margin-bottom: 20px;
}

.logo-container {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.app-logo {
  height: 4rem;
  width: auto;
  object-fit: contain;
}

/* ========================================
   MAIN CONTENT SECTION
   ======================================== */

.welcome-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

/* Main Title */
.welcome-title {
  text-align: center;
}

.welcome-title h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: white !important;
  line-height: 1.2;
  margin: 0 0 15px 0;
  font-family: var(--font-family, 'Comfortaa', sans-serif);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
  word-wrap: break-word;
  hyphens: auto;
}

.welcome-title p {
  font-size: 0.9rem;
  color: white !important;
  line-height: 1.4;
  margin: 0;
  font-weight: 500;
  font-family: var(--font-family, 'Comfortaa', sans-serif);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  word-wrap: break-word;
}

/* Legal Disclaimer */
.legal-disclaimer {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 15px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-height: 40vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.legal-disclaimer h4 {
  font-weight: 700;
  margin: 0 0 10px 0;
  font-size: 0.85rem;
  color: white !important;
  font-family: var(--font-family, 'Comfortaa', sans-serif);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.disclaimer-content {
  color: white !important;
  line-height: 1.4;
  font-family: var(--font-family, 'Comfortaa', sans-serif);
}

.disclaimer-content p {
  margin: 0 0 8px 0;
  font-weight: 400;
  font-size: 0.75rem;
  color: white !important;
  opacity: 0.95;
  word-wrap: break-word;
  hyphens: auto;
}

/* ========================================
   FOOTER SECTION - ACCEPT BUTTON
   ======================================== */

.welcome-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding-top: 10px;
}

.accept-btn {
  background: #485380;
  color: white !important;
  border: none;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-family, 'Comfortaa', sans-serif);
  cursor: pointer;
  border-radius: 6px;
  text-transform: none;
  box-shadow: 0 3px 12px rgba(72, 83, 128, 0.3);
  transition: all 0.3s ease;
  min-height: 44px;
  min-width: 120px;
  touch-action: manipulation;
}

.accept-btn:hover,
.accept-btn:focus {
  background: #e9bfc9;
  color: #485380 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(233, 191, 201, 0.4);
  outline: none;
}

.accept-btn:active {
  transform: translateY(0);
}

/* ========================================
   SMALL MOBILE (up to 360px)
   ======================================== */

@media (max-width: 360px) {
  .welcome-container {
    padding: 12px;
    width: 100%;
    max-width: 100%;
  }

  .app-logo {
    height: 3rem;
  }

  .welcome-title h1 {
    font-size: 1.3rem;
  }

  .welcome-title p {
    font-size: 0.8rem;
  }

  .legal-disclaimer {
    padding: 12px;
  }

  .disclaimer-content p {
    font-size: 0.7rem;
  }

  .accept-btn {
    padding: 10px 25px;
    font-size: 0.9rem;
  }
}

/* ========================================
   LARGE MOBILE (480px+)
   ======================================== */

@media (min-width: 480px) {
  .welcome-container {
    padding: 20px;
    width: 100%;
    max-width: 100%;
  }

  .app-logo {
    height: 4.5rem;
  }

  .welcome-title h1 {
    font-size: 1.8rem;
  }

  .welcome-title p {
    font-size: 1rem;
  }

  .legal-disclaimer {
    padding: 18px;
  }

  .disclaimer-content p {
    font-size: 0.8rem;
  }

  .accept-btn {
    padding: 14px 35px;
    font-size: 1.1rem;
  }
}

/* ========================================
   TABLET PORTRAIT (768px+)
   ======================================== */

@media (min-width: 768px) {
  .welcome-container {
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
    background-attachment: fixed;
    width: 100%;
  }

  .welcome-content {
    gap: 30px;
  }

  .app-logo {
    height: 5rem;
  }

  .welcome-title h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
  }

  .welcome-title p {
    font-size: 1.1rem;
  }

  .legal-disclaimer {
    padding: 20px;
    max-height: 50vh;
  }

  .disclaimer-content p {
    font-size: 0.85rem;
  }

  .accept-btn {
    padding: 16px 40px;
    font-size: 1.2rem;
  }
}

/* ========================================
   TABLET LANDSCAPE / SMALL DESKTOP (1024px+)
   ======================================== */

@media (min-width: 1024px) {
  .welcome-container {
    padding: 40px;
    max-width: 1200px;
    flex-direction: row;
    align-items: stretch;
    gap: 40px;
    background-attachment: fixed;
    background-position: center center;
    background-size: cover;
  }

  .welcome-header {
    flex: 0 0 200px;
    margin-bottom: 0;
  }

  .welcome-content {
    flex: 1;
    gap: 40px;
  }

  .welcome-footer {
    flex: 0 0 200px;
    align-items: flex-end;
    padding-top: 0;
  }

  .app-logo {
    height: 6rem;
  }

  .welcome-title {
    text-align: left;
  }

  .welcome-title h1 {
    font-size: 2.8rem;
    margin-bottom: 25px;
  }

  .welcome-title p {
    font-size: 1.3rem;
  }

  .legal-disclaimer {
    padding: 25px;
  }

  .disclaimer-content p {
    font-size: 0.9rem;
  }

  .accept-btn {
    padding: 18px 45px;
    font-size: 1.3rem;
  }
}

/* ========================================
   LARGE DESKTOP (1440px+)
   ======================================== */

@media (min-width: 1440px) {
  .welcome-container {
    padding: 50px;
    max-width: 1400px;
    background-attachment: fixed;
    background-position: center center;
    background-size: cover;
  }

  .welcome-title h1 {
    font-size: 3.2rem;
    margin-bottom: 30px;
  }

  .welcome-title p {
    font-size: 1.4rem;
  }
}

/* Ultra-wide and 4K displays optimization */
@media (min-width: 1600px) {
  .welcome-container {
    max-width: 1600px;
    padding: 60px;
    background-size: cover;
    background-position: center center;
  }

  .welcome-title h1 {
    font-size: 3.5rem;
  }

  .welcome-title p {
    font-size: 1.5rem;
  }

  .legal-disclaimer {
    max-width: 1000px;
    margin: 0 auto;
  }
}

/* ========================================
   LANDSCAPE ORIENTATION (Mobile)
   ======================================== */

@media (max-width: 768px) and (orientation: landscape) {
  .welcome-container {
    padding: 10px 15px;
    background-attachment: scroll;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
  }

  .welcome-content {
    gap: 15px;
  }

  .welcome-title h1 {
    font-size: 1.3rem;
    margin-bottom: 10px;
  }

  .welcome-title p {
    font-size: 0.8rem;
  }

  .legal-disclaimer {
    max-height: 30vh;
    padding: 12px;
  }

  .disclaimer-content p {
    font-size: 0.7rem;
    margin-bottom: 6px;
  }

  .accept-btn {
    padding: 10px 25px;
    font-size: 0.9rem;
  }
}

/* ========================================
   ACCESSIBILITY & TOUCH IMPROVEMENTS
   ======================================== */

/* Focus styles for accessibility */
.accept-btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* Ensure proper touch targets */
@media (pointer: coarse) {
  .accept-btn {
    min-height: 48px;
    min-width: 48px;
  }
}

/* Scrollbar styling for webkit browsers */
.legal-disclaimer::-webkit-scrollbar {
  width: 4px;
}

.legal-disclaimer::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.legal-disclaimer::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.legal-disclaimer::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Prevent text selection on touch devices */
@media (pointer: coarse) {
  .welcome-title h1,
  .welcome-title p {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
}