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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  line-height: 1.6;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 20px 30px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo i {
  font-size: 32px;
  color: #667eea;
}

.logo h1 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.version {
  background: #667eea;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

/* Main content */
.main-content {
  display: grid;
  gap: 20px;
}

/* Cards */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2d3748;
}

.card h2 i {
  color: #667eea;
}

/* Connection Section */
.connection-help {
  background: rgba(102, 126, 234, 0.05);
  border-left: 4px solid #667eea;
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 8px;
}

.connection-help p {
  margin-bottom: 8px;
  font-weight: 600;
  color: #2d3748;
}

.connection-help ul {
  margin: 0;
  padding-left: 20px;
}

.connection-help li {
  margin-bottom: 4px;
  color: #4a5568;
  font-size: 14px;
}

.connection-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.status-dot.disconnected {
  background: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.3);
}

.status-dot.connecting {
  background: #ed8936;
  box-shadow: 0 0 0 3px rgba(237, 137, 54, 0.3);
  animation: pulse 1s infinite;
}

.status-dot.connected {
  background: #38a169;
  box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.3);
}

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

/* Device Info */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.info-item label {
  font-weight: 600;
  color: #4a5568;
}

.info-item span {
  font-weight: 500;
  color: #2d3748;
}

/* Firmware Section */
.firmware-components {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.component {
  background: rgba(102, 126, 234, 0.05);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.component h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #2d3748;
}

.component-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.component-info span {
  font-size: 14px;
  color: #4a5568;
}

.version {
  font-weight: 600;
}

.git-ref {
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #718096;
}

/* Firmware Source Selection */
.firmware-source-section {
  margin-bottom: 24px;
}

.source-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  background: rgba(102, 126, 234, 0.05);
  padding: 16px 24px;
  border-radius: 12px;
  border: 2px solid rgba(102, 126, 234, 0.1);
  transition: all 0.3s ease;
}

.switch-label:hover {
  border-color: rgba(102, 126, 234, 0.2);
  background: rgba(102, 126, 234, 0.08);
}

.source-switch {
  display: none;
}

.switch-slider {
  position: relative;
  width: 60px;
  height: 28px;
  background: #cbd5e0;
  border-radius: 14px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.switch-slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.source-switch:checked + .switch-slider {
  background: #667eea;
}

.source-switch:checked + .switch-slider::before {
  transform: translateX(32px);
}

.switch-text {
  display: flex;
  gap: 20px;
  font-weight: 600;
  color: #4a5568;
}

.source-switch:checked ~ .switch-text .upload-text {
  opacity: 0.5;
}

.source-switch:checked ~ .switch-text .server-text {
  color: #667eea;
}

.source-switch:not(:checked) ~ .switch-text .server-text {
  opacity: 0.5;
}

.source-switch:not(:checked) ~ .switch-text .upload-text {
  color: #667eea;
}

/* Server Firmware Selection */
.server-firmware-section {
  margin-bottom: 24px;
}

.server-firmware-container {
  background: rgba(102, 126, 234, 0.05);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.firmware-dropdown-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.firmware-dropdown-group label {
  font-weight: 600;
  color: #4a5568;
  min-width: 140px;
}

.firmware-select {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  font-size: 14px;
  font-weight: 500;
  color: #2d3748;
  cursor: pointer;
  transition: all 0.3s ease;
}

.firmware-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.firmware-select:disabled {
  background: #f7fafc;
  color: #a0aec0;
  cursor: not-allowed;
}

.server-firmware-info {
  background: rgba(56, 161, 105, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  border: 1px solid rgba(56, 161, 105, 0.2);
}

.firmware-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.firmware-details span {
  font-size: 14px;
}

#serverFirmwareName {
  font-weight: 600;
  color: #2d3748;
}

#serverFirmwareVersion {
  color: #4a5568;
}

#serverFirmwareStatus {
  color: #38a169;
  font-weight: 500;
}

/* File Upload */
.file-input-container {
  position: relative;
  margin-bottom: 16px;
}

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

.file-input-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  border: 2px dashed #cbd5e0;
  border-radius: 12px;
  background: rgba(102, 126, 234, 0.02);
  cursor: pointer;
  transition: all 0.3s ease;
}

.file-input-label:hover,
.file-input-label.dragover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.file-input-label i {
  font-size: 32px;
  color: #667eea;
  margin-bottom: 8px;
}

.file-input-label span {
  color: #4a5568;
  font-weight: 500;
}

.file-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(56, 161, 105, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(56, 161, 105, 0.2);
}

.file-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-info #fileName {
  font-weight: 600;
  color: #2d3748;
}

.file-info #fileSize {
  font-size: 14px;
  color: #4a5568;
}

/* Radio Group */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 12px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.radio-label:hover {
  background: rgba(102, 126, 234, 0.05);
}

.radio-label input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e0;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
}

.radio-label input[type="radio"]:checked + .radio-custom {
  border-color: #667eea;
  background: #667eea;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

/* Update Controls */
.update-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* Progress */
.update-progress {
  margin-top: 24px;
}

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

.progress-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #2d3748;
}

#updatePhase {
  font-size: 14px;
  color: #667eea;
  font-weight: 500;
}

.progress-bar {
  position: relative;
  width: 100%;
  height: 24px;
  background: #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 12px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.progress-details {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #4a5568;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  outline: none;
}

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

.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #e2e8f0;
  color: #4a5568;
}

.btn-secondary:hover:not(:disabled) {
  background: #cbd5e0;
}

.btn-danger {
  background: linear-gradient(135deg, #e53e3e, #c53030);
  color: white;
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

.btn-danger:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(229, 62, 62, 0.4);
}

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

/* Logs Section */
.logs-controls {
  margin-bottom: 16px;
}

.logs-container {
  background: #1a202c;
  color: #e2e8f0;
  padding: 16px;
  border-radius: 8px;
  font-family: "Courier New", monospace;
  font-size: 14px;
  line-height: 1.4;
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #4a5568 #2d3748;
}

.logs-container::-webkit-scrollbar {
  width: 6px;
}

.logs-container::-webkit-scrollbar-track {
  background: #2d3748;
  border-radius: 3px;
}

.logs-container::-webkit-scrollbar-thumb {
  background: #4a5568;
  border-radius: 3px;
}

.log-entry {
  margin-bottom: 4px;
  display: flex;
  gap: 8px;
}

.log-timestamp {
  color: #718096;
  font-size: 12px;
  min-width: 80px;
}

.log-level {
  min-width: 50px;
  font-weight: 600;
}

.log-level.info {
  color: #4299e1;
}
.log-level.success {
  color: #48bb78;
}
.log-level.warning {
  color: #ed8936;
}
.log-level.error {
  color: #f56565;
}

.log-message {
  flex: 1;
}

/* Utility classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mb-16 {
  margin-bottom: 16px;
}

.mt-16 {
  margin-top: 16px;
}

/* Error Banner */
.error-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #e53e3e, #c53030);
  color: white;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
  z-index: 1000;
  animation: slideDown 0.3s ease;
}

.error-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.error-content i {
  font-size: 18px;
}

.error-content span {
  flex: 1;
  font-weight: 500;
}

.error-content button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.error-content button:hover {
  background: rgba(255, 255, 255, 0.2);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  animation: slideInRight 0.3s ease;
  max-width: 300px;
}

.notification-info {
  background: linear-gradient(135deg, #4299e1, #3182ce);
}

.notification-success {
  background: linear-gradient(135deg, #48bb78, #38a169);
}

.notification-warning {
  background: linear-gradient(135deg, #ed8936, #dd6b20);
}

.notification-error {
  background: linear-gradient(135deg, #e53e3e, #c53030);
}

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

/* Error Dialog */
.error-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.error-dialog-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.error-dialog-content {
  background: white;
  border-radius: 16px;
  padding: 24px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideInUp 0.3s ease;
}

.error-dialog-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #e53e3e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.error-dialog-content p {
  font-size: 14px;
  line-height: 1.6;
  color: #4a5568;
  margin-bottom: 20px;
}

.error-dialog-content .btn {
  width: 100%;
  justify-content: center;
}

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

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

/* Loading states */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 12px;
  }

  .header {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .connection-controls,
  .update-controls {
    flex-direction: column;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .firmware-components {
    grid-template-columns: 1fr;
  }

  .progress-details {
    flex-direction: column;
    gap: 4px;
  }
}

/* Alert Components */
.alert {
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.alert i {
  font-size: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

.alert-warning {
  background: rgba(255, 193, 7, 0.1);
  border-left: 4px solid #ffc107;
  color: #856404;
}

.alert-warning i {
  color: #ffc107;
}

.alert-error {
  background: rgba(220, 53, 69, 0.1);
  border-left: 4px solid #dc3545;
  color: #721c24;
}

.alert-error i {
  color: #dc3545;
}

.alert strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.alert p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

/* Disabled Section */
.update-section.disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* Reconnection Dialog */
.reconnection-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.reconnection-content {
  background: white;
  border-radius: 12px;
  padding: 32px;
  max-width: 480px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease-out;
}

.reconnection-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.reconnection-content h3 {
  margin: 0 0 16px 0;
  color: #333;
  font-size: 24px;
  font-weight: 600;
}

.reconnection-content p {
  margin: 0 0 16px 0;
  color: #666;
  line-height: 1.5;
}

.reconnection-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.reconnection-buttons .btn {
  flex: 1;
  max-width: 200px;
}

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

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

/* Update Timing Summary */
.update-timing-summary {
  margin: 20px 0;
  animation: slideIn 0.3s ease-out;
  position: relative;
  z-index: 100;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.timing-summary-card {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(40, 167, 69, 0.3);
  position: relative;
  overflow: hidden;
}

.timing-summary-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ffc107, #28a745, #20c997);
}

.timing-summary-card h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timing-summary-card h3 i {
  color: #ffc107;
}

.timing-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.timing-stats > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.timing-stats .label {
  font-weight: 500;
  opacity: 0.9;
}

.timing-stats .value {
  font-weight: 600;
  font-size: 16px;
  color: #ffc107;
}

.phase-breakdown {
  margin-top: 16px;
}

.phase-breakdown h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.phase-list {
  display: grid;
  gap: 8px;
}

.phase-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 14px;
}

.phase-name {
  opacity: 0.8;
}

.phase-duration {
  font-weight: 600;
  color: #ffc107;
}

.timing-summary-card button {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timing-summary-card button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

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

/* File Download Section Styles */
.file-download-section {
  margin-top: 20px;
}

.file-download-help {
  background: rgba(102, 126, 234, 0.1);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.file-download-help ul {
  margin-top: 10px;
  padding-left: 20px;
}

.file-download-help li {
  margin-bottom: 5px;
  color: #555;
}

.file-discovery-section,
.file-list-section,
.download-options-section,
.download-controls-section {
  margin-bottom: 20px;
}

.file-status {
  margin-top: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
}

.file-list-controls {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}

.file-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.5);
}

.file-item {
  padding: 12px;
  background: white;
  border-radius: 8px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.file-item:hover {
  background: rgba(102, 126, 234, 0.05);
  transform: translateX(5px);
}

.file-item-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.file-checkbox {
  margin: 0;
  cursor: pointer;
}

.file-checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #667eea;
  border-radius: 4px;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}

.file-checkbox:checked + .file-checkbox-custom::after {
  content: "✓";
  position: absolute;
  top: -2px;
  left: 3px;
  color: #667eea;
  font-size: 16px;
  font-weight: bold;
}

.file-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.file-name {
  font-weight: 600;
  color: #333;
  font-size: 16px;
}

.file-size {
  color: #666;
  font-size: 14px;
}

.file-session {
  color: #888;
  font-size: 12px;
}

.file-timestamp {
  color: #888;
  font-size: 12px;
}

.download-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #667eea;
  border-radius: 4px;
  display: inline-block;
  position: relative;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: "✓";
  position: absolute;
  top: -2px;
  left: 3px;
  color: #667eea;
  font-size: 16px;
  font-weight: bold;
}

.compression-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 6px;
  font-size: 13px;
  color: #555;
}

.compression-info i {
  color: #667eea;
}

.download-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Advanced Download Options */
.advanced-download-section {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.advanced-download-section h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #495057;
}

.advanced-download-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.advanced-download-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.advanced-download-info .info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6c757d;
}

.advanced-download-info .info-item i {
  font-size: 10px;
  color: #667eea;
}

.downloaded-files-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.downloaded-files-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.downloaded-file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: rgba(40, 167, 69, 0.1);
  border: 1px solid rgba(40, 167, 69, 0.3);
  border-radius: 8px;
  animation: slideIn 0.3s ease;
}

.download-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.download-info i {
  font-size: 24px;
  color: #28a745;
}

.download-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.download-name {
  font-weight: 600;
  color: #333;
}

.download-meta {
  font-size: 13px;
  color: #666;
}

.download-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.no-files {
  text-align: center;
  padding: 40px;
  color: #999;
  font-style: italic;
}
