/* WELCOME MODAL - ABSOLUTE NO-OVERLAP VERSION */

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

.welcome-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
}

.welcome-modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.welcome-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1;
}

.welcome-modal-content {
  position: relative;
  z-index: 2;
  background: linear-gradient(135deg, rgba(77, 77, 77, 0.98), rgba(77, 77, 77, 0.95));
  border: 2px solid #7D7D7D;
  border-radius: 16px;
  width: 100%;
  max-width: 450px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

/* HEADER */
.welcome-modal .welcome-header {
  padding: 16px 50px 16px 16px;
  border-bottom: 2px solid rgba(125, 125, 125, 0.3);
  position: relative;
}

.welcome-modal .welcome-header h2 {
  font-family: 'Staatliches', sans-serif;
  font-size: 19px;
  color: #FFFFFF;
  letter-spacing: 1px;
  line-height: 1.3;
  margin: 0;
  padding: 0;
}

.welcome-modal .welcome-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 22px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.welcome-modal .welcome-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* BODY */
.welcome-modal .welcome-body {
  padding: 14px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* SECTIONS - CRITICAL: Must be more specific than dashboard .welcome-section */
.welcome-modal .welcome-body .welcome-section {
  margin-bottom: 12px !important;
  padding: 12px !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(125, 125, 125, 0.3) !important;
  border-radius: 12px !important;
  display: block !important;
  height: auto !important;
  text-align: left !important;
}

.welcome-modal .welcome-body .welcome-section:last-child {
  margin-bottom: 0 !important;
}

.welcome-modal .welcome-body .welcome-section h3 {
  font-family: 'Staatliches', sans-serif;
  font-size: 15px;
  color: #FFFFFF;
  letter-spacing: 0.5px;
  line-height: 1.3;
  margin: 0 0 10px 0;
  padding: 0;
}

/* LISTS - CRITICAL SPACING */
.welcome-modal .welcome-body .welcome-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.welcome-modal .welcome-body .welcome-section ul li {
  color: #E0E0E0;
  font-size: 11px;
  line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  margin: 0 0 8px 0;
  padding: 0 0 0 16px;
  position: static !important;
  display: block;
  clear: both;
  min-height: 16px;
}

.welcome-modal .welcome-body .welcome-section ul li:last-child {
  margin-bottom: 0;
}

.welcome-modal .welcome-body .welcome-section ul li:before {
  content: '▸ ';
  color: #B0B0B0;
  margin-right: 4px;
  font-size: 11px;
  display: inline;
  position: static;
}

.welcome-modal .welcome-body .welcome-section ul li strong {
  color: #FFFFFF;
  font-weight: 600;
}

/* WARNING SECTION */
.welcome-modal .welcome-body .welcome-section.warning {
  background: rgba(255, 152, 0, 0.1) !important;
  border-color: rgba(255, 152, 0, 0.3) !important;
}

.welcome-modal .welcome-body .welcome-section.warning h3 {
  color: #FFA726;
}

.welcome-modal .welcome-body .welcome-section.warning p {
  color: #FFE0B2;
  font-size: 11px;
  line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* FOOTER */
.welcome-modal .welcome-footer {
  padding: 14px;
  border-top: 2px solid rgba(125, 125, 125, 0.3);
  flex-shrink: 0;
}

.welcome-modal .dont-show-again {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #B0B0B0;
  font-size: 11px;
  cursor: pointer;
  user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.welcome-modal .dont-show-again input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #FFFFFF;
  flex-shrink: 0;
  margin: 0;
}

.welcome-modal .welcome-start-btn {
  width: 100%;
  padding: 12px 18px;
  background: #FFFFFF;
  border: 2px solid #FFFFFF;
  border-radius: 12px;
  color: #000000;
  font-family: 'Staatliches', sans-serif;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1.5px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
  display: block;
  margin: 0;
}

.welcome-modal .welcome-start-btn:hover {
  background: #E0E0E0;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.welcome-modal {
  animation: fadeIn 0.3s ease;
}

.welcome-modal-content {
  animation: slideUp 0.4s ease;
}

/* Scrollbar */
.welcome-modal .welcome-body::-webkit-scrollbar {
  width: 5px;
}

.welcome-modal .welcome-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

.welcome-modal .welcome-body::-webkit-scrollbar-thumb {
  background: rgba(176, 176, 176, 0.5);
  border-radius: 10px;
}

/* Mobile */
@media (max-width: 600px) {
  .welcome-modal.active {
    padding: 12px;
  }
  
  .welcome-modal-content {
    max-width: 100%;
  }
}