:root {
  --bg-color: #050b14;
  --card-bg: rgba(15, 23, 42, 0.65);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --secondary: #ec4899;
  --danger: #ef4444;
  --glow: rgba(99, 102, 241, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  padding: 2rem;
}

/* Background Animated Blobs */
.bg-shape {
  position: absolute;
  filter: blur(120px);
  z-index: -1;
  border-radius: 50%;
  opacity: 0.4;
  animation: float 20s infinite alternate;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -200px;
  left: -200px;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: var(--secondary);
  bottom: -150px;
  right: -100px;
  animation-delay: -5s;
}

.shape-3 {
  width: 300px;
  height: 300px;
  background: #3b82f6;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.2;
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 30px) scale(1.1); }
  100% { transform: translate(-30px, 80px) scale(0.9); }
}

.container {
  max-width: 900px;
  width: 100%;
  z-index: 1;
}

/* Header */
.app-header {
  text-align: center;
  margin-bottom: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 25px var(--glow);
  color: white;
}

h1 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.3rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.15rem;
  font-weight: 300;
}

/* Grid Layout */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  
  body {
    padding: 1rem;
    align-items: flex-start;
  }
  
  .app-header {
    margin-top: 2rem;
    margin-bottom: 2.5rem;
  }
}

/* Cards */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 2.2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.7);
  border-color: rgba(255,255,255,0.15);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1rem;
}

.step-badge {
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  font-size: 1.1rem;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.1);
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
}

/* Inputs */
.input-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 0.6rem;
}

input[type="text"], textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1rem;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
}

input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  background: rgba(0,0,0,0.4);
}

input[type="text"]::placeholder, textarea::placeholder {
  color: rgba(255,255,255,0.2);
}

textarea {
  resize: vertical;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: 14px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.primary-btn {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border: 1px solid rgba(255,255,255,0.1);
}

.primary-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

.danger-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.danger-btn:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
  transform: translateY(-2px);
}

.submit-btn {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  padding: 1rem;
}

.submit-btn:hover:not(:disabled) {
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
  transform: translateY(-3px);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.brand-btn {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
}

.brand-btn:hover:not(:disabled) {
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.6);
}

.w-full {
  width: 100%;
}

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.8rem; }

.btn-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.btn-row .btn {
  flex: 1;
}

/* Status text & indicator */
.record-section {
  background: rgba(0,0,0,0.15);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255,255,255,0.03);
}

.status-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: rgba(0,0,0,0.2);
  padding: 0.6rem;
  border-radius: 10px;
}

.recording-dot {
  width: 10px;
  height: 10px;
  background-color: var(--danger);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--danger);
}

.animate-pulse {
  animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.2); }
}

.hidden {
  display: none !important;
}

.status-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.status-msg {
  font-size: 0.95rem;
  text-align: center;
  min-height: 20px;
  color: #a78bfa;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.8rem 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.divider span {
  padding: 0 15px;
}

/* Custom File Upload */
.upload-section {
  margin-bottom: 1.5rem;
}

.file-upload-wrapper {
  position: relative;
  width: 100%;
  height: 65px;
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 14px;
  background: rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  overflow: hidden;
}

.file-upload-wrapper:hover {
  border-color: rgba(167, 139, 250, 0.5);
  background: rgba(139, 92, 246, 0.05);
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.file-upload-display {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
  font-weight: 500;
}

/* Custom Audio Player Wrapper */
.custom-audio {
  width: 100%;
  height: 44px;
  border-radius: 22px;
  outline: none;
}

audio::-webkit-media-controls-panel {
  background-color: rgba(255,255,255,0.08);
}
audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
  color: #e2e8f0;
  font-family: 'Outfit', sans-serif;
}
audio::-webkit-media-controls-play-button {
  background-color: rgba(255,255,255,0.9);
  border-radius: 50%;
}
