@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #0B0F19;
  --bg-secondary: rgba(20, 25, 40, 0.6);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --glass-border: rgba(255, 255, 255, 0.08);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--bg-secondary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.glass-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Gradients */
.text-gradient {
  background: linear-gradient(to right, var(--accent-purple), var(--accent-blue), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-accent {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue), var(--accent-cyan));
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: white;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:hover {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Form Elements */
.custom-input {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  transition: all 0.3s ease;
}

.custom-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
  background: rgba(15, 23, 42, 0.8);
}

/* Animations */
@keyframes pulse-glow {
  0% { box-shadow: 0 0 10px rgba(139, 92, 246, 0.3); }
  50% { box-shadow: 0 0 25px rgba(139, 92, 246, 0.6); }
  100% { box-shadow: 0 0 10px rgba(139, 92, 246, 0.3); }
}

.animate-glow {
  animation: pulse-glow 3s infinite;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spinner {
  animation: spin-slow 1s linear infinite;
}

/* Circular Progress */
.circular-chart {
  display: block;
  margin: 0 auto;
  max-width: 80%;
  max-height: 250px;
}
.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 2.5;
}
.circle {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease-out, stroke 0.5s ease;
}
.percentage {
  fill: white;
  font-family: 'Inter', sans-serif;
  font-weight: bold;
  font-size: 0.5em;
  text-anchor: middle;
}
.score-label {
  fill: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.2em;
  text-anchor: middle;
}

/* Score Colors */
.score-human { stroke: #10b981; } /* Green */
.score-mixed { stroke: #f59e0b; } /* Yellow */
.score-ai { stroke: #ef4444; } /* Red */

/* Decorative Background Elements */
.bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.4;
}
.shape-1 {
  top: -10%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: var(--accent-purple);
}
.shape-2 {
  top: 40%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: var(--accent-blue);
}
.shape-3 {
  bottom: -10%;
  left: 20%;
  width: 600px;
  height: 600px;
  background: var(--accent-cyan);
}

/* Tabs */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}
.tab-content.active {
  display: block;
  width: 100%;
  height: 100%;
}
.tab-content.active.flex-tab {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}
.flex-tab {
  flex-direction: column;
}

/* Dashboard specific fixes */
@media (max-width: 768px) {
  body {
    padding-top: 0;
  }
  main {
    margin-top: 0 !important;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Text Highlighting */
.highlight-human { background-color: rgba(16, 185, 129, 0.2); }
.highlight-mixed { background-color: rgba(245, 158, 11, 0.2); }
.highlight-ai { background-color: rgba(239, 68, 68, 0.2); }

/* Range Slider */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--accent-blue);
  cursor: pointer;
  margin-top: -6px;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}
