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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #010b27 0%, #010b27 100%);
  min-height: 100vh;
  padding: 40px 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, #072e9b 0%, #010f36 100%);
  color: white;
  padding: 40px 40px 0 40px; /* Remove bottom padding so tabs sit flush */
  text-align: center;
}

.header h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.header-logo {
  height: 150px;
  width: auto;
  object-fit: contain;
}

.wave-logo {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header p {
  font-size: 1.1em;
  opacity: 0.9;
}

.content {
  padding: 30px;
}

.section {
  margin-bottom: 40px;
}

.section-title {
  font-size: 1.5em;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #072e9b;
  display: inline-block;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.control-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

label {
  font-weight: 500;
  color: #555;
}

input[type="file"],
input[type="number"] {
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1em;
  transition: border-color 0.3s;
}

input[type="file"]:focus,
input[type="number"]:focus {
  outline: none;
  border-color: #147baa 0%;
}

input[type="number"] {
  width: 130px;
}

button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #072e9b 0%, #010f36 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px #147baa 0%;
}

.btn-secondary {
  background: #f0f0f0;
  color: #333;
  border: 2px solid #e0e0e0;
}

.btn-secondary:hover:not(:disabled) {
  background: #e0e0e0;
  border-color: #147baa;
}

.btn-danger {
  background: #ff6b6b;
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #ff5252;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#videoUploadArea {
  position: relative;
  background: #f8f9fa;
  padding: 30px;
  border-radius: 8px;
  border: 2px dashed #072e9b;
  display: inline-block;
  width: 100%;
}

#videoContainer {
  position: relative; /* Anchor for absolute canvas */
  display: inline-block; /* Wraps tightly around video */
  width: 100%;
  max-width: 100%;
  margin-top: 20px;
}

#videoPlayer {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#processingStatus {
  margin-top: 15px;
  padding: 12px;
  border-radius: 6px;
  font-weight: 500;
  display: none;
}

#processingStatus.loading {
  display: block;
  background: #e3f2fd;
  color: #1976d2;
  border-left: 4px solid #1976d2;
}

#processingStatus.success {
  display: block;
  background: #e8f5e9;
  color: #388e3c;
  border-left: 4px solid #388e3c;
}

#processingStatus.error {
  display: block;
  background: #ffebee;
  color: #d32f2f;
  border-left: 4px solid #d32f2f;
}

.marker-canvas {
  position: absolute;
  pointer-events: none;
}

/* Ensure any canvas appended to the video container overlays the video */
#videoContainer canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10;
}

/* Table Results Styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th {
  background-color: #010b27; /* Dark blue matching body bg */
  color: white;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #4a90e2;
}

td {
  padding: 10px;
  border-bottom: 1px solid #eee;
  color: #333;
}

tbody tr:hover {
  background-color: #f0f7ff;
}

#count {
  display: inline-block;
  margin-left: 15px;
  padding: 8px 16px;
  background: #e3f2fd;
  color: #1976d2;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.95em;
}

.filter-info {
  margin-top: 10px;
  padding: 12px;
  background: #f0f0f0;
  border-radius: 6px;
  font-size: 0.95em;
  color: #555;
}

@media (max-width: 768px) {
  .header {
    padding: 30px 20px;
  }

  .header h1 {
    font-size: 2em;
  }

  .content {
    padding: 20px;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .control-group {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  input[type="number"] {
    width: 100%;
  }

  /* Allow responsive sizing on smaller screens */
  #videoPlayer {
    max-width: 100%;
    height: auto;
  }

  table {
    font-size: 0.9em;
  }

  th, td {
    padding: 10px;
  }
}

/* Tab Navigation (Header Integrated) */
.tab-nav {
  display: flex;
  justify-content: flex-start; /* Left align */
  background-color: transparent;
  padding-top: 20px;
  width: 100%;
}

.tab-link {
  background-color: transparent;
  text-decoration: none;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 10px 20px;
  transition: all 0.3s ease;
  font-size: 18px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.tab-link:hover {
  color: #fff;
}

.tab-link.active {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-bottom: none;
}

/* Tab Content */
.tab-content {
  display: none;
  padding: 20px 0;
  animation: fadeEffect 0.5s;
}

.tab-content.active {
  display: block;
}

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

/* Home Tab Typography */
#Home h2{
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}
#Home p {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

