/* 12th Stream Analyzer CSS Styling Rules */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

:root {
  --bg-main: #060814;
  --bg-sidebar: #0b0e24;
  --bg-card: #0d1233;
  --bg-card-inner: #070a21;
  --text-main: #ffffff;
  --text-muted: #8fa0dd;
  --text-dim: #506199;
  --accent-purple: #6366f1;
  --accent-blue: #2563eb;
  --glow-purple: rgba(99, 102, 241, 0.15);
  --glow-blue: rgba(37, 99, 235, 0.2);
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- TOP NAVBAR --- */
.top-bar {
  height: 70px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.logo.page-title {
  position: absolute;
  left: 72px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  z-index: 1250;
}

.logo.page-title .page-title-icon {
  color: var(--accent-purple);
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 0 6px var(--accent-purple));
}

.logo.page-title span {
  color: var(--accent-purple);
}

.top-nav {
  display: flex;
  gap: 32px;
}

.top-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding: 24px 0;
  transition: color 0.2s;
}

.top-link:hover {
  color: #fff;
}

.top-actions {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 24px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  padding: 4px;
}

.icon-btn:hover {
  color: #fff;
}

.profile-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

/* --- MAIN CONTENT GRID --- */
.content-grid {
  padding: 32px 40px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.left-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.right-column {
  width: 340px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- HERO CARD BANNER --- */
.hero-card {
  background: linear-gradient(135deg, #0d1233 0%, #070919 100%);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
}

.hero-info {
  max-width: 70%;
}

.guide-badge {
  background: rgba(167, 139, 250, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.25);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 12px;
}

.hero-info h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
  line-height: 1.25;
}

.hero-info p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.hero-visual {
  position: relative;
  width: 140px;
  height: 140px;
}

.brain-glow {
  position: absolute;
  width: 85px;
  height: 85px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  top: 15px;
  right: 15px;
  filter: blur(10px);
  opacity: 0.6;
}

/* --- ANALYZER CARD (CONFIG & RESULTS) --- */
.analyzer-card {
  background-color: var(--bg-card-inner);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 32px;
}

.analyzer-card h2 {
  color: #a78bfa;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.analyzer-card h2 .header-icon {
  color: var(--accent-purple);
  width: 22px;
  height: 22px;
}

.analyzer-card .subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* INPUT GROUPS */
.input-group {
  margin-bottom: 24px;
}

.input-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.select-wrapper {
  position: relative;
  width: 100%;
}

.select-wrapper select {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  appearance: none;
  transition: all 0.2s;
}

.select-wrapper select:focus {
  outline: none;
  border-color: var(--accent-purple);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  width: 16px;
  height: 16px;
}

/* MARKSHEET UPLOAD ZONE */
.marksheet-upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.01);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 28px;
  position: relative;
}

.marksheet-upload-zone:hover, .marksheet-upload-zone.dragover {
  border-color: var(--accent-blue);
  background: rgba(37, 99, 235, 0.04);
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.upload-icon {
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.marksheet-upload-zone:hover .upload-icon {
  transform: translateY(-3px);
  color: var(--accent-blue);
}

.upload-content h3 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.upload-content p {
  font-size: 12px;
  color: var(--text-dim);
}

.upload-content p span {
  color: var(--accent-blue);
  text-decoration: underline;
  font-weight: 500;
}

/* PARSING LOADER STATE */
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 1s infinite linear;
  margin-bottom: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.parsing-state h3 {
  color: var(--accent-blue);
}

.success-state .upload-icon {
  color: #10b981;
}

.text-success {
  color: #10b981;
}

/* SUBJECTS EDITOR CHIPS */
.subjects-editor-section {
  margin-bottom: 28px;
}

.subjects-editor-section label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.subject-chip, .interest-chip {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition: all 0.2s;
}

.subject-chip:hover, .interest-chip:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.subject-chip.selected {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--accent-purple);
  color: #fff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

.interest-chip.selected {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--accent-blue);
  color: #fff;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.15);
}

/* COMPATIBILITY SUBMIT BUTTON */
.next-btn {
  width: 100%;
  background: linear-gradient(90deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
  border: none;
  color: #fff;
  padding: 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2);
  transition: all 0.2s;
  margin-top: 12px;
}

.next-btn:hover {
  opacity: 0.95;
  box-shadow: 0 4px 25px rgba(37, 99, 235, 0.35);
}

/* --- DYNAMIC RESULTS SECTION --- */
.results-card {
  margin-top: 24px;
}

.results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.results-dashboard-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.01);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

/* Circular Score Gauge */
.progress-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.results-circle-container {
  position: relative;
  width: 140px;
  height: 140px;
}

.results-svg {
  width: 140px;
  height: 140px;
  transform: rotate(-90deg);
}

.results-svg circle {
  fill: none;
  stroke-width: 10;
}

.results-bg {
  stroke: rgba(255, 255, 255, 0.03);
}

.results-bar {
  stroke: var(--accent-purple);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
  /* Circumference = 2 * pi * 60 = 377 */
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
}

.results-value-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-percent {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.score-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 4px;
}

.best-degree-name {
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  color: #a78bfa;
}

/* Degree eligibility list style */
.gaps-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gaps-col h3 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.gaps-subtext {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
}

.compatibility-degree-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 8px;
}

.degree-score-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.degree-score-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.degree-score-row.active-row {
  background: rgba(99, 102, 241, 0.05);
  border-color: rgba(99, 102, 241, 0.2);
}

.degree-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
}

.degree-title-lbl {
  color: #fff;
}

.degree-score-val {
  color: var(--text-muted);
}

.degree-progress-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  overflow: hidden;
}

.degree-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
  border-radius: 4px;
}

/* Detail pane details */
.degree-detail-pane {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 24px;
  padding-top: 24px;
}

.detail-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.detail-pane-header h3 {
  font-size: 18px;
  color: #fff;
  font-weight: 700;
}

.match-score-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.bg-success-glow {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.bg-purple-glow {
  background: rgba(167, 139, 250, 0.1);
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.2);
}

.bg-warning-glow {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.pane-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pane-section h4 {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pane-section p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.pane-section-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.exam-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.exam-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.detail-text-highlight {
  font-weight: 600;
  color: #fff !important;
}

.roadmap-generate-btn {
  width: 100%;
  background: rgba(167, 139, 250, 0.08);
  border: 1px dashed var(--accent-purple);
  color: #a78bfa;
  padding: 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.roadmap-generate-btn:hover {
  background: var(--accent-purple);
  color: #fff;
  border-style: solid;
}

/* --- OUTLOOK CARD (RIGHT COLUMN) --- */
.side-card.outlook-card {
  background: linear-gradient(135deg, #0d1233 0%, #070919 100%);
}

.side-subtext {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.exam-schedule-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.exam-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 14px;
}

.exam-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.exam-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.exam-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.exam-status {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.exam-status.bg-blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.exam-status.bg-red { background: rgba(244, 63, 94, 0.1); color: #f43f5e; }
.exam-status.bg-green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.exam-status.bg-purple { background: rgba(167, 139, 250, 0.1); color: #a78bfa; }
.exam-status.bg-teal { background: rgba(45, 212, 191, 0.1); color: #2dd4bf; }

.exam-item p {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.45;
}

/* Advice Box */
.side-card.advice-card {
  border-color: rgba(99, 102, 241, 0.15);
}

.advice-content {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.advice-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-purple);
  flex-shrink: 0;
  margin-top: 2px;
}

.advice-content p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- RESPONSIVENESS --- */
@media (max-width: 1024px) {
  .content-grid {
    flex-direction: column;
    padding: 24px 20px;
  }
  
  .right-column {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .top-bar {
    padding: 0 20px;
  }
  
  .logo.page-title {
    left: 64px;
  }
  
  .top-nav {
    display: none;
  }
  
  .hero-card {
    flex-direction: column;
    gap: 16px;
    padding: 24px;
  }
  
  .hero-info {
    max-width: 100%;
  }
  
  .results-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 16px;
  }
  
  .pane-section-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
