* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  padding: 0;
  margin: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow-x: hidden;
}

.shritek-credit {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-size: 0.9rem;
  color: #F0F8FF;
  margin: 0;
  padding: 0.25rem 0;
  text-align: center;
}

.shritek-credit a {
  color: #FFEBCD;
  text-decoration: none;
  font-weight: 600;
  margin-left: 6px;
  border-bottom: 1px dashed rgba(0,0,0,0.08);
}

.shritek-credit a:hover,
.shritek-credit a:focus {
  color: #FFEBCD;
  border-bottom-style: solid;
  outline: none;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.container {
  max-width: 1200px;
  padding: 40px 20px;
  text-align: center;
  width: 100%;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  justify-items: center;
}

.header-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: fadeInUp 0.8s ease-out;
}

h2 {
  color: white;
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 0;
  text-shadow: 
    2px 2px 4px rgba(0,0,0,0.3),
    0 0 20px rgba(255,255,255,0.2);
  text-align: center;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(45deg, #ffffff, #f0f0f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, transparent, #ffffff, transparent);
  border-radius: 2px;
}

.logo {
  width: clamp(120px, 20vw, 180px);
  height: auto;
  border-radius: 20px;
  box-shadow: 
    0 15px 35px rgba(0,0,0,0.3),
    0 5px 15px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: block;
  border: 3px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
}

.logo:hover {
  transform: scale(1.08) rotate(2deg);
  box-shadow: 
    0 25px 50px rgba(0,0,0,0.4),
    0 10px 25px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.4);
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 600px;
  padding: 0 20px;
}

#reader {
  max-width: 450px;
  width: 100%;
  display: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 
    0 20px 40px rgba(0,0,0,0.4),
    0 10px 20px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  animation: slideInUp 0.5s ease-out;
}

.table-container {
  width: 100%;
  max-width: 900px;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

table {
  margin: 0 auto;
  border-collapse: collapse;
  width: 100%;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  box-shadow: 
    0 20px 40px rgba(0,0,0,0.3),
    0 10px 20px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.3);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
  border-spacing: 0 8px;
  border-collapse: separate;
}

th, td {
  border: none;
  padding: 25px 30px;
  text-align: left;
  transition: all 0.3s ease;
  position: relative;
}

th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.9rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
  position: relative;
  border-radius: 15px 15px 0 0;
}

th:first-child {
  border-radius: 15px 0 0 0;
}

th:last-child {
  border-radius: 0 15px 0 0;
}

th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

tbody tr {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  box-shadow: 
    0 8px 25px rgba(0,0,0,0.1),
    0 3px 10px rgba(0,0,0,0.05);
  border-radius: 15px;
  margin: 8px 0;
  border: 1px solid rgba(255,255,255,0.3);
  transform: translateY(0);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

tbody tr:nth-child(even) {
  background: linear-gradient(135deg, 
    rgba(102, 126, 234, 0.08) 0%, 
    rgba(118, 75, 162, 0.08) 100%);
}

tbody tr:nth-child(odd) {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(248, 250, 252, 0.95) 100%);
}

tbody tr:hover {
  background: linear-gradient(135deg, 
    rgba(102, 126, 234, 0.15) 0%, 
    rgba(118, 75, 162, 0.15) 100%);
  transform: translateY(-5px) scale(1.02);
  box-shadow: 
    0 15px 40px rgba(0,0,0,0.2),
    0 8px 20px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.4);
  border-color: rgba(102, 126, 234, 0.3);
}

tbody td {
  font-weight: 600;
  color: #2c3e50;
  border: none;
  font-size: 1.1rem;
  position: relative;
}

tbody td:first-child {
  border-radius: 15px 0 0 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 700;
  text-align: center;
  font-size: 1.2rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
  min-width: 60px;
}

tbody td:last-child {
  border-radius: 0 15px 15px 0;
  word-break: break-all;
  font-family: 'Courier New', monospace;
  background: rgba(255,255,255,0.5);
  padding-left: 25px;
}

tbody td:first-child::before {
  content: '#';
  font-size: 0.8em;
  opacity: 0.7;
  margin-right: 2px;
}

@keyframes scanIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  50% {
    transform: translateY(-5px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.new-scan {
  animation: scanIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 18px 35px;
  border: none;
  border-radius: 60px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 
    0 8px 25px rgba(0,0,0,0.3),
    0 3px 10px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255,255,255,0.2), 
    transparent);
  transition: left 0.5s ease;
}

.btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 
    0 15px 40px rgba(0,0,0,0.4),
    0 8px 20px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.3);
}

.btn:hover::before {
  left: 100%;
}

.btn:active {
  transform: translateY(-2px) scale(0.98);
}

h3 {
  color: white;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin: 0;
  text-shadow: 
    2px 2px 4px rgba(0,0,0,0.3),
    0 0 15px rgba(255,255,255,0.2);
  font-weight: 600;
  letter-spacing: 1px;
  position: relative;
}

h3::before {
  content: '📊';
  margin-right: 15px;
  font-size: 1.2em;
  animation: bounce 2s infinite;
}

#fileInput {
  display: none;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 20px 15px;
    gap: 25px;
  }
  .header-section {
    gap: 20px;
  }
  .controls {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0 10px;
  }
  .btn {
    padding: 15px 30px;
    font-size: 1rem;
    width: 100%;
  }
  #reader {
    max-width: 350px;
  }
  th, td {
    padding: 15px 18px;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 15px 10px;
    gap: 20px;
  }
  .header-section {
    gap: 15px;
  }
  .btn {
    padding: 12px 25px;
    font-size: 0.9rem;
  }
  th, td {
    padding: 12px 15px;
    font-size: 0.85rem;
  }
  #reader {
    max-width: 280px;
  }
}