
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #090810;
  --panel: #12111d;
  --panel2: #191629;
  --purple: #9147ff;
  --purple-light: #bd91ff;
  --text: #f5f2ff;
  --muted: #918ca5;
  --border: rgba(165, 115, 255, .17);
}

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 25px 20px 50px;
  background:
    radial-gradient(ellipse at 50% -10%, #35145d 0%, transparent 42%),
    radial-gradient(ellipse at 100% 50%, #25103b22, transparent 40%),
    var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
}

.app {
  max-width: 1250px;
  margin: auto;
}

/* HEADER */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, #a855ff, #5420a8);
  box-shadow: 0 0 30px #873cff55;
  font-size: 19px;
  font-weight: 900;
}

.logo span {
  color: #e5d2ff;
}

.brand h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1.8px;
}

.brand p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 17px;
}

.version {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #171126;
  color: var(--purple-light);
  font-size: 10px;
  font-weight: 800;
}

.connection {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #888;
  box-shadow: 0 0 12px currentColor;
}

/* HERO */

.hero {
  position: relative;
  min-height: 275px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 40px 48px;
  border: 1px solid var(--border);
  border-radius: 23px;
  background:
    radial-gradient(circle at 85% 50%, #782dba33, transparent 35%),
    linear-gradient(120deg, #191329, #11101e);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 570px;
}

.eyebrow {
  color: var(--purple-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}

.hero h2 {
  margin: 15px 0 10px;
  font-size: clamp(35px, 5vw, 57px);
  font-weight: 900;
  letter-spacing: -2px;
}

.hero h2 span {
  color: var(--purple-light);
  text-shadow: 0 0 25px #9147ff55;
}

.hero p {
  max-width: 470px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 13px 20px;
  border-radius: 9px;
  background: linear-gradient(110deg, #7835d9, #a34dff);
  color: white;
  text-decoration: none;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  box-shadow: 0 5px 25px #9147ff33;
  transition: .2s;
}

.hero-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px #9147ff66;
}

.hero-decoration {
  position: relative;
  width: 220px;
  height: 220px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.hero-core {
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
  border: 1px solid #c18aff88;
  border-radius: 28px;
  background: linear-gradient(145deg, #a44cff, #43177e);
  box-shadow: 0 0 60px #9147ff66;
  font-size: 34px;
  font-weight: 900;
  animation: float 4s ease-in-out infinite;
}

.orbit {
  position: absolute;
  width: 190px;
  height: 190px;
  border: 1px solid #a76bff44;
  border-radius: 50%;
}

.orbit-two {
  width: 150px;
  height: 210px;
  transform: rotate(55deg);
  border-color: #b58aff33;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* DASHBOARD */

.dashboard {
  margin: 35px 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}

.section-heading h2 {
  margin: 6px 0 0;
  font-size: 22px;
}

.live-label {
  color: #54dca0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.stat-card {
  position: relative;
  padding: 21px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: linear-gradient(145deg, #171526, #100f19);
  transition: .2s;
}

.stat-card:hover {
  border-color: #9147ff66;
  transform: translateY(-3px);
}

.stat-icon {
  display: block;
  margin-bottom: 12px;
  color: var(--purple-light);
  font-size: 20px;
}

.stat-card strong {
  display: block;
  font-size: 29px;
  font-weight: 900;
}

.stat-card span:last-child {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1px;
}

/* MAIN LAYOUT */

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .85fr);
  align-items: start;
  gap: 20px;
}

.main-column,
.side-column {
  display: grid;
  gap: 20px;
  min-width: 0;
}

/* PANELS */

.panel {
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: linear-gradient(145deg, #161423, #100f19);
  box-shadow: 0 12px 35px #00000030;
  transition: border-color .2s;
}

.panel:hover {
  border-color: #a76bff44;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 17px;
}

.number {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #281941;
  color: var(--purple-light);
  font-size: 12px;
  font-weight: 900;
}

.panel-heading h2 {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 18px;
  letter-spacing: -.3px;
}

.panel-description {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

/* INPUTS */

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  display: block;
  margin: 13px 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}

select,
textarea,
input[type="file"] {
  width: 100%;
  margin-top: 9px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: #0b0a14;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  transition: .2s;
}

select:focus,
textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px #9147ff20;
}

textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.7;
}

textarea::placeholder {
  color: #686379;
}

.input-label {
  display: block;
  margin-top: 22px;
}

/* BUTTONS */

button {
  border: none;
  border-radius: 9px;
  padding: 13px 17px;
  margin-top: 12px;
  background: linear-gradient(110deg, #7835d9, #a34dff);
  color: white;
  font-family: inherit;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  transition: .2s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 7px 25px #9147ff55;
  filter: brightness(1.12);
}

button:active:not(:disabled) {
  transform: scale(.98);
}

button:disabled {
  opacity: .55;
  cursor: wait;
}

.primary-button {
  width: 100%;
}

.primary-button span {
  margin-left: 10px;
}

.secondary-button {
  width: 100%;
  border: 1px solid var(--border);
  background: #211a32;
  color: var(--purple-light);
}

.clear-button {
  width: 100%;
  background: transparent;
  border: 1px solid #ff646422;
  color: #ff8585;
}

/* ANSWERS */

.answer-panel {
  border-color: #9147ff66;
  background:
    radial-gradient(circle at 100% 0%, #6823a51c, transparent 45%),
    linear-gradient(145deg, #191429, #100f19);
}

.answer-section {
  margin: 22px 0;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0d0b16;
}

.answer-section h3 {
  margin: 0 0 13px;
  color: var(--purple-light);
  font-size: 10px;
  letter-spacing: 1.5px;
}

.answer-section h3 span {
  margin-right: 7px;
}

.answer-text {
  color: #e3deef;
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.status {
  min-height: 14px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 11px;
}

/* IMAGE UPLOAD */

.upload-area {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 20px;
  border: 1px dashed #9150d977;
  border-radius: 13px;
  background: #171126;
  cursor: pointer;
  transition: .2s;
}

.upload-area:hover {
  border-color: var(--purple);
  background: #211735;
}

.upload-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #492477;
  color: white;
  font-size: 24px;
}

.upload-area strong {
  color: var(--text);
  font-size: 12px;
}

.upload-area span:last-child {
  color: var(--muted);
  font-size: 10px;
}

.upload-area input {
  display: none;
}

#photoArea {
  margin-top: 15px;
  overflow: hidden;
  border-radius: 12px;
  background: #080810;
}

#preview {
  display: block;
  max-width: 100%;
}

.button-row {
  display: flex;
  gap: 10px;
}

.button-row button {
  flex: 1;
}

/* QUIZ */

.quiz-panel label {
  margin: 15px 0;
}

.quiz-divider {
  height: 1px;
  margin: 22px 0;
  background: var(--border);
}

#quizQuestion {
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

#quizOptions {
  display: grid;
  gap: 9px;
}

#quizOptions button {
  width: 100%;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--border);
  background: #1a1728;
  text-align: left;
  letter-spacing: 0;
  font-size: 11px;
}

#quizOptions button:hover:not(:disabled) {
  background: #302047;
}

#quizFeedback {
  color: var(--purple-light);
  font-size: 12px;
  line-height: 1.7;
}

#quizScore {
  color: var(--purple-light);
  font-size: 13px;
  font-weight: 800;
}

/* HISTORY */

#historyArea {
  max-height: 420px;
  overflow-y: auto;
  margin-top: 16px;
  color: #d7d1e8;
  font-size: 12px;
  line-height: 1.7;
}

#historyArea strong {
  color: var(--purple-light);
}

#historyArea p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* FOOTER */

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 35px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  color: #777188;
  font-size: 9px;
  letter-spacing: 1.5px;
}

.footer-brand {
  color: var(--text);
  font-weight: 900;
}

.footer-brand span {
  color: var(--purple-light);
}

/* SCROLLBAR */

::-webkit-scrollbar {
  width: 7px;
}

::-webkit-scrollbar-track {
  background: #0b0a13;
}

::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: #593486;
}

/* HIDDEN */

[hidden] {
  display: none !important;
}

/* RESPONSIVE */

@media (max-width: 850px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .side-column {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media (max-width: 600px) {
  body {
    padding: 14px 10px 30px;
  }

  .topbar {
    align-items: flex-start;
  }

  .header-right {
    align-items: flex-end;
    flex-direction: column;
    gap: 9px;
  }

  .brand h1 {
    font-size: 12px;
  }

  .brand p {
    font-size: 8px;
  }

  .logo {
    width: 43px;
    height: 43px;
  }

  .hero {
    min-height: 240px;
    padding: 25px;
  }

  .hero-decoration {
    position: absolute;
    right: -80px;
    opacity: .25;
  }

  .hero h2 {
    font-size: 37px;
  }

  .panel {
    padding: 19px;
  }

  .stats {
    gap: 8px;
  }

  .stat-card {
    padding: 15px 10px;
  }

  .stat-card strong {
    font-size: 23px;
  }

  .stat-card span:last-child {
    font-size: 8px;
  }

  .side-column {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
