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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* PIN Page Styles */
.pin-body {
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: #fff;
}

.pin-container {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 50px 40px;
  text-align: center;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  min-width: 350px;
}

.lock-icon {
  font-size: 60px;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

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

.pin-container h1 {
  margin-bottom: 30px;
  font-size: 28px;
  font-weight: 300;
}

.pin-container input {
  width: 100%;
  padding: 15px;
  margin-bottom: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 18px;
  text-align: center;
  letter-spacing: 5px;
  transition: all 0.3s;
}

.pin-container input:focus {
  outline: none;
  border-color: #00ff88;
  background: rgba(255, 255, 255, 0.15);
}

.pin-container input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: normal;
}

.pin-container button {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
  color: #000;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.pin-container button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 255, 136, 0.4);
}

.pin-container button:active {
  transform: translateY(0);
}

.error-message {
  color: #ff4444;
  margin-top: 15px;
  font-size: 14px;
  min-height: 20px;
}

.shake {
  animation: shake 0.5s;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

/* Search Page Styles */
.search-body {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  min-height: 100vh;
  color: #fff;
}

.navbar {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar h2 {
  font-weight: 300;
  font-size: 24px;
}

.logout-btn {
  padding: 10px 25px;
  background: rgba(255, 68, 68, 0.2);
  border: 1px solid #ff4444;
  color: #ff4444;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s;
  font-size: 14px;
}

.logout-btn:hover {
  background: #ff4444;
  color: #fff;
}

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

.search-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

.tab-btn {
  padding: 12px 28px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.tab-btn.active {
  background: rgba(0, 255, 136, 0.15);
  border-color: #00ff88;
  color: #00ff88;
}

.tab-panel {
  display: none;
}

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

.tab-description {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
  font-size: 14px;
}

.tab-description code {
  background: rgba(0, 255, 136, 0.1);
  color: #00ff88;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
}

.partial-match-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  margin-bottom: 20px;
  cursor: pointer;
}

.partial-match-label input[type="checkbox"] {
  accent-color: #00ff88;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.index-status-box {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.75);
}

.index-status-box code {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: #00ff88;
  font-size: 12px;
  word-break: break-all;
}

.index-status-box.index-ready {
  border-color: rgba(0, 255, 136, 0.35);
  background: rgba(0, 255, 136, 0.08);
  color: #d9ffe9;
}

.index-status-box.index-warning {
  border-color: rgba(255, 165, 0, 0.35);
  background: rgba(255, 165, 0, 0.08);
  color: #ffe6bf;
}

.search-box {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.search-box input {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 16px;
  transition: all 0.3s;
}

.search-box input:focus {
  outline: none;
  border-color: #00ff88;
  background: rgba(255, 255, 255, 0.1);
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.search-box button {
  padding: 15px 40px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
  color: #000;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.search-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 255, 136, 0.4);
}

.loading-spinner {
  text-align: center;
  padding: 40px;
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid #00ff88;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.result-container {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  overflow: hidden;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.result-header h3 {
  font-weight: 400;
  font-size: 20px;
}

.result-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.delete-btn {
  width: 40px;
  height: 36px;
  border: 1px solid #ff4444;
  background: rgba(255, 68, 68, 0.1);
  color: #ff4444;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.delete-btn:hover {
  background: #ff4444;
  color: #fff;
}

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

.copy-btn {
  padding: 8px 20px;
  border: 1px solid #00ff88;
  background: rgba(0, 255, 136, 0.1);
  color: #00ff88;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}

.copy-btn:hover {
  background: #00ff88;
  color: #000;
}

.copy-btn.copied {
  background: #00ff88;
  color: #000;
}

.result-box {
  padding: 25px;
  max-height: 600px;
  overflow-y: auto;
}

.result-box pre {
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: "Courier New", monospace;
}

.result-box::-webkit-scrollbar {
  width: 10px;
}

.result-box::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.result-box::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 136, 0.3);
  border-radius: 5px;
}

.result-box::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 136, 0.5);
}

.no-data-message {
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
}

.info-icon {
  font-size: 50px;
  margin-bottom: 15px;
}

.no-data-message p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
}

.error-message-box {
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid #ff4444;
  color: #ff4444;
  padding: 15px 20px;
  border-radius: 10px;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar {
    padding: 15px 20px;
  }

  .navbar h2 {
    font-size: 18px;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box button {
    width: 100%;
  }

  .pin-container {
    min-width: auto;
    width: 90%;
    padding: 40px 30px;
  }

  .result-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .copy-btn {
    width: 100%;
  }
}
