/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: #040812;
  color: #f8fafc;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* Typography */
h1, h2, h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Background Glowing Blobs */
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  opacity: 0.15;
  pointer-events: none;
  animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #4f46e5 0%, rgba(79, 70, 229, 0) 70%);
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #06b6d4 0%, rgba(6, 182, 212, 0) 70%);
  bottom: -50px;
  right: -50px;
  animation-delay: -5s;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #db2777 0%, rgba(219, 39, 119, 0) 70%);
  top: 40%;
  left: 35%;
  opacity: 0.08;
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 60px) scale(1.1); }
  100% { transform: translate(-20px, -40px) scale(0.9); }
}

/* Dashboard Layout */
.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 48px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-glow {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.title-area h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.subtitle {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-top: 2px;
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px 16px;
  border-radius: 20px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
}

.status-dot.green {
  background-color: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.status-dot.green::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

.status-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: 0.02em;
}

/* Main Content Section */
.main-content {
  flex-grow: 1;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-title h2 {
  font-size: 1.25rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.badge {
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

/* Service Card Styles */
.service-card {
  text-decoration: none;
  color: inherit;
  display: block;
  border-radius: 20px;
  position: relative;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.service-card .card-inner {
  padding: 32px;
  height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 2;
  position: relative;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255, 255, 255, 0.04), transparent 40%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.service-card:hover::before {
  opacity: 1;
}

.service-card:hover {
  transform: translateY(-4px);
  background: rgba(20, 30, 55, 0.5);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

#service-chess:hover {
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: 0 12px 40px rgba(6, 182, 212, 0.1);
}

#service-codemorph:hover {
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 12px 40px rgba(168, 85, 247, 0.1);
}

#service-voice:hover {
  border-color: rgba(219, 39, 119, 0.3);
  box-shadow: 0 12px 40px rgba(219, 39, 119, 0.1);
}

/* Inactive/Disabled Card */
.service-card.disabled {
  background: rgba(15, 23, 42, 0.2);
  border-color: rgba(255, 255, 255, 0.02);
  cursor: not-allowed;
  opacity: 0.6;
}

.service-card.disabled:hover {
  transform: none;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.02);
}

.service-card.disabled .icon-wrapper {
  background: rgba(255, 255, 255, 0.02);
  color: #64748b;
  border-color: rgba(255, 255, 255, 0.05);
}

/* Card Header elements */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: all 0.3s ease;
}

.service-card:hover .icon-wrapper {
  transform: scale(1.05);
}

.icon-wrapper svg {
  width: 24px;
  height: 24px;
}

.border-cyan {
  border-color: rgba(6, 182, 212, 0.3);
  color: #22d3ee;
  background: rgba(6, 182, 212, 0.03);
}
#service-chess:hover .icon-wrapper {
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.border-purple {
  border-color: rgba(168, 85, 247, 0.3);
  color: #c084fc;
  background: rgba(168, 85, 247, 0.03);
}
#service-codemorph:hover .icon-wrapper {
  background: rgba(168, 85, 247, 0.1);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

.border-pink {
  border-color: rgba(219, 39, 119, 0.3);
  color: #f472b6;
  background: rgba(219, 39, 119, 0.03);
}
#service-voice:hover .icon-wrapper, .interactive:hover .icon-wrapper {
  background: rgba(219, 39, 119, 0.1);
  box-shadow: 0 0 15px rgba(219, 39, 119, 0.2);
}

/* Status Tags */
.status-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 6px;
}

.tag-active {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.tag-widget {
  background: rgba(244, 114, 182, 0.1);
  color: #f472b6;
  border: 1px solid rgba(244, 114, 182, 0.2);
}

.tag-soon {
  background: rgba(255, 255, 255, 0.03);
  color: #64748b;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Card Body */
.card-body {
  flex-grow: 1;
}

.card-body h3 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 10px;
}

.card-body p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #94a3b8;
}

/* Card Footer */
.card-footer {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #818cf8;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

#service-chess .card-footer { color: #22d3ee; }
#service-codemorph .card-footer { color: #c084fc; }

.arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .arrow {
  transform: translateX(4px);
}

/* Voice Assistant Interactive Widget */
.voice-widget {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
  border-radius: 16px;
  gap: 16px;
}

.record-btn {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.4);
}

.record-btn svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 2;
}

.record-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.6);
}

.record-btn:active {
  transform: scale(0.95);
}

.btn-ripple {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(236, 72, 153, 0.4);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
}

/* Visualizer waves */
.voice-visualizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 24px;
  flex-grow: 1;
}

.wave-bar {
  width: 3px;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Voice assistant state animations */
.voice-widget.recording .record-btn {
  background: #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

.voice-widget.recording .btn-ripple {
  animation: pulse-ring 1.5s cubic-bezier(0.215, 0.610, 0.355, 1) infinite;
  opacity: 1;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

.voice-widget.recording .wave-bar {
  background-color: #ec4899;
  animation: wave-motion 1.2s ease-in-out infinite alternate;
}

.voice-widget.recording .wave-bar:nth-child(1) { height: 18px; animation-delay: 0.1s; }
.voice-widget.recording .wave-bar:nth-child(2) { height: 12px; animation-delay: 0.3s; }
.voice-widget.recording .wave-bar:nth-child(3) { height: 24px; animation-delay: 0.0s; }
.voice-widget.recording .wave-bar:nth-child(4) { height: 15px; animation-delay: 0.4s; }
.voice-widget.recording .wave-bar:nth-child(5) { height: 8px; animation-delay: 0.2s; }

/* Processing / loading state */
.voice-widget.processing .wave-bar {
  background-color: #a855f7;
  animation: loading-pulse 1s ease-in-out infinite alternate;
}

.voice-widget.processing .wave-bar:nth-child(1) { animation-delay: 0.1s; }
.voice-widget.processing .wave-bar:nth-child(2) { animation-delay: 0.2s; }
.voice-widget.processing .wave-bar:nth-child(3) { animation-delay: 0.3s; }
.voice-widget.processing .wave-bar:nth-child(4) { animation-delay: 0.4s; }
.voice-widget.processing .wave-bar:nth-child(5) { animation-delay: 0.5s; }

@keyframes wave-motion {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

@keyframes loading-pulse {
  0% { transform: scaleY(0.5); opacity: 0.4; }
  100% { transform: scaleY(1.8); opacity: 1; }
}

/* Footer */
.footer {
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 48px;
  color: #64748b;
  font-size: 0.8125rem;
}

.footer-status {
  color: #94a3b8;
}

/* Responsive Queries */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
  }
  
  .status-bar {
    align-self: flex-start;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-container {
    padding: 24px 16px;
  }
}