:root {
  /* Colors */
  --color-background: rgba(252, 252, 249, 1);
  --color-surface: rgba(255, 255, 253, 1);
  --color-text: rgba(19, 52, 59, 1);
  --color-text-secondary: rgba(98, 108, 113, 1);
  --color-primary: rgba(33, 128, 141, 1);
  --color-primary-hover: rgba(29, 116, 128, 1);
  --color-primary-active: rgba(26, 104, 115, 1);
  --color-secondary: rgba(94, 82, 64, 0.12);
  --color-secondary-hover: rgba(94, 82, 64, 0.2);
  --color-secondary-active: rgba(94, 82, 64, 0.25);
  --color-border: rgba(94, 82, 64, 0.2);
  --color-btn-primary-text: rgba(252, 252, 249, 1);
  --color-card-border: rgba(94, 82, 64, 0.12);
  --color-card-border-inner: rgba(94, 82, 64, 0.12);
  --color-error: rgba(192, 21, 47, 1);
  --color-success: rgba(33, 128, 141, 1);
  --color-warning: rgba(168, 75, 47, 1);
  --color-info: rgba(98, 108, 113, 1);
  --color-focus-ring: rgba(33, 128, 141, 0.4);
  --color-select-caret: rgba(19, 52, 59, 0.8);

  /* Common style patterns */
  --focus-ring: 0 0 0 3px var(--color-focus-ring);
  --focus-outline: 2px solid var(--color-primary);
  --status-bg-opacity: 0.15;
  --status-border-opacity: 0.25;
  --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

  /* RGB versions for opacity control */
  --color-success-rgb: 33, 128, 141;
  --color-error-rgb: 192, 21, 47;
  --color-warning-rgb: 168, 75, 47;
  --color-info-rgb: 98, 108, 113;

  /* Typography */
  --font-family-base: "Geist", "Inter", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-mono: "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo,
    Monaco, Consolas, monospace;
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 20px;
  --font-size-3xl: 24px;
  --font-size-4xl: 30px;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 550;
  --font-weight-bold: 600;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --letter-spacing-tight: -0.01em;

  /* Spacing */
  --space-0: 0;
  --space-1: 1px;
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-base: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04),
    0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04),
    0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03);

  /* Animation */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
}

/* Inter */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100; font-display: swap; src: url("fonts/inter/Inter-Thin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100; font-display: swap; src: url("fonts/inter/Inter-ThinItalic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 200; font-display: swap; src: url("fonts/inter/Inter-ExtraLight.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 200; font-display: swap; src: url("fonts/inter/Inter-ExtraLightItalic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/inter/Inter-Light.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 300; font-display: swap; src: url("fonts/inter/Inter-LightItalic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/inter/Inter-Italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter/Inter-Medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 500; font-display: swap; src: url("fonts/inter/Inter-MediumItalic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter/Inter-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 600; font-display: swap; src: url("fonts/inter/Inter-SemiBoldItalic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter/Inter-Bold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 700; font-display: swap; src: url("fonts/inter/Inter-BoldItalic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/inter/Inter-ExtraBold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 800; font-display: swap; src: url("fonts/inter/Inter-ExtraBoldItalic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 900; font-display: swap; src: url("fonts/inter/Inter-Black.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 900; font-display: swap; src: url("fonts/inter/Inter-BlackItalic.woff2") format("woff2"); }

/* Inter end */

/* Base styles */
html {
  font-size: var(--font-size-2xl);
  font-family: var(--font-family-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  display: grid;
  justify-items: center;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  letter-spacing: var(--letter-spacing-tight);
}

h1 {
  font-size: var(--font-size-4xl);
}
h2 {
  font-size: var(--font-size-3xl);
}
h3 {
  font-size: var(--font-size-2xl);
}
h4 {
  font-size: var(--font-size-xl);
}
h5 {
  font-size: var(--font-size-lg);
}
h6 {
  font-size: var(--font-size-md);
}

p {
  margin: 0 0 var(--space-16) 0;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

a:hover {
  color: var(--color-primary-hover);
}

code,
pre {
  font-family: var(--font-family-mono);
  font-size: calc(var(--font-size-base) * 0.95);
  background-color: var(--color-secondary);
  border-radius: var(--radius-sm);
}

code {
  padding: var(--space-1) var(--space-4);
}

pre {
  padding: var(--space-16);
  margin: var(--space-16) 0;
  overflow: auto;
  border: 1px solid var(--color-border);
}

pre code {
  background: none;
  padding: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-base);
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
  border: none;
  text-decoration: none;
  position: relative;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

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

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

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

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

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

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

.btn--outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

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

.btn--sm {
  padding: var(--space-4) var(--space-12);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
}

.btn--lg {
  padding: var(--space-10) var(--space-20);
  font-size: var(--font-size-lg);
  border-radius: var(--radius-md);
}

.btn--full-width {
  width: 100%;
}

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

/* Form elements */
.form-control {
  display: block;
  width: 100%;
  padding: var(--space-8) var(--space-12);
  font-size: var(--font-size-md);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  transition: border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

textarea.form-control {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
}

select.form-control {
  padding: var(--space-8) var(--space-12);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: var(--select-caret-light);
  background-repeat: no-repeat;
  background-position: right var(--space-12) center;
  background-size: 16px;
  padding-right: var(--space-32);
}

/* Add a dark mode specific caret */
@media (prefers-color-scheme: dark) {
  select.form-control {
    background-image: var(--select-caret-dark);
  }
}

/* Also handle data-color-scheme */
[data-color-scheme="dark"] select.form-control {
  background-image: var(--select-caret-dark);
}

[data-color-scheme="light"] select.form-control {
  background-image: var(--select-caret-light);
}

.form-control:focus {
  border-color: var(--color-primary);
  outline: var(--focus-outline);
}

.form-label {
  display: block;
  margin-bottom: var(--space-8);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.form-group {
  margin-bottom: var(--space-16);
}

/* Card component */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-card-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--duration-normal) var(--ease-standard);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card__body {
  padding: var(--space-16);
}

.card__header,
.card__footer {
  padding: var(--space-16);
  border-bottom: 1px solid var(--color-card-border-inner);
}

/* Status indicators - simplified with CSS variables */
.status {
  display: inline-flex;
  align-items: center;
  padding: var(--space-6) var(--space-12);
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.status--success {
  background-color: rgba(
    var(--color-success-rgb, 33, 128, 141),
    var(--status-bg-opacity)
  );
  color: var(--color-success);
  border: 1px solid
    rgba(var(--color-success-rgb, 33, 128, 141), var(--status-border-opacity));
}

.status--error {
  background-color: rgba(
    var(--color-error-rgb, 192, 21, 47),
    var(--status-bg-opacity)
  );
  color: var(--color-error);
  border: 1px solid
    rgba(var(--color-error-rgb, 192, 21, 47), var(--status-border-opacity));
}

.status--warning {
  background-color: rgba(
    var(--color-warning-rgb, 168, 75, 47),
    var(--status-bg-opacity)
  );
  color: var(--color-warning);
  border: 1px solid
    rgba(var(--color-warning-rgb, 168, 75, 47), var(--status-border-opacity));
}

.status--info {
  background-color: rgba(
    var(--color-info-rgb, 98, 108, 113),
    var(--status-bg-opacity)
  );
  color: var(--color-info);
  border: 1px solid
    rgba(var(--color-info-rgb, 98, 108, 113), var(--status-border-opacity));
}

/* Container layout */
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--space-16);
  padding-left: var(--space-16);
}

@media (min-width: 640px) {
  .container {
    max-width: var(--container-sm);
  }
}
@media (min-width: 768px) {
  .container {
    max-width: var(--container-md);
  }
}
@media (min-width: 1024px) {
  .container {
    max-width: var(--container-lg);
  }
}
@media (min-width: 1280px) {
  .container {
    max-width: var(--container-xl);
  }
}

/* Utility classes */
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-4 {
  gap: var(--space-4);
}
.gap-8 {
  gap: var(--space-8);
}
.gap-16 {
  gap: var(--space-16);
}

.m-0 {
  margin: 0;
}
.mt-8 {
  margin-top: var(--space-8);
}
.mb-8 {
  margin-bottom: var(--space-8);
}
.mx-8 {
  margin-left: var(--space-8);
  margin-right: var(--space-8);
}
.my-8 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
}

.p-0 {
  padding: 0;
}
.py-8 {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}
.px-8 {
  padding-left: var(--space-8);
  padding-right: var(--space-8);
}
.py-16 {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}
.px-16 {
  padding-left: var(--space-16);
  padding-right: var(--space-16);
}

.block {
  display: block;
}
.hidden {
  display: none;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

/* Dark mode specifics */
[data-color-scheme="dark"] .btn--outline {
  border: 1px solid var(--color-border-secondary);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: auto;
    min-height: 100vh;
    height: 100%;
}

body.protocol-tab-active {
  overflow-y: hidden;
}

/* Background and container */
.app-container {
    height: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gradient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e7ef 0%, #f4f8fb 100%);
    z-index: -1;
}

/* Main glass container */
.glass-container {
    background: rgb(255 255 255 / 43%);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
}

#voice_mic_textContent .glass-container {
    max-width: 600px;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 32px;
}

.app-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-subtitle {
    font-size: 16px;
    color: #6b7280;
    font-weight: 400;
}

/* Status indicator */
.status-container {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.status-dot.unavailable {
    background-color: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.status-dot.available {
    background-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.status-dot.checking {
    background-color: #f59e0b;
    animation: pulse 2s infinite;
}

.status-text {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

/* Record section */
.record-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
    position: relative;
}

.record-button {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: inherit;
    margin-bottom: 16px;
}

.record-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    width: 150px;
    height: 150px;
}

.record-button.wait {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.record-button.wait:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.4);
}

.record-button.recording {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.3);
    animation: recordingPulse 2s infinite;
}

.record-button.unavailable {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

.record-button.unavailable .record-icon {
  display: none;
}

.record-icon {
    width: 32px;
    height: 32px;
}

.record-text {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

/* Wave animation */
.wave-container {
    display: flex;
    visibility: hidden;
    transition: visibility 0.3s ease;
    align-items: center;
    gap: 4px;
    height: 10px;
}

.wave-container.active {
    visibility: visible;
}

.wave-container.processing .wave {
    background: #4CAF50; /* Green color for processing state */
}

.wave {
    width: 3px;
    height: 20px;
    background: linear-gradient(to top, #f97316, #ea580c);
    border-radius: 2px;
    animation: waveAnimation 1s ease-in-out infinite;
    transform-origin: bottom;
}

@keyframes waveAnimation {
    0%, 100% {
        height: 4px;
    }
    50% {
        height: 20px;
    }
}

/* Transcription section */
.transcription-section {
    /* margin-bottom: 24px; */
}

.transcription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.transcription-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 500;
    color: #1f2937;
}

.transcription-buttons {
    display: flex;
    gap: 8px;
}

.copy-button,
.reset-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-button {
    color: #000;
    background: rgba(255, 255, 255, 0.4);
}

.reset-button {
    color: #ff6b6b;
}

.copy-button:hover,
.reset-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.copy-button:hover {
    background: rgba(255, 255, 255, 0.6);
}

.reset-button:hover {
    background: rgba(255, 107, 107, 0.1);
}

.copy-button:active,
.reset-button:active {
    transform: scale(0.98);
}

.transcription-display.no-border {
  border: 0;
}

.transcription-display {
  display: grid;
  width: 100%;
  min-height: 140px;
  max-height: 200px;
  transition: width 0.3s;
  background: var(--color-surface);
  border: 0;
  padding: 0;
  overflow-y: auto;
  margin-bottom: 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.transcription-content {
  display: flex;
  justify-content: center;
}

.placeholder-text {
  color: #9ca3af;
  font-style: italic;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 40px;
  font-size: var(--font-size-base);
}

.translation-text {
  width: 557px;
  padding: 12px;
}

.transcription-text {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Footer */
.app-footer {
    text-align: center;
    padding-top: 8px;
}

.footer-text {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loading-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 16px;
    min-width: 300px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1001;
}

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

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.notification-text {
    color: #1f2937;
    font-size: 14px;
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: #374151;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes recordingPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(249, 115, 22, 0.3);
    }
    50% {
        box-shadow: 0 4px 30px rgba(249, 115, 22, 0.6);
    }
}

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

/* Responsive design */
@media (max-width: 768px) {
    .glass-container {
        padding: 24px;
        margin: 16px;
    }
    
    .app-title {
        font-size: 24px;
    }
    
    .record-button {
        width: 150px;
        height: 150px;
    }
    
    .record-icon {
        width: 28px;
        height: 28px;
    }
    
    .transcription-display {
        min-height: 140px;
        max-height: 140px;
        padding: 0;
    }
    
    .notification {
        right: 16px;
        left: 16px;
        min-width: auto;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 6px;
    }
    
    .glass-container {
        padding: 20px;
    }
    
    .transcription-header {
        align-items: flex-start;
        gap: 12px;
    }
    
    .copy-button {
        align-self: flex-end;
    }
}

/* Tabs */
.tabs-container {
    display: flex;
    gap: 1px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 16px;
}

.tab-button {
    padding: 12px 24px;
    border: none;
    background: none;
    color: rgba(0, 0, 0, 0.6);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
}

.tab-button:hover:not(.active) {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.8);
}

.tab-button.active {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
    font-weight: 600;
}

.tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-content {
    position: relative;
}

.tab-pane {
    display: block;
    visibility: hidden;
    opacity: 0;
    height: 0;
    width: 0;
    /*transition: opacity 0.3s ease;*/
}

.tab-pane.active {
    visibility: visible;
    display: block;
    opacity: 1;
    height: 100%;
    width: unset;
}

.protocol-container {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.protocol-placeholder {
    font-size: 14px;
}

/* Компактная шапка */
.header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: var(--space-8) 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  min-height: 40px;
}

/* Голосовые элементы управления */
.voice-controls {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  flex: 1;
  max-width: 500px;
}

.btn-mic {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-primary);
  background: var(--color-surface);
  color: var(--color-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-normal) var(--ease-standard);
  flex-shrink: 0;
}

.btn-mic:hover {
  background: var(--color-primary);
  color: var(--color-btn-primary-text);
}

.btn-mic.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: var(--color-error);
  color: white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.voice-input-group {
  display: flex;
  gap: var(--space-4);
  flex: 1;
}

.voice-input {
  flex: 1;
  padding: var(--space-6) var(--space-12);
  font-size: var(--font-size-sm);
}

.btn-send {
  padding: var(--space-6) var(--space-12);
  border-radius: var(--radius-base);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
}

/* Прогресс-бар */
.progress-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 200px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

.progress-percent {
  font-weight: var(--font-weight-medium);
  color: var(--color-primary);
}

.progress-bar {
  width: 100%;
  height: 4px;
  background-color: var(--color-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width var(--duration-normal) var(--ease-standard);
  width: 60%;
}

/* Основное содержимое */
.main {
  padding: var(--space-16) 0;
  min-height: calc(100vh - 300px);
}

/* Секции формы */
.form-sections {
  display: grid;
  gap: var(--space-12);
}

.section {
  background-color: rgb(230 244 243 / 28%);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--duration-normal) var(--ease-standard);
}

.section:hover {
  box-shadow: var(--shadow-md);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-12) var(--space-16);
  background-color: rgb(142 151 128 / 13%);
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--color-card-border-inner);
  transition: background-color var(--duration-fast) var(--ease-standard);
}

.section-header:hover {
  background-color: rgb(239 185 106 / 21%);
}

.section-title {
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-md);
  margin: 0;
  color: var(--color-text);
}

.section-toggle {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-normal) var(--ease-standard);
}

.section.expanded .section-toggle {
  transform: rotate(180deg);
}

.section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-normal) var(--ease-standard);
}

.section.expanded .section-content {
  max-height: 2000px;
}

.fields-grid {
  padding: var(--space-16);
  display: grid;
  gap: var(--space-12);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Поля */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: flex-start;
}

.field-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  line-height: var(--line-height-tight);
}

.field-value {
  width: 100%;
  padding: var(--space-6) var(--space-8);
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-standard);
  min-height: 32px;
  display: flex;
  align-items: center;
}

.field-value:hover {
  border-color: var(--color-primary);
  background-color: var(--color-surface);
}

.field-value.empty {
  color: var(--color-text-secondary);
  font-style: italic;
}

.field-value.filled {
  background-color: rgba(var(--color-success-rgb), 0.1);
  border-color: var(--color-success);
}

/* Индикатор голосового ввода */
.voice-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.voice-indicator.active {
  display: flex;
}

.voice-indicator-content {
  background-color: var(--color-surface);
  padding: var(--space-32);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-16);
}

.pulse-animation {
  width: 60px;
  height: 60px;
  background-color: var(--color-error);
  border-radius: var(--radius-full);
  animation: voicePulse 1.5s infinite;
}

@keyframes voicePulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

/* Модальное окно */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-16);
  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-secondary);
}

.modal-header h3 {
  margin: 0;
  font-size: var(--font-size-lg);
}

.modal-close {
  background: none;
  border: none;
  font-size: var(--font-size-xl);
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  transition: background-color var(--duration-fast) var(--ease-standard);
}

.modal-close:hover {
  background-color: var(--color-secondary-hover);
}

.modal-body {
  padding: var(--space-16);
  overflow-y: auto;
  flex: 1;
}

.field-search {
  margin-bottom: var(--space-16);
}

.field-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  max-height: 300px;
  overflow-y: auto;
}

.field-option {
  padding: var(--space-8) var(--space-12);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-standard);
  font-size: var(--font-size-sm);
}

.field-option:hover {
  background-color: var(--color-secondary);
  border-color: var(--color-primary);
}

.field-option.selected {
  background-color: var(--color-primary);
  color: var(--color-btn-primary-text);
}

/* Адаптивность */
@media (min-width: 768px) {
  .header-content {
    min-height: 48px;
  }
  
  .voice-controls {
    max-width: 600px;
  }
  
  .fields-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-16);
  }
  
  .field-value {
    padding: var(--space-8) var(--space-12);
    min-height: 36px;
  }
}

@media (min-width: 1024px) {
  .fields-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  }
  
  .header-content {
    gap: var(--space-24);
  }
  
  .progress-section {
    min-width: 250px;
  }
}

@media (max-width: 767px) {
  .header-content {
    flex-direction: column;
    gap: var(--space-8);
    align-items: stretch;
  }
  
  .voice-controls {
    max-width: none;
  }
  
  .progress-section {
    min-width: auto;
  }
  
  .fields-grid {
    grid-template-columns: 1fr;
  }
  
  .modal {
    width: 95%;
    margin: var(--space-16);
  }
}

/* Loading Overlay Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
}

.spinner {
    animation: rotate 2s linear infinite;
    width: 50px;
    height: 50px;
}

.spinner .path {
    stroke: #2196F3;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 80px;
    right: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1002;
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
}

.notification.success {
    background: var(--color-success);
    color: var(--color-btn-primary-text);
}

.notification.error {
    background: var(--color-error);
    color: var(--color-btn-primary-text);
}

.notification.warning {
    background: var(--color-warning);
    color: var(--color-btn-primary-text);
}

.notification.info {
    background: var(--color-info);
    color: var(--color-btn-primary-text);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Server Responses Styles */
.server-responses {
    width: 100%;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    padding: 12px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
}

.server-responses:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

/* Две колонки: распознанный текст и перевод */
.transcription-columns {
  display: flex;
  flex-direction: row;
  gap: 0;
  width: 100%;
  min-height: 200px;
  max-height: 300px;
}
.translation-display {
  width: 100%;
  min-height: 150px;
  max-height: 150px;
  position: relative;
  background: var(--color-surface);
  border-radius: 0 0 14px 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  transition: width 0.3s, opacity 0.3s;
  overflow-y: auto;
}
.translation-header-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 0;
  font-size: 16px;
  font-weight: 500;
  background: var(--color-surface);
  padding: 12px;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  text-transform: uppercase;
}
.translation-section {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.exchange-icon {
  color: var(--color-primary);
  transition: transform 0.2s ease;
}
.exchange-icon:hover {
  transform: scale(1.1);
}
.translation-content {
  width: 100%;
  flex: 1 1 auto;
  align-self: stretch;
}
.collapse-btn, .expand-btn {
  background: none;
  border: none;
  cursor: pointer;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.2s;
  color: var(--color-primary);
}
.collapse-btn:hover, .expand-btn:hover {
  background: var(--color-secondary);
}
.expand-btn {
  right: 12px;
  left: auto;
}
/* Скрытие правой области */
.transcription-columns.collapsed .translation-display {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  padding: 0 !important;
  opacity: 1;
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}
.transcription-columns.collapsed .translation-content {
  display: none;
}
.transcription-columns.collapsed .collapse-btn {
  display: none;
}
.transcription-columns.collapsed .expand-btn {
  display: block !important;
  position: absolute;
  top: 12px;
  right: 10px;
  left: auto;
  z-index: 3;
}
.transcription-columns .expand-btn {
  display: none;
}
.transcription-columns.collapsed .transcription-display {
  flex: 1 1 auto;
  width: 100%;
  border-radius: 0;
  border-right: none;
  transition: width 0.3s;
}
@media (max-width: 900px) {
  .transcription-columns {
    flex-direction: column;
    min-height: 0;
    max-height: none;
  }
  .transcription-display, .translation-display {
    border-radius: 0;
    border-right: none;
    border-left: none;
    border-bottom: 1px solid var(--color-border);
    padding: 0;
  }
  .translation-display {
    border-radius: 0 0 14px 14px;
    border-bottom: none;
    border-top: 1px solid var(--color-border);
  }
  .transcription-columns.collapsed .translation-display {
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    opacity: 0;
  }
  .transcription-columns.collapsed .transcription-display {
    border-radius: 0;
    border-bottom: none;
  }
}
.transcription-columns.collapsed .translation-display > :not(.expand-btn) {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.transcription-columns.collapsed .translation-display > .expand-btn {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s;
}

.language-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.language-modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  min-width: 320px;
  max-width: 90vw;
  padding: 0 0 12px 0;
  animation: fadeIn 0.2s;
}
.language-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 10px 20px;
  border-bottom: 1px solid #eee;
  font-size: 17px;
  font-weight: 500;
}
.language-modal-list {
  padding: 8px 0;
}
.language-modal-list-item {
  padding: 12px 20px;
  cursor: pointer;
  font-size: 16px;
  color: #222;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.language-modal-list-item:hover, .language-modal-list-item.selected {
  background: #f0f4f8;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.transcription-display--relative {
  position: relative;
}
.translation-display--relative {
  position: relative;
}
.speak-transcription-btn {
  position: absolute;
  bottom: 60px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  color: black;
  background: rgba(255,255,255,0.8);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  cursor: pointer;
  transition: all 0.2s;
}

.speak-transcription-btn:hover {
  background: #f0f4f8;
  transform: scale(1.05);
}

.speak-transcription-btn:active {
  transform: scale(0.95);
}

.speak-translation-btn {
  position: absolute;
  bottom: 60px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  color: black;
  background: rgba(255,255,255,0.8);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  cursor: pointer;
  transition: all 0.2s;
}

.speak-translation-btn {
  position: absolute;
  bottom: 60px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  color: black;
  background: rgba(255,255,255,0.8);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  cursor: pointer;
  transition: all 0.2s;
}

.speak-translation-btn:hover {
  background: #f0f4f8;
  transform: scale(1.05);
}

.speak-translation-btn:active {
  transform: scale(0.95);
}

.copy-transcription-btn, .copy-translation-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.8);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  cursor: pointer;
  transition: background 0.2s;
}
.copy-transcription-btn:hover, .copy-translation-btn:hover {
  background: #f0f4f8;
}
.copy-transcription-btn:active, .copy-translation-btn:active {
  transform: scale(0.95);
}

.translation-language-select {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.translation-language-current {
  font-weight: 500;
}
.translation-language-arrow {
  margin-left: 2px;
}

.tab-pane.translation-hidden .translation-display {
    display: none;
}

.tab-pane.translation-hidden .transcription-display {
    max-height: 400px;
    border-bottom: none;
    border-radius: 0;
    background: transparent;
}

.translation-display--hidden {
  display: none !important;
}

.transcription-textarea {
  width: 100%;
  min-height: 138px;
  max-height: 138px;
  resize: none;
  font-size: 20px;
  font-family: inherit;
  padding: 12px;
  border-radius: 12px;
  position: relative;
  
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  box-sizing: border-box;
  transition: height 0.2s;
  line-height: 1.5;
  margin: 0;
  outline: none;
}
.transcription-textarea:focus {
  border-color: var(--color-primary);
}

/* Textarea container and placeholder styles */
.textarea-container {
  position: relative;
  width: 100%;
}

.textarea-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-text-secondary);
  font-style: italic;
  pointer-events: none;
  text-align: center;
  width: 100%;
  font-size: var(--font-size-base);
  z-index: 1;
  user-select: none;
}

/* Translation textarea specific styles */
.translation-textarea {
  width: 100%;
  min-height: 138px;
  max-height: 138px;
  resize: none;
  font-size: 20px;
  font-family: inherit;
  padding: 12px;
  position: relative;
  
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  box-sizing: border-box;
  transition: height 0.2s;
  line-height: 1.5;
  margin: 0;
  outline: none;
}

.translation-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-focus-ring);
}

/* File controls block styles */
.file-controls-block {
  margin: 24px 0;
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.file-upload-section {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.file-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 16px;
  gap: 8px;
  padding-left: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
  user-select: none;
  box-shadow: var(--shadow-sm);
}

.file-upload-label:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.file-upload-label:hover svg {
  transform: scale(1.1);
}

.file-upload-label:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.file-upload-label svg {
  width: 20px;
  height: 20px;
  transition: transform var(--duration-normal) var(--ease-standard);
}

.file-name {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  flex: 1;
}

.download-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-secondary);
  color: var(--color-text);
  text-decoration: none;
  border-radius: 50%;
  transition: all var(--duration-normal) var(--ease-standard);
  box-shadow: var(--shadow-sm);
}

.download-link:hover {
  background: var(--color-secondary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.download-link:hover svg {
  transform: scale(1.1);
}

.download-link:active {
  background: var(--color-secondary-active);
}

.download-link svg {
  width: 20px;
  height: 20px;
  transition: transform var(--duration-normal) var(--ease-standard);
}

/* Dark theme support */
[data-color-scheme="dark"] .file-controls-block {
  background: rgba(255, 255, 253, 0.05);
  border-color: rgba(94, 82, 64, 0.3);
}

[data-color-scheme="dark"] .file-upload-label {
  background: var(--color-primary);
  color: var(--color-btn-primary-text);
}

[data-color-scheme="dark"] .download-link {
  background: rgba(94, 82, 64, 0.2);
  color: var(--color-text);
}

[data-color-scheme="dark"] .download-link:hover {
  background: rgba(94, 82, 64, 0.3);
}
