/* DocKop - Custom Premium Styling Sheet */

:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  /* Color Palette - Elegant Dark Theme with Ruby Red accents */
  --bg-deep: #080304;
  --bg-card: rgba(18, 8, 10, 0.6);
  --bg-card-hover: rgba(26, 12, 15, 0.75);
  --border-glass: rgba(255, 255, 255, 0.05);
  --border-glass-focused: rgba(239, 68, 68, 0.4);
  
  --primary-start: #ef4444; /* Crimson Red */
  --primary-end: #991b1b;   /* Ruby Dark Red */
  --accent: #f87171;        /* Light Coral */
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  --shadow-glow: 0 0 25px rgba(239, 68, 68, 0.15);
  --shadow-glow-large: 0 0 50px rgba(239, 68, 68, 0.25);
  --shadow-card: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Background Blobs */
.glass-bg-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(125px);
  opacity: 0.16;
  mix-blend-mode: screen;
  animation: float-around 22s infinite alternate ease-in-out;
}

.blob-1 {
  width: 550px;
  height: 550px;
  background: var(--primary-start);
  top: -10%;
  left: 10%;
  animation-duration: 18s;
}

.blob-2 {
  width: 480px;
  height: 480px;
  background: var(--primary-end);
  bottom: -5%;
  right: 15%;
  animation-duration: 25s;
}

.blob-3 {
  width: 380px;
  height: 380px;
  background: #a855f7; /* Violet */
  top: 35%;
  left: 45%;
  animation-duration: 20s;
}

@keyframes float-around {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 40px) scale(1.08); }
  100% { transform: translate(40px, -30px) scale(0.92); }
}

/* App Container */
.app-container {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: space-between;
}

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

.logo-area {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #fff;
  box-shadow: var(--shadow-glow);
  transition: var(--transition-normal);
}

.animate-sway {
  animation: sway 6s infinite ease-in-out;
}

@keyframes sway {
  0%, 100% { transform: rotate(-3deg) scale(1); }
  50% { transform: rotate(3deg) scale(1.04); }
}

.logo-text h1 {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
}

.gradient-text {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 30%, #ef4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.tagline {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 3px;
  font-weight: 400;
}

/* Privacy Banner */
.privacy-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(239, 68, 68, 0.03);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 16px;
  padding: 14px 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.privacy-icon {
  font-size: 20px;
  color: var(--primary-start);
  flex-shrink: 0;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.privacy-text {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.4;
  text-align: left;
}

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

/* General Glass Cards */
.card {
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

/* Split Pane Layout Grid */
.main-card-layout {
  display: none;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  width: 100%;
}

.main-card-layout.active {
  display: grid;
}

.panel-settings, .panel-details-viewer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 520px;
}

.panel-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Drag & Drop Zone */
.drop-zone {
  border: 2px dashed rgba(239, 68, 68, 0.3);
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
  background: rgba(239, 68, 68, 0.01);
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary-start);
  background: rgba(239, 68, 68, 0.04);
}

.file-input-hidden {
  display: none;
}

.upload-icon-container {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  transition: var(--transition-normal);
  color: var(--text-secondary);
}

.drop-zone:hover .upload-icon-container {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.upload-icon {
  font-size: 20px;
  background: linear-gradient(135deg, #fee2e2, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.drop-zone h3 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.drop-zone p {
  color: var(--text-secondary);
  font-size: 11px;
}

/* File Loaded Banner */
.file-loaded-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 10px 14px;
}

.file-details {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.file-details i {
  color: var(--primary-start);
  font-size: 15px;
  flex-shrink: 0;
}

.file-details strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.btn-clear-all {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-clear-all:hover {
  color: var(--error);
}

.metadata-stats-bar {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.metadata-stats-bar strong {
  color: var(--primary-start);
}

.demo-data-row {
  margin-top: auto;
  text-align: center;
}

.staged-file-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Sub-tabs header */
.tabs-header-bar.sub-tabs {
  margin-bottom: 10px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
}

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

.tab-btn.active {
  color: var(--primary-start);
  border-bottom-color: var(--primary-start);
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.tab-viewport-container {
  width: 100%;
  flex-grow: 1;
  display: flex;
}

.tab-pane {
  display: none;
  width: 100%;
  flex-direction: column;
}

.tab-pane.active {
  display: flex;
}

/* Metadata Table details */
.table-wrapper {
  width: 100%;
  flex-grow: 1;
  background-color: #060203;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  overflow-y: auto;
}

.table-wrapper::-webkit-scrollbar {
  width: 5px;
}
.table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.metadata-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}

.metadata-table th, .metadata-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.02);
}

.metadata-table th {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.01);
  position: sticky;
  top: 0;
  z-index: 10;
}

.metadata-table td {
  color: var(--text-primary);
}

.metadata-table tbody tr:hover {
  background-color: rgba(255,255,255,0.01);
}

/* Geo Maps styles */
.gps-map-wrapper {
  width: 100%;
  flex-grow: 1;
  background-color: #060203;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  min-height: 350px;
}

.gps-map {
  width: 100%;
  height: 100%;
}

.map-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  color: var(--text-secondary);
  pointer-events: none;
  z-index: 1000; /* overlay Leaflet map */
}

.map-placeholder i {
  font-size: 38px;
  color: var(--text-muted);
}

.map-placeholder p {
  font-size: 12.5px;
  max-width: 250px;
  line-height: 1.5;
}

/* Offline styled grid background for map */
.leaflet-container {
  background-color: #060203 !important;
}

/* Buttons */
.btn {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #f87171, #b91c1c);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-action-text {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition-fast);
}

.btn-action-text:hover {
  color: var(--primary-start);
}

.text-error {
  color: var(--error) !important;
}

.hidden {
  display: none !important;
}

/* Footer info */
.app-footer {
  text-align: center;
  margin-top: 25px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.app-footer p {
  color: var(--text-muted);
  font-size: 11.5px;
}

/* Responsive Explorer Layout */
@media (max-width: 800px) {
  .main-card-layout {
    grid-template-columns: 1fr;
  }
  .panel-settings, .panel-details-viewer {
    height: auto;
  }
  .table-wrapper, .gps-map-wrapper {
    height: 300px;
  }
  .app-container {
    padding: 20px 10px;
  }
}
