:root {
  --bg-primary: #0d0d2b;
  --bg-image: url('../pictures/background.png');
  --bg-tint: linear-gradient(rgba(13, 13, 43, 0.7), rgba(13, 13, 43, 0.7));
  --bg-overlay: radial-gradient(circle, rgba(42, 42, 106, 0.3) 0%, rgba(13, 13, 43, 0.5) 100%);
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #cbd5e1;
  --card-bg: rgba(30, 41, 59, 0.4);
  --card-bg-hover: rgba(30, 41, 59, 0.6);
  --card-border: rgba(255, 255, 255, 0.05);
  --accent-color: #0CA1B6;
  /* Refined Teal */
  --accent-orange: #f59e0b;
  --toggle-bg: rgba(255, 255, 255, 0.05);
  --btn-soft-bg: rgba(255, 255, 255, 0.05);
  --icon-box-bg: var(--card-bg);
  --header-bg: #1e293b;
  /* Dark navy */
  --toggle-text: #ffffff;
}

.light-mode {
  --bg-primary: #FAF9F6;
  --bg-image: none;
  --bg-tint: none;
  --bg-overlay: transparent;
  --text-primary: #000000;
  --text-secondary: #000000;
  --text-muted: #000000;
  --card-bg: rgba(255, 255, 255, 0.4);
  --card-bg-hover: rgba(255, 255, 255, 0.6);
  --card-border: rgba(255, 255, 255, 0.8);
  --accent-color: #00a8c6;
  --accent-orange: #ff6b35;
  --toggle-bg: #ffffff;
  --btn-soft-bg: rgba(0, 0, 0, 0.04);
  --icon-box-bg: rgba(255, 255, 255, 0.3);
  --header-bg: #ffffff;
  --toggle-text: #333333;
}

body.light-mode .module-icon {
  filter: none !important;
}

body.light-mode .bg-overlay {
  display: none !important;
}

body.light-mode .module-icon {
  width: 170px !important;
  height: 170px !important;
}

/* Removed first-agent-icon specific sizing to match others */

body.light-mode .coming-soon-label {
  position: absolute !important;
  bottom: 12px !important;
  top: auto !important;
  right: auto !important;
  width: 100% !important;
  text-align: center !important;
  color: #ea580c !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
}





.light-mode .custom-header {
  background: var(--header-bg);
  border-bottom: 1px solid #e2e8f0;
}

body:not(.light-mode) .custom-header img[alt="SRMTech Logo"] {
  height: 20px !important;
}

body.light-mode .custom-header img[alt="SRMTech Logo"] {
  content: url('../pictures/srmtech.png');
  filter: none !important;
  height: 20px !important;
}

.light-mode .custom-header .testing-services-btn {
  color: #f59e0b !important;
  /* Gold/Yellow text */
  background: #0f172a !important;
  /* Dark Navy */
  border: 1px solid #0f172a !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

.light-mode .custom-header .testing-services-btn i {
  color: #f59e0b !important;
}


.light-mode .custom-header .testing-services-btn:hover {
  background: #1f2136 !important;
}

.light-mode .custom-header .theme-toggle-btn,
.light-mode .custom-header .options-btn {
  color: #1e293b !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
  font-weight: 600;
  transition: all 0.2s ease;
}

.light-mode .custom-header .theme-toggle-btn i {
  color: #f59e0b !important;
  /* Yellow Moon */
}

.light-mode .custom-header .help-btn {
  background: #0f172a !important;
  /* Dark Navy to match Testing Services */
  border: 1px solid #0f172a !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.2s ease;
}

.light-mode .custom-header .theme-toggle-btn:hover,
.light-mode .custom-header .options-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

.light-mode .custom-header .help-btn:hover {
  background: #333333 !important;
  border-color: #333333 !important;
}

.light-mode .custom-header .help-btn i {
  color: #ffffff !important;
}

body.light-mode .toggle-container {
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Pill Button Style */
.pill-btn {
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 28px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.10);
  transition: background 0.2s, color 0.2s;
  margin-top: 18px;
  margin-bottom: 8px;
  cursor: pointer;
}

.pill-btn:hover {
  background: #0284c7;
  color: #fff;
}

.pill-btn.orange {
  background: var(--accent-orange);
}

.pill-btn.orange:hover {
  background: #b45309;
}

body.light-mode .toggle-container {
  background: #ffffff;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-radius: 50px;
  padding: 4px;
}

body.light-mode .toggle-container .toggle-btn {
  color: #333333 !important;
  font-weight: 600;
  border-radius: 50px;
}

body.light-mode .toggle-container .toggle-btn.active {
  color: #ffffff !important;
  background: var(--accent-color);
  box-shadow: none;
}

html,
body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
  background: var(--bg-primary);
}

.no-transition * {
  transition: none !important;
}

/* New Background System */
.bg-theme {
  background-image: var(--bg-tint), var(--bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  mask-image: radial-gradient(circle, black 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle, black 25%, transparent 75%);
  z-index: -1;
}

/* Main Container */
.dashboard-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: var(--text-primary);
}

/* Header */
.custom-header {
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 100;
}

.custom-header .testing-services-btn,
.custom-header .theme-toggle-btn,
.custom-header .options-btn {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin: 10px 0;
  /* Tightened */
}

.hero-subtitle {
  font-size: 0.95rem;
  /* Slightly smaller */
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Toggle Container */
.toggle-container {
  display: inline-flex;
  background: var(--toggle-bg);
  border: 1px solid var(--card-border);
  border-radius: 50px;
  padding: 4px;
  /* More compact */
  margin-bottom: 20px;
}

.toggle-btn {
  padding: 6px 20px;
  /* More compact */
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  background: transparent;
  color: var(--toggle-text);
}

.toggle-btn.active {
  background: var(--accent-color);
  color: #ffffff !important;
  box-shadow: 0 0 15px rgba(12, 161, 182, 0.3);
}

/* Dashboard Grid */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  padding: 0 60px;
  max-width: 1400px;
  margin: 10px auto 0;
  /* Pull up towards toggle */
}

/* Grid Item */
.module-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none !important;
}

.module-item:hover {
  transform: translateY(-8px);
}

.icon-box {
  width: 180px;
  height: 180px;
  background: var(--icon-box-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px !important;
  position: relative !important;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: visible !important;
}

/* 3D Base Effect - Dark Mode */
body:not(.light-mode) .icon-box {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05)) !important;
  border: 3px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
  transform-style: preserve-3d !important;
}

body:not(.light-mode) .icon-box::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  border-radius: 24px !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%) !important;
  pointer-events: none !important;
  z-index: 1 !important;
  display: block !important;
}

/* Glassmorphism Base Effect - Light Mode (Matching Dark Mode Size) */
body.light-mode .module-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;
}

body.light-mode .icon-box {
  width: 180px !important;
  height: 180px !important;
  background: #FAF9F6 !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-radius: 24px !important;
  margin-bottom: 30px !important;
}

body.light-mode .icon-box::before {
  display: none !important;
}

.module-item:hover .icon-box {
  transform: translateY(-20px) rotateX(10deg) !important;
}

body:not(.light-mode) .module-item:hover .icon-box {
  border-color: rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7) !important;
}

body.light-mode .module-item:hover .icon-box {
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1) !important;
  transform: translateY(-10px) !important;
}

.module-icon {
  width: 140px;
  height: 140px;
  object-fit: contain;
  opacity: 0.95;
  transition: transform 0.3s ease;
  z-index: 2 !important;
  position: relative !important;
}

/* Removed first-agent-icon specific sizing to match others */

body:not(.light-mode) .module-icon {
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.25)) !important;
  opacity: 1 !important;
}

.module-item:hover .module-icon {
  transform: scale(1.1);
  opacity: 1;
}

body.light-mode .module-icon {
  border-radius: 28px !important;
  transform: none !important;
}

.module-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.module-title span {
  color: var(--accent-orange);
  /* Orange highlight for letter */
}

body.light-mode .module-title,
body.light-mode .module-title span,
body.light-mode .module-desc {
  color: #000000 !important;
}

.module-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Coming Soon */
.coming-soon-label {
  position: absolute;
  bottom: 12px;
  width: 100%;
  text-align: center;
  color: var(--accent-orange);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

body.light-mode .coming-soon-label {
  /* Handled in light-mode specific section above */
}

.module-item.disabled {
  cursor: default;
}

.module-item.disabled .icon-box {
  opacity: 0.7;
}

/* Tooltip/Buttons Refinement */
.testing-services-btn {
  background: var(--btn-soft-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.testing-services-btn:hover {
  background: var(--card-bg-hover);
  border-color: var(--accent-color);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--btn-soft-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 15px;
}

.theme-toggle-btn:hover {
  background: transparent !important;
  border-color: transparent !important;
  transform: rotate(15deg);
}

.theme-toggle-btn i {
  font-size: 1.25rem;
}

/* Help Button */
.help-btn {
  background: var(--btn-soft-bg);
  border: 1px solid var(--card-border);
  color: #ffffff !important;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 25px;
  text-decoration: none !important;
}

.help-btn:hover {
  background: transparent !important;
  border-color: transparent !important;
  transform: scale(1.1);
}

.help-btn i {
  font-size: 1.25rem;
  color: #000000 !important;
  filter: none !important;
  -webkit-filter: none !important;
}

/* Options Button */
.options-btn {
  background: var(--btn-soft-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 40px;
  /* Increased margin to move it right */
}

.options-btn:hover {
  background: var(--card-bg-hover);
  border-color: var(--accent-color);
}

/* Custom Modal Styles */
.custom-modal-content {
  background: rgba(15, 23, 42, 0.9) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 24px !important;
  color: var(--text-primary);
}

.light-mode .custom-modal-content {
  background: rgba(255, 255, 255, 0.9) !important;
  color: var(--text-primary);
}

.about-stat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 16px;
  text-align: center;
}

.light-mode .about-stat-card {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.05);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.stat-value {
  font-weight: 700;
  font-size: 1.1rem;
}

.text-teal {
  color: var(--accent-color);
}

/* Drawer Styles */
.custom-drawer {
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--text-primary);
  width: 350px !important;
}

.light-mode .custom-drawer {
  background: rgba(255, 255, 255, 0.95) !important;
  color: var(--text-primary);
}

.drawer-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 20px;
}

.light-mode .drawer-section {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}

.section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-orange);
  margin-bottom: 12px;
  font-weight: 700;
}

/* Demo Videos Modal Styles */
.demo-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.demo-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.demo-modal-content {
  background: var(--header-bg);
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.light-mode .demo-modal-content {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.demo-modal-overlay.show .demo-modal-content {
  transform: scale(1) translateY(0);
}

.demo-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.light-mode .demo-modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.demo-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-modal-title i {
  color: var(--accent-orange);
}

.demo-modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
}

.light-mode .demo-modal-close {
  background: rgba(0, 0, 0, 0.05);
}

.demo-modal-close:hover {
  background: var(--accent-orange);
  color: #fff;
  transform: rotate(90deg);
}

.demo-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex-grow: 1;
}

/* Custom Scrollbar for Modal */
.demo-modal-body::-webkit-scrollbar {
  width: 8px;
}
.demo-modal-body::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
  border-radius: 4px;
}
.demo-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
}

/* Video Grid */
.demo-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.demo-video-card {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.light-mode .demo-video-card {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.demo-video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
}

.demo-video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: #000;
}

.demo-video-wrapper video,
.demo-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.demo-video-info {
  padding: 15px;
}

.demo-video-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-video-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}