/* includes/common.css */
:root {
  --primary: #3b82f6;
  --secondary: #8b5cf6;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --border-color: #e2e8f0;
}

.dark {
  --primary: #60a5fa;
  --secondary: #a78bfa;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --border-color: #334155;
}

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

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  padding-top: 80px;
  position: relative;
}

.glass {
  background: rgba(246, 247, 255, 0.83);
  box-shadow: 0 8px 32px 0 rgba(40,60,110,0.08);
  border: 1.5px solid rgba(120, 150, 255, 0.10);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  transition: background 0.5s, box-shadow 0.5s, border-color 0.5s;
  width: 100%;
}
.dark .glass {
  background: rgba(32, 36, 58, 0.54);
  box-shadow: 0 8px 32px 0 rgba(18, 21, 40, 0.12);
  border: 1.5px solid rgba(120, 150, 255, 0.08);
}

.blob {
    position: fixed;
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
    transition: opacity 0.5s, background 0.5s;
}
.blob1 { top: 2rem; left: -4rem; width: 350px; height: 350px; background: linear-gradient(90deg, #86e7ff 0%, #fff9fa 100%); opacity: 0.22; }
.blob2 { top: 340px; right: -2rem; width: 240px; height: 240px; background: linear-gradient(135deg, #ffe3f1 0%, #f9e8a3 100%); opacity: 0.19; }
.blob3 { bottom: -6rem; left: 45vw; width: 300px; height: 250px; background: linear-gradient(120deg, #ece4ff 0%, #a2f9ec 100%); opacity: 0.14; }

.dark .blob1 { background: linear-gradient(90deg, #46caff, #9155ff); opacity: 0.38; }
.dark .blob2 { background: linear-gradient(135deg, #ff85a3, #f9ce34); opacity: 0.38; }
.dark .blob3 { background: linear-gradient(120deg, #1fcfad, #46caff); opacity: 0.38; }

@keyframes float {
  0%,100% { transform: translateY(0) scale(1);}
  50% { transform: translateY(-30px) scale(1.1);}
}

.section-title {
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 900;
  margin-bottom: 1.6rem;
  letter-spacing: -0.01em;
  text-align: center;
  color: #1e213b;
  border-bottom: 4px solid #7c47fd;
  text-shadow: 0 2px 16px rgba(170,150,255,0.07), 0 1px 0px #f6f8fc;
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  padding: .25em 0.5em;
  display: inline-block;
  border-radius: 2px;
  max-width: 100%;
  word-break: break-word;
}
.dark .section-title {
  color: #fff;
  border-bottom: 4px solid #4f84ff;
  text-shadow: 0 2px 24px rgba(51,98,160,0.13), 0 1px 0px #25294d;
}

.micro-float {
   transition: transform 0.22s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.22s;
 }
 .micro-float:hover {
   transform: translateY(-6px) scale(1.02);
   box-shadow: 0 10px 32px 0 rgba(80, 100, 170, 0.09);
   z-index: 2;
 }
.dark .micro-float:hover {
    box-shadow: 0 10px 32px 0 rgba(81, 146, 255, 0.13);
}

.btn-gradient {
   background-image: linear-gradient(90deg, #418dff 0%, #9155ff 100%);
   color: #fff !important;
   font-weight: bold;
   border: none;
 }

/* Header Styles */
header {
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   z-index: 50;
   background-color: var(--bg-secondary); 
   border-bottom: 1px solid var(--border-color); 
   transition: background-color 0.3s, border-color 0.3s;
   backdrop-filter: blur(12px); 
   height: 80px;
   width: 100%;
 }

header nav {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  height: 100%;
  width: 100%;
}

.logo-img {
  height: 48px;
  width: auto;
}

/* Mobile Menu Toggle Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 51;
}

/* Navigation Links */
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s;
  white-space: nowrap;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  position: relative;
}

.nav-links a:hover {
  color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
}

.nav-links a.active {
  color: var(--primary);
  background: rgba(59, 130, 246, 0.15);
  font-weight: 600;
}

.dark .nav-links a:hover {
  background: rgba(96, 165, 250, 0.15);
}

.dark .nav-links a.active {
  background: rgba(96, 165, 250, 0.2);
}

/* Dropdown Menu Styles */
.dropdown-container {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  display: flex !important;
  align-items: center;
  gap: 4px;
}

.dropdown-icon {
  transition: transform 0.3s ease;
}

.dropdown-container:hover .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 380px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 100;
  backdrop-filter: blur(12px);
  display: flex;
  gap: 1.5rem;
}

.dropdown-container:hover .dropdown-menu,
.dropdown-container:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-column {
  flex: 1;
  min-width: 160px;
}

.dropdown-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
  opacity: 0.9;
}

.dropdown-item {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 0.6rem 0.75rem !important;
  margin: 0.25rem 0;
  border-radius: 8px !important;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-size: 0.95rem !important;
}

.dropdown-item i {
  width: 18px;
  font-size: 1rem;
  color: var(--primary);
}

.dropdown-item:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: translateX(4px);
}

.dark .dropdown-item:hover {
  background: rgba(96, 165, 250, 0.15);
}

.dropdown-divider {
  width: 1px;
  background: var(--border-color);
  margin: 0 0.5rem;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
   background: linear-gradient(90deg, var(--primary), var(--secondary));
   color: white;
   width: 40px;
   height: 40px;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   cursor: pointer;
   border: none;
 }

 .light-logo, .light-icon { display: block; }
 .dark-logo, .dark-icon { display: none; }

 .dark .dark-logo, .dark .dark-icon { display: block; }
 .dark .light-logo, .dark .light-icon { display: none; }

/* Container Fix for Overflow */
section {
   width: 100%;
   max-width: 100%;
   overflow: hidden;
 }

 .max-w-6xl {
   max-width: 72rem;
   width: 100%;
 }

 /* Grid Fix */
 .grid {
   display: grid;
   width: 100%;
 }

/* Mobile Responsive Header Styles */
@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }

  header {
    height: 70px;
  }

  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    width: 100%;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links a {
    padding: 1rem 1.5rem;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
  }

  /* Dropdown Mobile Styles */
  .dropdown-container {
    width: 100%;
  }

  .dropdown-trigger {
    width: 100%;
    justify-content: space-between;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--primary);
    margin: 0.5rem 1.5rem;
    padding: 0.75rem;
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    min-width: auto;
    background: rgba(0, 0, 0, 0.02);
    width: calc(100% - 3rem);
  }

  .dark .dropdown-menu {
    background: rgba(255, 255, 255, 0.05);
  }

  .dropdown-menu.show {
    display: flex !important;
  }

  .dropdown-trigger {
    cursor: pointer;
    user-select: none;
  }

  .dropdown-trigger i {
    pointer-events: none;
  }

  .dropdown-column {
    width: 100%;
  }

  .dropdown-item {
    padding: 0.75rem 1rem !important;
  }

  .dropdown-divider {
    width: 100%;
    height: 1px;
    margin: 0.5rem 0;
  }

  .dropdown-title {
    margin-left: 0.5rem;
    margin-top: 0.5rem;
  }

  /* Login/Register button inside mobile menu */
  .nav-links .mobile-login-btn {
    display: block;
    margin: 1rem 1.5rem;
    text-align: center;
  }

  /* Hide desktop login button on mobile */
  .header-actions .desktop-login-btn {
    display: none;
  }

  .logo-img {
    height: 40px;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .header-actions .desktop-login-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
  }

  .theme-toggle {
    width: 34px;
    height: 34px;
  }
}