@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  
  /* Refined color palette for a more premium look */
  --background: 220 20% 97%;
  --foreground: 220 25% 10%;
  
  --card: 0 0% 100%;
  --card-foreground: 220 25% 10%;
  
  --popover: 0 0% 100%;
  --popover-foreground: 220 25% 10%;
  
  --primary: 221 70% 55%;
  --primary-foreground: 210 40% 98%;
  
  --secondary: 210 20% 96%;
  --secondary-foreground: 220 25% 20%;
  
  --muted: 210 20% 96%;
  --muted-foreground: 220 10% 50%;
  
  --accent: 220 70% 95%;
  --accent-foreground: 220 25% 20%;
  
  --destructive: 0 70% 60%;
  --destructive-foreground: 210 40% 98%;
  
  --border: 220 15% 90%;
  --input: 220 15% 90%;
  --ring: 221 70% 55%;
  
  --radius: 0.75rem;
}

.dark {
  --background: 220 25% 9%;
  --foreground: 210 30% 98%;
  
  --card: 220 25% 12%;
  --card-foreground: 210 30% 98%;
  
  --popover: 220 25% 12%;
  --popover-foreground: 210 30% 98%;
  
  --primary: 217 80% 60%;
  --primary-foreground: 220 25% 10%;
  
  --secondary: 220 25% 16%;
  --secondary-foreground: 210 30% 98%;
  
  --muted: 220 25% 16%;
  --muted-foreground: 210 30% 70%;
  
  --accent: 220 25% 16%;
  --accent-foreground: 210 30% 98%;
  
  --destructive: 0 60% 50%;
  --destructive-foreground: 210 30% 98%;
  
  --border: 220 25% 18%;
  --input: 220 25% 18%;
  --ring: 224 70% 60%;
}

/* Apply dark mode to all elements when dark class is present */
.dark * {
  color-scheme: dark;
}

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

html {
  height: 100%;
  width: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  min-height: 100%;
  width: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ensure dark mode is applied to the entire document */
html.dark,
body.dark {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 0.5em;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

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

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

/* Layout */
.layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: hsl(var(--background));
  position: relative;
  width: 100%;
  overflow-x: hidden;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: hsla(var(--background), 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
  padding: 1.25rem 0;
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 2.5rem;
}

.header-left, .header-right {
  flex: 1;
}

.header-center {
  text-align: center;
  flex: 2;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.main {
  flex: 1;
  padding: 3rem 0;
  width: 100%;
  background-color: hsl(var(--background));
}

.footer {
  border-top: 1px solid hsl(var(--border));
  padding: 2rem 0;
  margin-top: 3rem;
  width: 100%;
  background-color: hsl(var(--background));
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2rem;
}

.col-span-6 {
  grid-column: span 6 / span 6;
}

.col-span-12 {
  grid-column: span 12 / span 12;
}

/* Components */
.card {
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  padding: 2rem;
  height: 100%;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid hsl(var(--border));
}

.card-header h2 {
  margin-bottom: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid hsl(var(--border));
}

.form-group {
  margin-bottom: 1.75rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  margin-bottom: 0.625rem;
  color: hsl(var(--foreground));
}

.input {
  display: flex;
  height: 2.75rem;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--input));
  background-color: transparent;
  padding-left: 0.875rem;
  padding-right: 0.875rem;
  font-size: 0.875rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  color: hsl(var(--foreground));
}

.input:focus {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.3);
  border-color: hsl(var(--ring));
}

.input::placeholder {
  color: hsl(var(--muted-foreground));
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.5;
  height: 2.75rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  gap: 0.5rem;
}

.btn i {
  font-size: 1rem;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
  background-color: hsl(var(--primary) / 0.9);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px 0 rgb(0 0 0 / 0.1);
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
  background-color: hsl(var(--secondary) / 0.8);
  transform: translateY(-1px);
}

.btn-destructive {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.btn-destructive:hover {
  background-color: hsl(var(--destructive) / 0.9);
  transform: translateY(-1px);
}

.btn-ghost {
  background-color: transparent;
  color: hsl(var(--foreground));
}

.btn-ghost:hover {
  background-color: hsl(var(--secondary));
}

.btn-icon {
  height: 2.5rem;
  width: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-sm {
  height: 2.25rem;
  padding-left: 0.875rem;
  padding-right: 0.875rem;
  font-size: 0.75rem;
}

.btn-lg {
  height: 3.25rem;
  padding-left: 1.75rem;
  padding-right: 1.75rem;
  font-size: 1rem;
}

.btn-disabled, .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0.25rem 0.75rem;
  height: 1.5rem;
  white-space: nowrap;
}

.badge-success {
  background-color: hsl(142, 70%, 45%);
  color: white;
}

.badge-warning {
  background-color: hsl(38, 92%, 50%);
  color: hsl(220 25% 10%);
}

.badge-error {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.table {
  width: 100%;
  caption-side: bottom;
  border-collapse: collapse;
}

.table th {
  font-weight: 500;
  text-align: left;
  color: hsl(var(--muted-foreground));
  padding: 1rem;
  border-bottom: 1px solid hsl(var(--border));
}

.table td {
  padding: 1rem;
  border-bottom: 1px solid hsl(var(--border));
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.progress {
  position: relative;
  width: 100%;
  height: 0.5rem;
  overflow: hidden;
  background-color: hsl(var(--secondary));
  border-radius: 9999px;
  margin: 1.5rem 0;
}

.progress-indicator {
  height: 100%;
  background-color: hsl(var(--primary));
  transition: width 0.3s ease;
}

/* Custom components */
.file-upload {
  position: relative;
  display: inline-block;
  cursor: pointer;
  width: 100%;
}

.file-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background-color: hsl(var(--secondary));
  border: 1px dashed hsl(var(--border));
  border-radius: var(--radius);
  transition: all 0.2s ease;
  cursor: pointer;
  height: 5rem;
}

.file-upload-label:hover {
  background-color: hsl(var(--secondary) / 0.8);
  border-color: hsl(var(--primary) / 0.5);
  transform: translateY(-1px);
}

.file-upload-label i {
  margin-right: 0.75rem;
  font-size: 1.25rem;
  color: hsl(var(--primary));
}

.file-upload input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-name {
  margin-top: 0.625rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  padding-left: 0.25rem;
}

.audio-visualizer {
  width: 100%;
  height: 4.5rem;
  background-color: hsl(var(--secondary));
  border-radius: var(--radius);
  margin: 1.25rem 0;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.visualizer-bars {
  display: flex;
  align-items: flex-end;
  height: 100%;
  padding: 0 0.25rem;
}

.visualizer-bar {
  flex: 1;
  background-color: hsl(var(--primary));
  margin: 0 1px;
  height: 5px;
  transition: height 0.1s ease;
}

.record-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.record-btn {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-size: 1.25rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.record-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.record-btn.recording {
  animation: pulse 1.5s infinite;
}

.record-btn.stopped {
  background-color: hsl(var(--primary));
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 hsl(var(--destructive) / 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px hsl(var(--destructive) / 0);
  }
  100% {
    box-shadow: 0 0 0 0 hsl(var(--destructive) / 0);
  }
}

.timer {
  font-size: 1.5rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  min-width: 4rem;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.stat-card {
  background-color: hsl(var(--secondary));
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  padding: 1.25rem 1rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 600;
  color: hsl(var(--primary));
  line-height: 1.2;
}

.stat-label {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.375rem;
  font-weight: 500;
}

.recording-item {
  display: flex;
  align-items: center;
  padding: 1.25rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  margin-bottom: 1rem;
  transition: all 0.2s ease;
  background-color: hsl(var(--card));
}

.recording-item:hover {
  background-color: hsl(var(--secondary));
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.recording-item audio {
  width: 250px;
  height: 40px;
}

.recording-info {
  flex: 1;
  margin-left: 1.25rem;
}

.recording-title {
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: hsl(var(--foreground));
}

.recording-date {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 1000;
  max-width: 350px;
}

.toast {
  position: relative;
  background-color: hsl(var(--card));
  border-left: 4px solid hsl(var(--primary));
  padding: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: var(--radius);
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  width: 100%;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-success {
  border-left-color: hsl(142, 70%, 45%);
}

.toast-error {
  border-left-color: hsl(var(--destructive));
}

.toast-warning {
  border-left-color: hsl(25, 95%, 53%);
}

.toast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.toast-title {
  font-weight: 600;
  margin: 0;
  font-size: 1rem;
}

.toast-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
}

.toast-body {
  font-size: 0.875rem;
}

.theme-toggle {
  position: relative;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  font-size: 1.25rem;
  cursor: pointer;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.theme-toggle:hover {
  background-color: hsl(var(--secondary));
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.theme-toggle:active {
  transform: translateY(0);
}

.dark .theme-toggle {
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border-color: hsl(var(--border));
}

/* Processing Animation and Progress Indicators */
.processing-animation {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
}

.spinner {
  width: 3rem;
  height: 3rem;
  border: 4px solid hsl(var(--secondary));
  border-top: 4px solid hsl(var(--primary));
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

.detailed-progress {
  background-color: hsl(var(--secondary));
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.progress-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid hsl(var(--border));
}

.progress-item:last-child {
  border-bottom: none;
}

.progress-label {
  font-weight: 500;
  color: hsl(var(--foreground));
}

.progress-value {
  font-weight: 600;
  color: hsl(var(--primary));
}

/* Completion Message */
.completion-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background-color: hsl(var(--secondary));
  border-radius: var(--radius);
  text-align: center;
}

.completion-icon {
  font-size: 3rem;
  color: hsl(142, 70%, 45%);
  margin-bottom: 1rem;
}

.completion-message h3 {
  margin-bottom: 0.5rem;
  color: hsl(var(--foreground));
}

.completion-message p {
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.5rem;
}

.completion-summary {
  display: flex;
  justify-content: center;
  gap: 2rem;
  width: 100%;
}

.summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.summary-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: hsl(var(--primary));
}

.summary-label {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .grid {
    gap: 1.5rem;
  }
  
  .col-span-6 {
    grid-column: span 12 / span 12;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }
  
  .header-inner {
    padding: 0.5rem 0;
  }
  
  .header-center h1 {
    font-size: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .record-controls {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .recording-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .recording-item audio {
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .recording-info {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .header-inner {
    flex-direction: column;
    height: auto;
    gap: 1rem;
    padding: 0.75rem 0;
  }
  
  .header-left {
    order: 2;
    width: 100%;
  }
  
  .header-center {
    order: 1;
    width: 100%;
  }
  
  .header-right {
    display: none;
  }
  
  .nav-buttons {
    justify-content: center;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .card {
    padding: 1.25rem;
  }
} 