:root {
  --primary-color: #f1c40f;
  --primary-dark: #f39c12;
  --secondary-color: #2c3e50;
  --success-color: #27ae60;
  --error-color: #e74c3c;
  --warning-color: #f39c12;
  --info-color: #3498db;
  --background: #F4F2ED;
  --surface: #ffffff;
  --text-primary: #000000;
  --text-secondary: #666666;
  --border: #cccccc;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
  --radius: 16px;
  --radius-small: 8px;
  --radius-large: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(244, 242, 237, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(204, 204, 204, 0.3);
  z-index: 1000;
  padding: var(--spacing-md) var(--spacing-lg);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo img {
  height: 32px;
  width: auto;
}

.user-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  background: transparent;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-large);
  border: 0px solid var(--border);
}

.user-info:hover {
  /* box-shadow: var(--shadow-hover); */
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.edit-username-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-sm);
  border-radius: var(--radius-small);
  color: var(--text-secondary);
  transition: var(--transition);
}

.edit-username-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

/* Mobile menu */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-content {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 280px;
  background: var(--surface);
  padding: var(--spacing-lg);
  transform: translateX(-100%);
  transition: var(--transition);
}

.mobile-menu-overlay.active .mobile-menu-content {
  transform: translateX(0);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  margin-top: 40px;
}

.mobile-nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 18px;
  font-weight: 400;
}

.mobile-nav-cta {
  background: var(--text-primary);
  color: var(--background);
  padding: 12px 24px;
  border-radius: var(--radius-large);
  text-decoration: none;
  text-align: center;
  font-weight: 500;
}

/* ===== LAYOUT ===== */
.app-container {
  width: 100%;
  min-height: 100vh;
  margin-top: 80px;
  padding: var(--spacing-lg);
}

.main-content {
  max-width: 800px;
  margin: 0 auto;
}

/* ===== VIEWS ===== */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  outline: none;
  position: relative;
  overflow: hidden;
}

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

.btn-primary {
  background: var(--primary-color);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(241, 196, 15, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(241, 196, 15, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--background);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--error-color);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #c0392b;
  transform: translateY(-1px);
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: var(--radius-large);
}

.btn-small {
  padding: 8px 16px;
  font-size: 12px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-icon:hover:not(:disabled) {
  background: var(--background);
  color: var(--text-primary);
  border-color: var(--primary-color);
}

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

.btn-icon.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  background: var(--surface);
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.1);
}

.select-wrapper {
  position: relative;
}

.form-select {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  background: var(--surface);
  cursor: pointer;
  appearance: none;
  transition: var(--transition);
}

.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.1);
}

.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-secondary);
}

/* ===== UPLOAD SECTION ===== */
.upload-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
}

.upload-card {
  background: var(--surface);
  border-radius: var(--radius-large);
  padding: var(--spacing-2xl);
  box-shadow: var(--shadow);
  width: 100%;
  border: 1px solid rgba(204, 204, 204, 0.3);
}

.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-large);
  padding: var(--spacing-2xl);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
  margin-bottom: var(--spacing-xl);
  position: relative;
  overflow: hidden;
}

.upload-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 49%, rgba(241, 196, 15, 0.02) 50%, transparent 51%);
  opacity: 0;
  transition: var(--transition);
}

.upload-area:hover {
  border-color: var(--primary-color);
  background: rgba(241, 196, 15, 0.02);
}

.upload-area:hover::before {
  opacity: 1;
}

.upload-area.drag-over {
  border-color: var(--primary-color);
  background: rgba(241, 196, 15, 0.05);
  transform: scale(1.02);
}

.upload-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(241, 196, 15, 0.1);
  color: var(--primary-color);
}

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

.upload-main-text {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
}

.upload-subtext {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ===== FILE LIST ===== */
.file-list {
  margin-bottom: var(--spacing-lg);
}

.file-list-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--spacing-sm);
  transition: var(--transition);
}

.file-list-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow);
}

.file-list-name {
  flex: 1;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-list-size {
  color: var(--text-secondary);
  font-size: 12px;
}

.remove-file {
  color: var(--text-secondary);
}

.remove-file:hover {
  color: var(--error-color);
  background: rgba(231, 76, 60, 0.1);
}

/* Progress per file */
.file-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--spacing-sm);
  width: 100%;
  margin-top: var(--spacing-sm);
}

.file-progress-bar {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(204, 204, 204, 0.3);
  border-radius: 999px;
  overflow: hidden;
}

.file-progress-bar > .fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--primary-color);
  transition: width 0.2s ease;
}

.file-progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 44px;
  text-align: right;
}

/* ===== EXPIRATION SECTION ===== */
.expiration-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

/* ===== FILE VIEW ===== */
.file-section {
  display: flex;
  flex-direction: column;
  gap:10px;
}

.status-card-title {
  font-size: 14px;
  text-align: center;
  margin-bottom: var(--spacing-xs);
}

.countdown-container {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--spacing-sm);
}

.countdown-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.countdown-time {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.files-card {
  background: var(--surface);
  border-radius: var(--radius-large);
  padding: var(--spacing-md);
  box-shadow: var(--shadow);
  border: 1px solid rgba(204, 204, 204, 0.3);
}

#file-header.files-card {
}

.file-header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.file-header-title {
  font-weight: 600;
  font-size: 18px;
}

.file-header-actions {
  display: flex;
  gap: var(--spacing-sm);
}

.file-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--spacing-md);
  align-items: center;
  border-top: 1px dashed var(--border);
  padding: var(--spacing-sm) 0;
}

.file-list-row:first-child {
  border-top: none;
}

.file-meta {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.file-meta .file-name {
  font-size: 14px;
  font-weight: 500;
}

.file-meta .file-details {
  font-size: 12px;
  color: var(--text-secondary);
}

.file-row-action {
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

.file-row-actions {
    display: flex;
    gap: var(--spacing-sm);
}

@media (max-width: 768px) {
  .files-card {
    padding: var(--spacing-sm);
  }

  .file-header-main {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-sm);
  }

  .file-header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
  }

  .file-list-row {
    grid-template-columns: 1fr;
    gap: var(--spacing-xs);
  }

  .file-meta {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
  }

  .file-meta .file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
  }
  
  .file-meta .file-details {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .file-row-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== CHAT ===== */
.chat-card {
  background: var(--surface);
  border-radius: var(--radius-large);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(204, 204, 204, 0.3);
  margin-bottom: 30px;
}

.chat-header {
  padding: var(--spacing-lg);
  padding-bottom: 15px;
  padding-top: 15px;
  border-bottom: 1px solid rgba(204, 204, 204, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(244, 242, 237, 0.5);
}

.chat-title {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-weight: 500;
}

.chat-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(241, 196, 15, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

.user-count-badge {
  background: rgba(241, 196, 15, 0.1);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: var(--radius-large);
  font-size: 12px;
  font-weight: 500;
}

.connected-users-panel {
  padding: var(--spacing-md) var(--spacing-lg);
  background: rgba(244, 242, 237, 0.3);
  border-bottom: 1px solid rgba(204, 204, 204, 0.3);
}

.connected-users-panel.hidden {
  display: none;
}

.users-list {
  list-style: none;
  margin-top: var(--spacing-sm);
}

.chat-messages {
  height: 300px;
  overflow-y: auto;
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  scroll-behavior: smooth;
}

.message {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: var(--radius);
  position: relative;
  word-wrap: break-word;
  animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message {
  background: rgba(244, 242, 237, 0.5);
  border: 1px solid rgba(204, 204, 204, 0.3);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.message.own-message {
  background: var(--text-primary);
  color: var(--surface);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  border: none;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 11px;
}

.message-sender {
  font-weight: 600;
  color: var(--primary-color);
}

.message.own-message .message-sender {
  color: var(--surface);
  opacity: 0.9;
}

.message-time {
  color: var(--text-secondary);
  font-size: 10px;
}

.message.own-message .message-time {
  color: var(--surface);
  opacity: 0.7;
}

.message-content {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 4px;
}

.message-reply {
  background: rgba(0, 0, 0, 0.05);
  border-left: 3px solid var(--primary-color);
  padding: 6px 8px;
  margin-bottom: 6px;
  border-radius: 4px;
  font-size: 11px;
  opacity: 0.8;
  font-style: italic;
}

.message.own-message .message-reply {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: var(--surface);
}

.message-actions {
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  transition: var(--transition);
}

.message:hover .message-actions {
  opacity: 1;
}

.reply-btn {
  background: none;
  border: none;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-small);
  transition: var(--transition);
}

.reply-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.message.own-message .reply-btn {
  color: var(--surface);
  opacity: 0.7;
}

.message.own-message .reply-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

.chat-input-container {
  padding: var(--spacing-lg);
  border-top: 1px solid rgba(204, 204, 204, 0.3);
  background: rgba(244, 242, 237, 0.3);
}

.reply-indicator {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: var(--spacing-sm) var(--spacing-md);
  margin-bottom: -1px;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 12px;
}

.reply-indicator.hidden {
  display: none;
}

.reply-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.reply-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.reply-text {
  color: var(--text-primary);
  font-style: italic;
  opacity: 0.8;
}

.chat-input-row {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
}

.input-wrapper {
  flex: 1;
  position: relative;
}

#chat-attach-btn {
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  border: none;
  background: transparent;
}

.chat-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  font-family: inherit;
  font-size: 14px;
  resize: none;
  min-height: 48px; /* Adjusted for button */
  max-height: 100px;
  background: var(--surface);
  transition: var(--transition);
  padding-left: 48px; /* Space for attach button */
}

.chat-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.1);
}

/* ===== SUCCESS VIEW ===== */
.success-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.success-card {
  background: var(--surface);
  border-radius: var(--radius-large);
  padding: var(--spacing-2xl);
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 500px;
  width: 100%;
  border: 1px solid rgba(204, 204, 204, 0.3);
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-lg);
  border-radius: 50%;
  background: rgba(39, 174, 96, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success-color);
}

.success-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.success-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
}

.uploaded-files {
  margin-bottom: var(--spacing-xl);
}

.file-summary-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: rgba(244, 242, 237, 0.5);
  border-radius: var(--radius);
  margin-bottom: var(--spacing-sm);
}

.file-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-small);
  background: rgba(241, 196, 15, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

.file-details {
  flex: 1;
  text-align: left;
}

.file-name {
  font-weight: 500;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  font-size: 12px;
  color: var(--text-secondary);
}

.upload-meta {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(204, 204, 204, 0.3);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 14px;
  color: var(--text-secondary);
}

.link-section {
  margin-bottom: var(--spacing-xl);
}

.link-input-group {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.link-input-group .form-input {
  flex: 1;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
}

.action-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
}

/* ===== EXPIRED VIEW ===== */
.expired-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.expired-card {
  background: var(--surface);
  border-radius: var(--radius-large);
  padding: var(--spacing-2xl);
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 400px;
  width: 100%;
  border: 1px solid rgba(204, 204, 204, 0.3);
}

.expired-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-lg);
  border-radius: 50%;
  background: rgba(243, 156, 18, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warning-color);
}

.expired-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.expired-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
  line-height: 1.5;
}

/* ===== DOWNLOAD ITEMS ===== */
.download-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--spacing-sm);
  transition: var(--transition);
}

.download-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow);
}

.download-file-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-small);
  background: rgba(241, 196, 15, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

.download-file-details {
  flex: 1;
  text-align: left;
}

.download-name {
  font-weight: 500;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-size {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ===== TOAST NOTIFICATIONS ===== */
#toast-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  font-size: 14px;
  color: var(--text-primary);
  animation: toastSlideIn 0.3s ease-out, toastSlideOut 0.3s ease-out 3s forwards;
  max-width: 300px;
}

.toast.success {
  border-color: var(--success-color);
  background: rgba(39, 174, 96, 0.02);
}

.toast.error {
  border-color: var(--error-color);
  background: rgba(231, 76, 60, 0.02);
}

.toast.warning {
  border-color: var(--warning-color);
  background: rgba(243, 156, 18, 0.02);
}

.toast.info {
  border-color: var(--info-color);
  background: rgba(52, 152, 219, 0.02);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(-100%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
}

@keyframes toastSlideOut {
  to {
    opacity: 0;
    transform: translateX(-100%) translateY(10px);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .app-container {
    padding: var(--spacing-md);
  }

  .upload-card,
  .success-card,
  .expired-card {
    padding: var(--spacing-lg);
  }

  .upload-area {
    padding: var(--spacing-xl);
  }

  .upload-icon {
    width: 48px;
    height: 48px;
  }

  .success-icon,
  .expired-icon {
    width: 64px;
    height: 64px;
  }

  .success-title,
  .expired-title {
    font-size: 20px;
  }

  .message {
    max-width: 85%;
  }

  .message-actions {
    opacity: 1;
  }

  .action-buttons {
    flex-direction: column;
  }

  .link-input-group {
    flex-direction: column;
  }

  .user-info {
    gap: var(--spacing-sm);
  }

}

@media (max-width: 480px) {
  .navbar {
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .upload-area {
    padding: var(--spacing-lg);
  }

  .chat-messages {
    height: 250px;
  }

  .btn-large {
    padding: 14px 24px;
    font-size: 14px;
  }
}

/* ===== UTILITY CLASSES ===== */
.hidden {
  display: none !important;
}

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

/* ===== SCROLLBAR STYLING ===== */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(204, 204, 204, 0.5);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(204, 204, 204, 0.8);
}

/* ===== FOCUS STYLES ===== */
.btn:focus-visible,
.btn-icon:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.upload-area:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 4px;
}

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

.loading {
  animation: pulse 1.5s infinite;
}

/* ===== FILE HEADER ===== */
#file-header.files-card {
  margin: var(--spacing-md) 0;
}

.file-header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.file-header-title {
  font-weight: 600;
  font-size: 18px;
}

.file-header-actions {
  display: flex;
  gap: var(--spacing-sm);
}

.file-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: var(--spacing-md);
  align-items: center;
  border-top: 1px dashed var(--border);
  padding: var(--spacing-md) 0;
}

.file-list-row:first-child {
  border-top: none;
}

.file-meta {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.file-meta .file-name {
  font-size: 14px;
  font-weight: 500;
}

.file-meta .file-details {
  font-size: 12px;
  color: var(--text-secondary);
}

.file-row-action {
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

/* ===== DRAG OVERLAY ===== */
.drag-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

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

.drag-overlay-content {
  text-align: center;
  color: white;
}

.drag-overlay-icon {
  margin-bottom: var(--spacing-lg);
}

.drag-overlay-text {
  font-size: 24px;
  font-weight: 600;
}

/* ===== FOOTER ===== */
.powered-by-footer {
  text-align: center;
  margin-top: var(--spacing-lg);
}

.powered-by-footer a {
  color: var(--text-primary);
  font-size: 12px;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.powered-by-footer a:hover {
  opacity: 1;
}

/* ===== DARK MODE SUPPORT (if needed) ===== */
@media (prefers-color-scheme: dark) {
  /* Keep the same colors as specified by user */
}

/* ===== CHAT INPUT MOBILE OPTIMIZADO ===== */

/* Container principal más compacto */
.chat-input-container.mobile-optimized {
  padding: 12px 16px;
  border-top: 1px solid rgba(204, 204, 204, 0.3);
  background: var(--surface);
  position: relative;
}

/* ===== REPLY INDICATOR MÓVIL ===== */
.reply-indicator-mobile {
  margin-bottom: 8px;
  background: rgba(241, 196, 15, 0.08);
  border: 1px solid rgba(241, 196, 15, 0.2);
  border-radius: 12px;
  padding: 8px 12px;
  animation: slideDown 0.2s ease-out;
}

.reply-indicator-mobile.hidden {
  display: none;
}

.reply-preview-mobile {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.reply-icon {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.reply-content-mobile {
  flex: 1;
  min-width: 0;
}

.reply-text-mobile {
  color: var(--text-secondary);
  font-style: italic;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.cancel-reply-mobile {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: var(--transition);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cancel-reply-mobile:hover {
  background: rgba(231, 76, 60, 0.1);
  color: var(--error-color);
}

/* ===== INPUT ROW MÓVIL ===== */
.chat-input-row-mobile {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  position: relative;
}

/* ===== BOTONES MÓVIL ===== */
.chat-btn-mobile {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.chat-btn-mobile:active {
  transform: scale(0.95);
}

/* Botón adjuntar */
.chat-btn-attach {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.chat-btn-attach:hover {
  background: var(--background);
  color: var(--text-primary);
  border-color: var(--primary-color);
}

/* Botón enviar */
.chat-btn-send {
  background: var(--primary-color);
  color: var(--text-primary);
  border: 1px solid var(--primary-color);
  box-shadow: 0 2px 8px rgba(241, 196, 15, 0.3);
}

.chat-btn-send:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(241, 196, 15, 0.4);
  transform: translateY(-1px);
}

.chat-btn-send:disabled {
  background: var(--border);
  color: var(--text-secondary);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ===== INPUT CONTAINER MÓVIL ===== */
.input-container-mobile {
  flex: 1;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  transition: var(--transition);
  min-height: 36px;
  display: flex;
  align-items: center;
}

.input-container-mobile:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(241, 196, 15, 0.1);
}

/* ===== TEXTAREA MÓVIL ===== */
.chat-input-mobile {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0px 0px 0px 40px; /* Aumentado para dejar espacio al clip */
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  resize: none;
  outline: none;
  min-height: 20px;
  max-height: 80px;
  overflow-y: auto;
  border-radius: 18px;
}

.chat-input-mobile::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
  padding-left: 20px;
}

/* ===== INPUT ACTIONS ===== */
.input-actions-mobile {
  position: absolute;
  bottom: 2px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.char-counter {
  font-size: 10px;
  color: var(--text-secondary);
  opacity: 0.6;
  background: var(--surface);
  padding: 2px 4px;
  border-radius: 4px;
}

.char-counter.warning {
  color: var(--warning-color);
  opacity: 1;
}

.char-counter.error {
  color: var(--error-color);
  opacity: 1;
}

/* ===== TYPING INDICATOR ===== */
.typing-indicator-mobile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-top: 8px;
  background: rgba(204, 204, 204, 0.1);
  border-radius: 12px;
  animation: fadeIn 0.3s ease-out;
}

.typing-indicator-mobile.hidden {
  display: none;
}

.typing-dots {
  display: flex;
  gap: 3px;
}

.typing-dots span {
  width: 4px;
  height: 4px;
  background: var(--text-secondary);
  border-radius: 50%;
  animation: typingDots 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

.typing-text {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
}

/* ===== ANIMACIONES ===== */
 @keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

 @keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

 @keyframes typingDots {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===== RESPONSIVE ESPECÍFICO ===== */
 @media (max-width: 480px) {
  .chat-input-container.mobile-optimized {
    padding: 10px 12px;
  }
  
  .chat-input-row-mobile {
    gap: 6px;
  }
  
  .chat-btn-mobile {
    width: 32px;
    height: 32px;
  }
  
  .chat-btn-mobile svg {
    width: 16px;
    height: 16px;
  }
  
  .input-container-mobile {
    min-height: 32px;
  }
  
  .chat-input-mobile {
    font-size: 13px;
    padding: 6px 10px;
  }
  
  .reply-preview-mobile {
    font-size: 12px;
  }
}

/* ===== ESTADOS ESPECIALES ===== */
.chat-input-container.mobile-optimized.has-attachment .chat-btn-attach {
  background: rgba(241, 196, 15, 0.1);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.chat-input-container.mobile-optimized.input-focused {
  background: rgba(241, 196, 15, 0.02);
}

.chat-input-container.mobile-optimized.has-text .chat-btn-send {
  animation: pulse 0.3s ease-out;
}

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

/* ===== SCROLLBAR PARA TEXTAREA ===== */
.chat-input-mobile::-webkit-scrollbar {
  width: 3px;
}

.chat-input-mobile::-webkit-scrollbar-track {
  background: transparent;
}

.chat-input-mobile::-webkit-scrollbar-thumb {
  background: rgba(204, 204, 204, 0.5);
  border-radius: 2px;
}

/* ===== ACCESIBILIDAD ===== */
.chat-btn-mobile:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.input-container-mobile:focus-within {
  outline: none;
}

/* ===== MODO LANDSCAPE EN MÓVIL ===== */
 @media (max-width: 768px) and (orientation: landscape) {
  .chat-input-mobile {
    max-height: 60px;
  }
  
  .typing-indicator-mobile {
    margin-top: 4px;
    padding: 6px 10px;
  }
}

/* Estilos adicionales dinámicos */
body.keyboard-open {
  height: 100vh;
  overflow: hidden;
}

body.keyboard-open .chat-messages {
  height: calc(100vh - 200px);
}

 @supports (padding: max(0px)) {
  .chat-input-container.mobile-optimized {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}

 @media (prefers-color-scheme: dark) {
  .chat-input-container.mobile-optimized {
    border-top-color: rgba(255, 255, 255, 0.1);
  }
}

 @media (prefers-reduced-motion: reduce) {
  .reply-indicator-mobile,
  .typing-indicator-mobile,
  .chat-btn-mobile {
    animation: none;
    transition: none;
  }
}

/* ===== FILE HEADER OPTIMIZADO MÓVIL Y DESKTOP ===== */

/* Container principal más compacto */
.files-card {
  background: var(--surface);
  border-radius: var(--radius-large);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(204, 204, 204, 0.3);
  margin-bottom: 10px;
}

/* ===== HEADER PRINCIPAL ===== */
.file-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid rgba(204, 204, 204, 0.2);
  gap: var(--spacing-md);
}

.file-header-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex: 1;
  min-width: 0;
}

.file-header-title::before {
  content: '';
  width: 24px;
  height: 24px;
  background: rgba(241, 196, 15, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f1c40f' stroke-width='2'%3E%3Cpath d='M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.file-header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-shrink: 0;
}

/* ===== BOTONES DEL HEADER ===== */
.file-header-actions .btn {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: var(--transition);
}

.file-header-actions .btn-small {
  padding: 4px 8px;
  font-size: 11px;
}

/* Botón toggle principal más prominente */
.file-header-actions .btn:first-child {
  background: var(--primary-color);
  color: var(--text-primary);
  border-color: var(--primary-color);
  font-weight: 500;
}

.file-header-actions .btn:first-child:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(241, 196, 15, 0.3);
}

/* ===== LISTA DE ARCHIVOS ===== */
.files-card [role="list"] {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.file-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md);
  background: rgba(244, 242, 237, 0.3);
  border: 1px solid rgba(204, 204, 204, 0.2);
  border-radius: var(--radius);
  transition: var(--transition);
  gap: var(--spacing-md);
  min-height: 60px;
}

.file-list-row:hover {
  background: rgba(241, 196, 15, 0.05);
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(241, 196, 15, 0.1);
}

/* ===== METADATA DEL ARCHIVO ===== */
.file-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-name {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.file-details {
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== ACCIONES DEL ARCHIVO ===== */
.file-row-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-shrink: 0;
}

.file-row-actions .btn {
  padding: 6px 12px;
  font-size: 11px;
  border-radius: var(--radius);
  min-width: 70px;
  text-align: center;
  transition: var(--transition);
}

.file-row-actions .btn:hover {
  transform: translateY(-1px);
}

/* Botón de descarga más prominente */
.file-row-actions a.btn {
  background: var(--primary-color);
  color: var(--text-primary);
  border-color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.file-row-actions a.btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(241, 196, 15, 0.3);
}

/* Botón ocultar/ver */
.file-row-actions button.btn-primary {
  background: rgba(231, 76, 60, 0.1);
  color: var(--error-color);
  border-color: rgba(231, 76, 60, 0.3);
}

.file-row-actions button.btn-secondary {
  background: rgba(39, 174, 96, 0.1);
  color: var(--success-color);
  border-color: rgba(39, 174, 96, 0.3);
}

/* ===== ESTADOS ESPECIALES ===== */
.file-list-row.hidden-file {
  opacity: 0.6;
  background: rgba(204, 204, 204, 0.1);
}

.file-list-row.hidden-file .file-name {
  text-decoration: line-through;
  opacity: 0.7;
}

.file-list-row.original-file {
  border-left: 4px solid var(--primary-color);
}

.file-list-row.original-file .file-name::after {
  content: '★';
  color: var(--primary-color);
  margin-left: 6px;
  font-size: 12px;
}

/* ===== ESTADO VACÍO ===== */
.files-card [role="list"]:empty::before {
  content: 'No hay archivos disponibles';
  display: block;
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--text-secondary);
  font-style: italic;
  background: rgba(204, 204, 204, 0.05);
  border-radius: var(--radius);
  border: 2px dashed rgba(204, 204, 204, 0.3);
}

/* ===== RESPONSIVE MÓVIL ===== */
 @media (max-width: 768px) {
  .files-card {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
  }
  
  .file-header-main {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
  }
  
  .file-header-title {
    font-size: 16px;
    justify-content: center;
  }
  
  .file-header-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .file-header-actions .btn {
    flex: 1;
    min-width: 80px;
  }
  
  .file-list-row {
    flex-direction: column;
    align-items: stretch;
    padding: var(--spacing-sm);
    gap: var(--spacing-sm);
    min-height: auto;
  }
  
  .file-meta {
    text-align: center;
  }
  
  .file-name {
    font-size: 13px;
  }
  
  .file-details {
    font-size: 10px;
  }
  
  .file-row-actions {
    justify-content: center;
    width: 100%;
  }
  
  .file-row-actions .btn {
    flex: 1;
    min-width: 60px;
    padding: 8px 12px;
    font-size: 10px;
  }
}

/* ===== RESPONSIVE MÓVIL PEQUEÑO ===== */
 @media (max-width: 480px) {
  .files-card {
    padding: 12px;
    border-radius: var(--radius);
  }
  
  .file-header-main {
    padding-bottom: 8px;
    margin-bottom: 12px;
  }
  
  .file-header-title {
    font-size: 14px;
  }
  
  .file-header-title::before {
    width: 20px;
    height: 20px;
  }
  
  .file-header-actions {
    gap: 6px;
  }
  
  .file-header-actions .btn {
    padding: 6px 8px;
    font-size: 10px;
    min-width: 70px;
  }
  
  .file-list-row {
    padding: 10px;
    border-radius: 8px;
  }
  
  .file-name {
    font-size: 12px;
  }
  
  .file-details {
    font-size: 9px;
  }
  
  .file-row-actions .btn {
    padding: 6px 8px;
    font-size: 9px;
    min-width: 50px;
  }
}

/* ===== MODO LANDSCAPE EN MÓVIL ===== */
 @media (max-width: 768px) and (orientation: landscape) {
  .file-header-main {
    flex-direction: row;
    align-items: center;
  }
  
  .file-header-title {
    justify-content: flex-start;
  }
  
  .file-header-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
  }
  
  .file-list-row {
    flex-direction: row;
    align-items: center;
  }
  
  .file-meta {
    text-align: left;
  }
  
  .file-row-actions {
    justify-content: flex-end;
    width: auto;
  }
}

/* ===== ANIMACIONES ===== */
.file-list-row {
  animation: fileRowSlideIn 0.3s ease-out;
}

 @keyframes fileRowSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== ACCESIBILIDAD ===== */
.file-header-actions .btn:focus-visible,
.file-row-actions .btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.file-list-row:focus-within {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ===== MODO COMPACTO (OPCIONAL) ===== */
.files-card.compact {
  padding: var(--spacing-md);
}

.files-card.compact .file-header-main {
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
}

.files-card.compact .file-header-title {
  font-size: 16px;
}

.files-card.compact .file-list-row {
  padding: var(--spacing-sm);
  min-height: 50px;
}

.files-card.compact .file-name {
  font-size: 13px;
}

.files-card.compact .file-details {
  font-size: 10px;
}

.files-card.compact .file-row-actions .btn {
  padding: 4px 8px;
  font-size: 10px;
  min-width: 60px;
}

/* ===== INDICADORES VISUALES ===== */
.file-list-row.downloading {
  background: rgba(52, 152, 219, 0.1);
  border-color: var(--info-color);
}

.file-list-row.downloading .file-row-actions a.btn {
  background: var(--info-color);
  color: white;
  cursor: not-allowed;
}

.file-list-row.downloading .file-row-actions a.btn::before {
  content: '⏳ ';
}

.file-list-row.error {
  background: rgba(231, 76, 60, 0.1);
  border-color: var(--error-color);
}

.file-list-row.success {
  background: rgba(39, 174, 96, 0.1);
  border-color: var(--success-color);
}

/* ===== SCROLLBAR PARA LISTA LARGA ===== */
.files-card [role="list"] {
  max-height: 400px;
  overflow-y: auto;
}

.files-card [role="list"]::-webkit-scrollbar {
  width: 6px;
}

.files-card [role="list"]::-webkit-scrollbar-track {
  background: transparent;
}

.files-card [role="list"]::-webkit-scrollbar-thumb {
  background: rgba(204, 204, 204, 0.5);
  border-radius: 3px;
}

.files-card [role="list"]::-webkit-scrollbar-thumb:hover {
  background: rgba(204, 204, 204, 0.8);
}

/* ===== MODO OSCURO DEL SISTEMA ===== */
 @media (prefers-color-scheme: dark) {
  .files-card {
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .file-header-main {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  
  .file-list-row {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .file-list-row:hover {
    background: rgba(241, 196, 15, 0.1);
  }
}

/* ===== REDUCIR MOVIMIENTO ===== */
 @media (prefers-reduced-motion: reduce) {
  .file-list-row,
  .file-header-actions .btn,
  .file-row-actions .btn {
    animation: none;
    transition: none;
  }
}
