.welcome-container {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: calc(100vh - 50px); /* Subtract title bar height */
  overflow: hidden;
  background: var(--bg-primary);
}


.welcome-sidebar {
  width: 350px;
  background: var(--bg-primary);
  border: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.welcome-header {
  margin-bottom: 2rem;
  padding: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  position: relative;
  z-index: 1;
}

/* Remove background from logo container when logged out */
body.logged-out .welcome-header {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.welcome-header img {
  width: 120px;
  height: 120px;
  margin-bottom: 1rem;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.welcome-header h1 {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.welcome-header p {
  font-size: 1.2rem;
  color: var(--text-primary);
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto;
}

.welcome-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  width: 100%;
  padding: 0 1rem;
  flex: 1;
}

/* Staggered animation for feature cards */
.feature-card:nth-child(1) {
  animation: slideInUp 0.6s ease-out 0.1s both;
}

.feature-card:nth-child(2) {
  animation: slideInUp 0.6s ease-out 0.2s both;
}

.feature-card:nth-child(3) {
  animation: slideInUp 0.6s ease-out 0.3s both;
}

.feature-card:nth-child(4) {
  animation: slideInUp 0.6s ease-out 0.4s both;
}

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

.feature-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  text-align: left;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #5B8FFF, #7BA3FF) !important;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  border-color: #5B8FFF !important;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:active {
  transform: translateY(-4px) scale(1.01);
  transition: all 0.1s ease;
}

.feature-card svg {
  width: 40px;
  height: 40px;
  stroke: #5B8FFF !important;
  fill: none;
  stroke-width: 2;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.feature-card:hover svg {
  transform: scale(1.1) rotate(5deg);
  stroke: #7BA3FF !important;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.feature-card h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

.feature-card:hover h3 {
  color: #5B8FFF !important;
}

.feature-card p {
  font-size: 1rem;
  color: var(--text-primary);
  opacity: 0.8;
  line-height: 1.6;
  transition: opacity 0.3s ease;
}

.feature-card:hover p {
  opacity: 1;
}

.welcome-cta {
  text-align: center;
  max-width: 100%;
}

.welcome-cta h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.welcome-cta p {
  font-size: 1rem;
  color: var(--text-primary);
  opacity: 0.8;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.welcome-cta .login-btn {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
}

.welcome-cta .login-btn:hover {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(var(--primary-color-rgb), 0.4);
}

.login-benefits {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  opacity: 0.8;
}

.benefit-item svg {
  stroke: var(--primary-color);
  flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .welcome-sidebar {
    width: 300px;
  }
}

@media (max-width: 768px) {
  .welcome-container {
    flex-direction: column;
  }

  .welcome-main {
    padding: 1.5rem 1rem;
  }

  .welcome-sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
  }

  .welcome-features {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .feature-card {
    margin: 0;
  }

  .welcome-header h1 {
    font-size: 2rem;
  }

  .welcome-cta h2 {
    font-size: 1.3rem;
  }

  .welcome-cta .login-btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
  }
}

/* Dark theme adjustments */
[data-theme="dark"] .feature-card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .feature-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-color);
}

[data-theme="dark"] .feature-card svg {
  fill: none;
  stroke: var(--primary-color);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

[data-theme="dark"] .feature-card:hover svg {
  fill: none;
  stroke: var(--secondary-color);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

/* Welcome content layout */
body.logged-out #welcome-content {
  display: flex;
  flex-direction: row;
  animation: fadeIn 0.3s ease-in-out;
  margin-left: 0 !important;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  background: var(--bg-primary) !important;
}

/* Force dark theme for welcome screen */
body.logged-out #welcome-content,
body.logged-out #welcome-content .welcome-container {
  color: #E8E8E8 !important; /* Force dark text-primary */
}

body.logged-out #welcome-content .welcome-header h1,
body.logged-out #welcome-content .welcome-header p,
body.logged-out #welcome-content .welcome-cta h2,
body.logged-out #welcome-content .welcome-cta p {
  color: #E8E8E8 !important; /* Force dark text */
}

body.logged-out #welcome-content .feature-card {
  background: rgba(18, 20, 24, 0.8) !important; /* Force dark --bg-primary with transparency */
  border-color: #2A2D33 !important; /* Force dark border */
  color: #E8E8E8 !important;
}

body.logged-out #welcome-content .feature-card h3,
body.logged-out #welcome-content .feature-card p {
  color: #E8E8E8 !important;
}

body.logged-out #welcome-content .feature-card svg {
  stroke: #5B8FFF !important; /* Force blue primary color */
}

body.logged-out #welcome-content .login-btn {
  background: linear-gradient(135deg, #5B8FFF 0%, #7BA3FF 100%) !important;
  box-shadow: 0 4px 12px rgba(91, 143, 255, 0.3) !important;
}

body.logged-out #welcome-content .login-btn:hover {
  background: linear-gradient(135deg, #7BA3FF 0%, #5B8FFF 100%) !important;
  box-shadow: 0 6px 16px rgba(91, 143, 255, 0.4) !important;
}

.welcome-main {
  position: absolute;
  top: 0px;
  left: 8px;
  width: calc(100% - 350px - 90px);
  height: calc(100% - 180px);
  z-index: 2;
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-secondary);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.welcome-sidebar {
  position: relative;
  z-index: 2;
  flex: 0 0 350px;
  background: var(--bg-primary) !important;
  padding: 20px;
  overflow-y: auto;
  margin-left: auto;
}

/* Sidebar features infinite scrolling animation */
.sidebar-features {
  height: 200px;
  overflow: hidden;
  position: relative;
  margin-top: 20px;
}

.features-scroll-container {
  height: 100%;
  overflow: hidden;
}

.features-list {
  display: flex;
  flex-direction: column;
  animation: scrollFeatures 30s linear infinite;
  gap: 16px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px;
  background: rgba(var(--bg-secondary-rgb), 0.8);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.feature-card svg {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  color: var(--primary-color);
}

.feature-card h3 {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.feature-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

@keyframes scrollFeatures {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

/* Responsive adjustments for larger screens */
@media (min-height: 900px) {
  .sidebar-features {
    height: 350px;
    margin-top: 25px;
  }
}

@media (min-height: 1000px) {
  .sidebar-features {
    height: 400px;
    margin-top: 30px;
  }
}

/* Responsive adjustments for smaller screens */
@media (max-height: 700px) {
  .sidebar-features {
    height: 150px;
    margin-top: 15px;
  }
}

@media (max-height: 600px) {
  .sidebar-features {
    height: 120px;
    margin-top: 10px;
  }
  
  .feature-card {
    padding: 12px;
  }
  
  .feature-card svg {
    width: 24px;
    height: 24px;
    margin-bottom: 8px;
  }
  
  .feature-card h3 {
    font-size: 14px;
    margin-bottom: 4px;
  }
  
  .feature-card p {
    font-size: 12px;
    line-height: 1.3;
  }
}

@media (max-height: 500px) {
  .sidebar-features {
    height: 100px;
    margin-top: 8px;
  }
  
  .features-list {
    gap: 12px;
  }
}

/* Discord button styling */
.discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  margin-top: 12px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.discord-btn:hover {
  background: linear-gradient(135deg, #4752c4 0%, #5865f2 100%);
  transform: translateY(-1px);
}

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

.discord-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
