@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Raleway:wght@400;500;600&display=swap');

:root {
  --gold: #d4af37;
  --bronze: #cd7f32;
  --dark-bg: #1a0f0a;
  --text-light: #f5f0e6;
  --accent: #86592d;
  --card-bg: #2a1b14;
  --border: rgba(255, 255, 255, 0.1);
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--dark-bg);
  color: var(--text-light);
  font-family: 'Raleway', sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

header {
  text-align: center;
  padding: 2.5rem 1rem 1rem;
  border-bottom: 1px solid var(--border);
}

header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.2rem;
  color: var(--gold);
  margin: 0.2em 0 0.1em;
  letter-spacing: 2px;
}

header p {
  color: #d3c6ae;
  font-size: 1.1rem;
  margin-bottom: 0;
}

.logo {
  width: 90px;
  margin-bottom: 1rem;
  border-radius: 50%;
  box-shadow: 0 0 10px var(--gold);
}

/* Controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  padding: 1.5rem;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

.controls button,
.controls select {
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  padding: 0.8rem 1.4rem;
  border-radius: 30px;
  border: none;
  transition: all 0.2s ease;
}

.controls button {
  background-color: var(--gold);
  color: var(--dark-bg);
  font-weight: bold;
  cursor: pointer;
}

.controls button:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.controls select {
  background-color: var(--accent);
  color: var(--text-light);
}

/* Visualizer */
#visualizer {
  width: 92%;
  max-width: 1000px;
  height: 220px;
  margin: 2rem auto;
  display: block;
  border: 2px solid var(--gold);
  border-radius: 10px;
  background: #1a0f0a;
}

/* Status Display */
.status-display {
  text-align: center;
  font-style: italic;
  color: #f3e7d6;
  padding: 0.7rem;
}

/* Analysis Output */
.analysis-output {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 2rem;
  background-color: var(--card-bg);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.analysis-output h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  text-align: center;
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.analysis-output .section {
  background: rgba(26, 15, 10, 0.8);
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.1);
}

.section .label {
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--bronze);
  margin-bottom: 0.3rem;
}

.section .value {
  font-family: 'Raleway', sans-serif;
  font-size: 1.3rem;
  color: var(--text-light);
}

/* Confidence Bars */
.confidence-bar {
  background-color: #3e2b1c;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 0.5rem;
  height: 14px;
  width: 100%;
}

.confidence-bar .fill {
  background: linear-gradient(90deg, var(--gold), var(--bronze));
  height: 100%;
  width: 0%;
  transition: width 1.5s ease-in-out;
}

/* Typewriter */
.typewriter {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  animation: typing 2s steps(40, end), blink 1s step-end infinite;
  border-right: 2px solid var(--gold);
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink {
  50% { border-color: transparent }
}
