:root {
  --primary: #7c7cff;
  --secondary: #a78bfa;
  --bg: #020617;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --success: #22c55e;
  --radius: 22px;
  --blur: blur(18px);
  --shadow: 0 25px 50px rgba(0, 0, 0, 0.65);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 200vh;
  display: flex;
  flex-direction: column;
  cursor: none;

}

.cursor{
  width: 2em;
  height: 2em;
  position: fixed;
  pointer-events: none;
  z-index: 1000;
}

.header {
  background: linear-gradient(135deg, #1c0846, #14043a);
  padding: 3.5rem 1.5rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.header h1 {
  font-size: 2.6rem;
  font-weight: 700;
}

.container {
  width: 70%;
  margin: 2rem auto;
  padding: 0 1.5rem 2rem;
  flex: 1;
}

.card {
  background: var(--glass);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, border 0.3s ease;
  
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.instructions h3 {
  font-size: 2.1rem;
  margin-bottom: 1rem;
}

.instructions ol {
  margin-left: 1.5rem;
  color: var(--muted);
}

.instructions li {
  margin-bottom: 0.5rem;
}

label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  font-weight: 500;
}

textarea {
  width: 100%;
  min-height: 160px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.2rem;
  color: var(--text);
  font-size: 1.05rem;
  resize: vertical;
}

textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 124, 255, 0.3);
}

select {
  width: 100%;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.2rem;
  color: var(--text);
  font-size: 1.05rem;
}

.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.control-group label {
  display: block;
  margin-bottom: 0.5rem;
}

input[type="range"] {
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  appearance: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 12px var(--primary);
  cursor: pointer;
}

.button-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

#speak-btn,
#stop-btn {
  flex: 1;
  padding: 1.2rem;
  font-size: 1.05rem;
  border-radius: 18px;
  cursor: pointer;
  border: none;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary), #13082b);
  color: #e4e0f4;
  box-shadow: 0 4px 15px rgba(72, 75, 248, 0.4);
}

#speak-btn:hover,
#stop-btn:hover {
  background: linear-gradient(135deg, #3f1d89, var(--primary));
}

.status {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem;
  background: var(--glass);
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  font-size: 1.05rem;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.footer {
  background: var(--glass);
  border-top: 1px solid var(--glass-border);
  padding: 1.5rem;
  text-align: center;
}

.footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .controls-grid {
    grid-template-columns: 1fr;
  }

  .button-group {
    flex-direction: column;
  }
}
