:host {
  display: block;
  background: #e6e6e6;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.container {
  min-height: 100vh;
  padding: 2rem 1rem;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
  animation: fadeIn 0.5s ease-out;
}

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

.header-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.icon-large {
  width: 2.5rem;
  height: 2.5rem;
  color: #3b82f6;
}

.icon-zap {
  width: 2rem;
  height: 2rem;
  color: #f59e0b;
}

.subtitle {
  color: #64748b;
  font-size: 1.125rem;
  margin: 0;
}

.upload-area {
  max-width: 72rem;
  margin: 0 auto 2rem;
  border: 2px dashed #cbd5e1;
  border-radius: 1rem;
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  background: white;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.upload-area:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.upload-area.dragging {
  border-color: #3b82f6;
  background: #eff6ff;
  transform: scale(1.01);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.upload-icon {
  width: 2rem;
  height: 2rem;
  margin: 0 auto 1rem;
  color: #3b82f6;
  transition: all 0.3s ease;
}

.upload-icon.bounce {
  animation: bounce 0.5s infinite;
}

.upload-title {
  font-size: 1.25rem;
  color: #1e293b;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.upload-subtitle {
  color: #64748b;
  margin: 0;
}

.progress-container {
  max-width: 72rem;
  margin: 0 auto 1.5rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.progress-filename {
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
}

.progress-percent {
  color: #3b82f6;
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 0.75rem;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
  transition: width 0.2s ease;
  border-radius: 9999px;
}

.files-section, .controls-section, .result-section {
  max-width: 72rem;
  margin: 0 auto 1.5rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.icon-check {
  width: 1.5rem;
  height: 1.5rem;
  color: #10b981;
}

.icon-small {
  width: 1.25rem;
  height: 1.25rem;
}

.btn-danger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2);
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.file-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem;
  transition: all 0.2s ease;
}

.file-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.file-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.file-controls {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.btn-icon {
  padding: 0.25rem;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  cursor: pointer;
  color: #64748b;
  transition: all 0.2s ease;
}

.btn-icon:hover:not(:disabled) {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

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

.file-info {
  flex: 1;
}

.file-name-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.file-name {
  color: #1e293b;
  font-weight: 600;
}

.file-size {
  color: #64748b;
  font-size: 0.875rem;
}

.offset-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.offset-label {
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
}

.offset-select {
  background: white;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.offset-select:hover {
  border-color: #3b82f6;
}

.offset-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Ayni work offset'i kullanan dosyalarin select'leri ayni renge boyanir ve pulselar */
.offset-pulse {
  border: 2px solid var(--offset-renk, #dc2626);
  background: color-mix(in srgb, var(--offset-renk, #dc2626) 20%, white);
  color: var(--offset-renk, #dc2626);
  font-weight: 700;
  animation: offsetPulse 1.2s ease-in-out infinite;
}

@keyframes offsetPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--offset-renk, #dc2626) 60%, transparent);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 8px 2px color-mix(in srgb, var(--offset-renk, #dc2626) 60%, transparent);
    transform: scale(1.08);
  }
}

.coord-label {
  display: inline-block;
  background: #e5e7eb;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.8rem;
  color: #374151;
  margin: 2px;
}

.coord-label-danger {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* Tehlikeli Z bandi (+2 ile -70 arasi): Z degerleri pulse animasyonu ile vurgulanir */
.z-pulse {
  animation: zDegerPulse 1.2s ease-in-out infinite;
  background: red;
  color:white !important;
  font-weight:bold;
}

@keyframes zDegerPulse {
  0%,
  100% {
    color: #dc2626;
    text-shadow: none;
    transform: scale(1);
  }
  50% {
    color: #ff0000;
    text-shadow: 0 0 6px rgba(220, 38, 38, 0.6);
    transform: scale(1.08);
  }
}

.coord-detail {
  font-weight: 600;
  margin-left: 4px;
}

.btn-remove {
  padding: 0.5rem;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  cursor: pointer;
  color: #ef4444;
  transition: all 0.2s ease;
}

.btn-remove:hover {
  background: #fef2f2;
  border-color: #ef4444;
  transform: scale(1.05);
}

.controls-content {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.program-number {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.control-label {
  color: #1e293b;
  font-weight: 600;
}

.number-input {
  background: white;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  width: 8rem;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.number-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.number-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f1f5f9;
}

.btn-primary, .btn-success {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.btn-success {
  background: #10b981;
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.btn-primary:disabled, .btn-success:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary:disabled:hover, .btn-success:disabled:hover {
  transform: none;
}

/* Merge Progress Styles */
.merge-progress-container {
  max-width: 72rem;
  margin: 0 auto 1.5rem;
  background: white;
  border: 2px solid #3b82f6;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.merge-progress-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.spinner1 {
  width: 2rem;
  height: 2rem;
  border: 3px solid #dbeafe;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.merge-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.merge-status {
  color: #475569;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.merge-progress-bar {
  width: 100%;
  height: 1.5rem;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  border: 1px solid #e2e8f0;
}

.merge-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 50%, #3b82f6 100%);
  background-size: 200% 100%;
  transition: width 0.3s ease;
  border-radius: 9999px;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.merge-percent {
  text-align: right;
  color: #3b82f6;
  font-weight: 700;
  font-size: 1.125rem;
}

.result-textarea {
  width: 100%;
  background: #f8fafc;
  color: #059669;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  resize: vertical;
}

.result-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.baglama-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.kutuk-input {
  width: 4.5rem;
  padding: 1px 4px;
  font-size: 0.8rem;
  border: 1px solid #3b82f6;
  border-radius: 4px;
  outline: none;
  background: #fff;
  color: #1e293b;
}

.baglama-orijinal {
  font-size: 0.65rem;
  line-height: 1;
  color: #94a3b8;
  margin: 0 0 2px 2px;
}

.gecmis-kart {
  padding: 6px 8px;
  gap: 2px;
}

.gecmis-ust {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.gecmis-baslik {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 12.5px;
  color: #0f172a;
}

.gecmis-baslik em {
  font-style: normal;
  font-weight: 400;
  color: #64748b;
}

.gecmis-rozet {
  flex-shrink: 0;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.gecmis-rozet--usb {
  background: #ecfdf5;
  color: #047857;
}

.gecmis-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.gecmis-nokta {
  opacity: 0.5;
}

.gecmis-dosyalar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #eef2f7;
}

.gecmis-dosya {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px 7px;
  border-radius: 6px;
  background: #f8fafc;
}

.gecmis-dosya-ust {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.gecmis-dosya-ad {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 11.5px;
  color: #0f172a;
}

.gecmis-etiket {
  flex-shrink: 0;
  padding: 0 5px;
  border-radius: 4px;
  background: #e0e7ff;
  color: #3730a3;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10px;
}

.gecmis-yol {
  font-size: 10px;
  color: #94a3b8;
  word-break: break-all;
}

.gecmis-hash {
  margin-top: 2px;
  color: #94a3b8;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.3px;
}

.tema-karanlik .gecmis-baslik,
.tema-karanlik .gecmis-dosya-ad {
  color: rgba(255, 255, 255, 0.9);
}

.tema-karanlik .gecmis-rozet {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

.tema-karanlik .gecmis-rozet--usb {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.tema-karanlik .gecmis-dosya {
  background: rgba(255, 255, 255, 0.04);
}

.tema-karanlik .gecmis-etiket {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
}

// Utility classes
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.p-2 { padding: 0.5rem; }
.flex-1 { flex: 1; }

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

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ═══ Seans penceresi (kullanıcı menü diline uygun) ═══ */
.sk {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: #0f172a;
}

.sk-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.sk-form {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}

.sk-form .sk-btn {
  width: 100%;
  padding: 4px 8px;
}

.sk-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
  background: #f8fafc;
  color: inherit;
  font-size: 12.5px;
  outline: none;
}

.sk-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.sk-btn {
  border: 0;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: #f1f5f9;
  color: #1a1a2e;
}

.sk-btn:hover:not(:disabled) {
  background: #e2e8f0;
}

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

.sk-btn--primary {
  background: #2563eb;
  color: #fff;
}

.sk-btn--primary:hover:not(:disabled) {
  background: #1d4ed8;
}

.sk-btn--sil {
  color: #b91c1c;
  background: transparent;
  border: 1px solid #fecaca;
}

.sk-btn--sil:hover:not(:disabled) {
  background: #fef2f2;
}

.sk-liste {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  max-height: 360px;
  overflow-y: auto;
}

.sk-satir {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  transition: background 0.15s;
}

.sk-satir-aksiyon {
  display: flex;
  gap: 3px;
  margin-top: 3px;
}

.sk-satir-aksiyon .sk-btn {
  flex: 1;
}

::ng-deep .sk-overlay .ant-tooltip-inner {
  padding: 0 !important;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

::ng-deep .sk-overlay .ant-tooltip-arrow::before {
  background: #fff !important;
}

::ng-deep .tema-karanlik .sk-overlay .ant-tooltip-inner {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.25);
}

::ng-deep .tema-karanlik .sk-overlay .ant-tooltip-arrow::before {
  background: #1f1f23 !important;
}

.sk-satir:hover {
  background: #f8fafc;
}

.sk-satir--aktif {
  border-color: #93c5fd;
  background: #eff6ff;
}

.sk-satir-bilgi {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sk-satir-ad {
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sk-satir-alt {
  font-size: 11px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.sk-bos {
  padding: 12px;
  text-align: center;
  color: #64748b;
}

.sk-mesaj {
  margin-top: 8px;
  font-size: 11.5px;
  color: #64748b;
}

.tema-karanlik .sk {
  color: rgba(255, 255, 255, 0.9);
}

.tema-karanlik .sk-header {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.tema-karanlik .sk-satir-ad {
  color: rgba(255, 255, 255, 0.9);
}

.tema-karanlik .sk-satir {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.tema-karanlik .sk-input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.tema-karanlik .sk-btn {
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
}

.tema-karanlik .sk-btn--primary {
  color: #fff;
}

.tema-karanlik .sk-satir:hover {
  background: rgba(255, 255, 255, 0.06);
}

.tema-karanlik .sk-satir--aktif {
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.4);
}

.tema-karanlik .sk-satir-alt,
.tema-karanlik .sk-bos,
.tema-karanlik .sk-mesaj {
  color: rgba(255, 255, 255, 0.5);
}
