:root {
    --primary-color: #0A66C2;
    --primary-light: #E8F1FA;
    --primary-dark: #004182;
    --accent-color: #FF5630;
    --success-color: #36B37E;
    --warning-color: #FFAB00;
    --light-color: #F9FAFB;
    --dark-color: #101828;
    --gray-color: #667085;
    --gray-light: #E4E7EC;
    --border-color: #D0D5DD;
    --background-color: #FFFFFF;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --box-shadow-sm: 0px 1px 3px rgba(16, 24, 40, 0.1), 0px 1px 2px rgba(16, 24, 40, 0.06);
    --box-shadow-md: 0px 4px 8px -2px rgba(16, 24, 40, 0.1), 0px 2px 4px -2px rgba(16, 24, 40, 0.06);
    --box-shadow-lg: 0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: var(--font-family);
    line-height: 1.5;
    color: var(--dark-color);
    background-color: var(--light-color);
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  .app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: var(--light-color);
    position: relative;
  }
  
  .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--box-shadow-sm);
    z-index: 10;
  }
  
  .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  
  .logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
  }
  
  .logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
  }
  
  .main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    padding: 1.5rem;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
  }
  
  .card {
    background-color: var(--background-color);
    border-radius: 12px;
    box-shadow: var(--box-shadow-md);
    overflow: hidden;
  }
  
  .control-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--background-color);
    flex-wrap: wrap;
  }
  
  .language-select-container {
    display: flex;
    align-items: center;
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 0.5rem;
    height: 40px;
    min-width: 180px;
  }
  
  .language-select {
    border: none;
    padding: 0.5rem;
    font-family: var(--font-family);
    font-size: 0.875rem;
    color: var(--dark-color);
    background-color: transparent;
    width: 100%;
  }
  
  .language-select:focus {
    outline: none;
  }
  
  .action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-left: auto;
  }
  
  .action-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    height: 40px;
    padding: 0 1rem;
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-color);
  }
  
  .action-btn:hover:not(:disabled) {
    background-color: var(--light-color);
    color: var(--dark-color);
  }
  
  .action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .action-btn.danger {
    color: var(--accent-color);
  }
  
  .action-btn.danger:hover:not(:disabled) {
    background-color: rgba(255, 86, 48, 0.05);
  }
  
  .text-container {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
  }
  
  .text-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
  }
  
  .text-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
  }
  
  .text-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--gray-light);
  }
  
  .status-dot.active {
    background-color: var(--success-color);
  }
  
  .text-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray-color);
  }
  
  .stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
  
  .stat-value {
    font-weight: 500;
    color: var(--dark-color);
  }
  
  .text-area-container {
    flex: 1;
    overflow: hidden;
    position: relative;
  }
  
  .text-area {
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--dark-color);
    border: none;
    resize: none;
    outline: none;
    overflow-y: auto;
  }
  
  .text-area:focus {
    outline: none;
  }
  
  .visualization-container {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 120px;
    height: 120px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
  }
  
  .visualization-container.active {
    opacity: 1;
  }
  
  .audio-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .wave-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    z-index: 2;
    box-shadow: var(--box-shadow-sm);
  }
  
  .audio-wave-circle {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid var(--accent-color);
    animation-name: wave-animation;
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    opacity: 0;
  }
  
  .wave-1 {
    width: 100%;
    height: 100%;
    animation-delay: 0s;
  }
  
  .wave-2 {
    width: 100%;
    height: 100%;
    animation-delay: 0.7s;
  }
  
  .wave-3 {
    width: 100%;
    height: 100%;
    animation-delay: 1.4s;
  }
  
  @keyframes wave-animation {
    0% {
      transform: scale(0.65);
      opacity: 0.4;
    }
    50% {
      opacity: 0.2;
    }
    100% {
      transform: scale(1.3);
      opacity: 0;
    }
  }
  
  .footer {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color);
    box-shadow: var(--box-shadow-sm);
    z-index: 10;
  }
  
  .record-button {
    width: 64px;
    height: 64px;
    border-radius: 32px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--box-shadow-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
  }
  
  .record-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .record-button:hover::before {
    opacity: 1;
  }
  
  .record-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 15px 20px rgba(0, 65, 130, 0.3);
  }
  
  .record-button:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 15px rgba(0, 65, 130, 0.2);
  }
  
  .record-button.active {
    background-color: var(--accent-color);
    animation: pulse-record 2s infinite;
  }
  
  @keyframes pulse-record {
    0% {
      box-shadow: 0 0 0 0 rgba(255, 86, 48, 0.5);
    }
    70% {
      box-shadow: 0 0 0 15px rgba(255, 86, 48, 0);
    }
    100% {
      box-shadow: 0 0 0 0 rgba(255, 86, 48, 0);
    }
  }
  
  .footer-controls {
    display: flex;
    flex: 1;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    align-items: center;
  }
  
  .listening-status {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .listening-status.active {
    color: var(--primary-color);
  }
  
  .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-color);
    animation: blink 1.5s infinite;
  }
  
  @keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
    .main-container {
      padding: 1rem;
      gap: 1rem;
    }
    
    .control-panel {
      padding: 0.75rem;
    }
    
    .language-select-container {
      flex: 1;
      min-width: auto;
    }
    
    .action-buttons {
      margin-left: 0;
      flex: 1;
      justify-content: flex-end;
    }
    
    .text-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
    }
    
    .text-stats {
      width: 100%;
      justify-content: space-between;
    }
    
    .text-area {
      padding: 1rem;
    }
    
    .visualization-container {
      width: 100px;
      height: 100px;
      bottom: 1rem;
      right: 1rem;
    }
    
    .record-button {
      width: 56px;
      height: 56px;
    }
  }
  
  @media (max-width: 480px) {
    .header {
      padding: 0.75rem 1rem;
    }
    
    .main-container {
      padding: 0.75rem;
    }
    
    .control-panel {
      flex-direction: column;
      align-items: stretch;
      gap: 0.75rem;
    }
    
    .action-buttons {
      justify-content: space-between;
    }
    
    .action-btn {
      flex: 1;
      padding: 0 0.5rem;
    }
    
    .action-btn span {
      display: none;
    }
    
    .visualization-container {
      width: 80px;
      height: 80px;
    }
    
    .footer {
      padding: 0.75rem 1rem;
    }
  }