/* BrandsGEO - Custom Styles */

/* CSS Variables */
:root {
  --primary-purple: #5B6CFF;
  --primary-cyan: #00C8B3;
  --primary-blue: #2979FF;
  --dark-bg: #081229;
  --darker-bg: #050B1D;
  --card-bg: rgba(12, 23, 52, 0.65);
  --card-border: rgba(91, 108, 255, 0.25);
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  --gradient-primary: linear-gradient(135deg, #5B6CFF 0%, #2979FF 48%, #00C8B3 100%);
  --gradient-glow: linear-gradient(135deg, rgba(91, 108, 255, 0.35) 0%, rgba(41, 121, 255, 0.35) 50%, rgba(0, 200, 179, 0.35) 100%);
}

/* Base Styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: -20% -10%;
  background:
    radial-gradient(circle at 20% 20%, rgba(91, 108, 255, 0.24), transparent 36%),
    radial-gradient(circle at 80% 30%, rgba(0, 200, 179, 0.18), transparent 38%),
    radial-gradient(circle at 55% 80%, rgba(41, 121, 255, 0.16), transparent 36%);
  z-index: -1;
  pointer-events: none;
}

.hero-title {
  font-family: 'Space Grotesk', 'Noto Sans SC', sans-serif;
  letter-spacing: -0.02em;
}

/* Glassmorphism Card */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(107, 70, 193, 0.4);
  box-shadow: 0 8px 32px rgba(107, 70, 193, 0.15);
}

/* Gradient Text */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Gradient Button */
.btn-gradient {
  background: var(--gradient-primary);
  border: none;
  color: white;
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(107, 70, 193, 0.4);
}

.btn-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn-gradient:hover::before {
  left: 100%;
}

/* Outline Button */
.btn-outline {
  background: transparent;
  border: 1px solid rgba(107, 70, 193, 0.5);
  color: white;
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: rgba(107, 70, 193, 0.1);
  border-color: var(--primary-purple);
}

.hero-stat-card {
  background: rgba(10, 24, 58, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px;
}

.hero-stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.2;
}

.hero-stat-label {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.hero-panel {
  background: linear-gradient(145deg, rgba(16, 31, 68, 0.95) 0%, rgba(8, 18, 41, 0.88) 100%);
  border: 1px solid rgba(91, 108, 255, 0.35);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 30px 70px rgba(3, 8, 21, 0.55);
}

.hero-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.hero-metric-row {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
}

.result-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
}

.result-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  line-height: 1;
  font-weight: 700;
  margin-bottom: 8px;
}

.result-label {
  color: var(--text-secondary);
  font-size: 0.86rem;
}

/* Particle Canvas */
#particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Navigation */
.nav-link {
  color: var(--text-secondary);
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
}

/* Sidebar Navigation */
.sidebar-nav {
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(107, 70, 193, 0.1);
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: all 0.3s ease;
  margin-bottom: 4px;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(107, 70, 193, 0.15);
  color: var(--text-primary);
}

.sidebar-link.active {
  border-left: 3px solid var(--primary-purple);
}

.sidebar-link svg {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.sidebar-link:hover svg,
.sidebar-link.active svg {
  opacity: 1;
}

/* Metric Cards */
.metric-card {
  background: linear-gradient(135deg, rgba(107, 70, 193, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
  border: 1px solid rgba(107, 70, 193, 0.2);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: rgba(107, 70, 193, 0.4);
  box-shadow: 0 12px 40px rgba(107, 70, 193, 0.15);
}

.metric-value {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: #22C55E;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

.badge-info {
  background: rgba(6, 182, 212, 0.15);
  color: #06B6D4;
}

/* Progress Ring */
.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-circle {
  transition: stroke-dashoffset 0.5s ease;
}

/* Chart Container */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

/* Table Styles */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th {
  text-align: left;
  padding: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(107, 70, 193, 0.2);
}

.data-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(107, 70, 193, 0.1);
}

.data-table tr:hover td {
  background: rgba(107, 70, 193, 0.05);
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: rgba(107, 70, 193, 0.1);
  border-radius: 10px;
}

.tab-btn {
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  background: transparent;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: rgba(107, 70, 193, 0.3);
  color: var(--text-primary);
}

/* Accordion */
.accordion-item {
  border-bottom: 1px solid rgba(107, 70, 193, 0.1);
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  cursor: pointer;
  transition: color 0.3s ease;
}

.accordion-header:hover {
  color: var(--primary-cyan);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-content.open {
  max-height: 500px;
  padding-bottom: 20px;
}

/* Pricing Cards */
.pricing-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 40px 32px;
  transition: all 0.3s ease;
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-8px);
  border-color: rgba(107, 70, 193, 0.4);
}

.pricing-card.popular {
  border-color: var(--primary-purple);
  box-shadow: 0 0 40px rgba(107, 70, 193, 0.2);
}

.pricing-card.popular::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--darker-bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(107, 70, 193, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 70, 193, 0.5);
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar-nav {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar-nav.open {
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .metric-value {
    font-size: 2rem;
  }
  
  .chart-container {
    height: 250px;
  }

  .hero-panel {
    margin-top: 4px;
  }
}

/* Loading Animation */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(107, 70, 193, 0.2);
  border-top-color: var(--primary-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Tooltip */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  font-size: 0.75rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: calc(100% + 8px);
}
