/* ========== RESET & BASE ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --bg: #0a0e1a;
  --card: rgba(255,255,255,0.04);
  --card-border: rgba(255,255,255,0.08);
  --accent: #6c63ff;
  --accent2: #00d4ff;
  --safe: #00e676;
  --danger: #ff3d71;
  --text: #e2e8f0;
  --text-muted: #8892a4;
  --glass: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.12);
}
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
/* ========== ANIMATED BACKGROUND ========== */
.bg-glow {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-glow .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  animation: float 8s ease-in-out infinite alternate;
}
.bg-glow .orb:nth-child(1) {
  width: 500px; height: 500px;
  background: var(--accent);
  top: -10%; left: -5%;
}
.bg-glow .orb:nth-child(2) {
  width: 400px; height: 400px;
  background: var(--accent2);
  bottom: -10%; right: -5%;
  animation-delay: -4s;
}
.bg-glow .orb:nth-child(3) {
  width: 300px; height: 300px;
  background: #a855f7;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -2s;
}
@keyframes float {
  to { transform: translate(40px, -30px) scale(1.1); }
}
/* ========== LAYOUT ========== */
.wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* ========== HEADER ========== */
header {
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(20px);
  background: rgba(10,14,26,0.6);
  position: sticky;
  top: 0;
  z-index: 10;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 20px rgba(108,99,255,0.3);
}
.logo h1 {
  font-size: 1.35rem;
  font-weight: 700;
}
.logo h1 span {
  color: var(--accent2);
}
.nav-links {
  display: flex;
  gap: 1.5rem;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}
.nav-links a:hover {
  color: var(--accent2);
}
/* ========== MAIN ========== */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1.5rem 2rem;
}
/* HERO */
.hero {
  text-align: center;
  max-width: 650px;
  margin-bottom: 2.5rem;
}
.hero h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, var(--accent2) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}
/* SCAN CARD */
.scan-card {
  width: 100%;
  max-width: 620px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(24px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}
.scan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 50px rgba(108,99,255,0.15);
}
.input-group {
  display: flex;
  gap: 0.75rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 0.5rem;
  transition: border-color 0.3s;
}
.input-group:focus-within {
  border-color: var(--accent);
}
.input-group input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
  padding: 0.75rem 1rem;
}
.input-group input::placeholder {
  color: var(--text-muted);
}
.btn-scan {
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn-scan:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 25px rgba(108,99,255,0.4);
}
.btn-scan:active {
  transform: scale(0.98);
}
.btn-scan:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
/* SPINNER */
.spinner {
  width: 20px; height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn-scan.loading .spinner { display: block; }
.btn-scan.loading .btn-text { display: none; }
@keyframes spin {
  to { transform: rotate(360deg); }
}
/* RESULT */
.result {
  margin-top: 1.75rem;
  display: none;
  animation: slideUp 0.5s ease-out;
}
.result.show { display: block; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.result-card {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}
.result-card.safe { border-color: rgba(0,230,118,0.3); }
.result-card.danger { border-color: rgba(255,61,113,0.3); }
.result-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.result-status { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.result-card.safe .result-status { color: var(--safe); }
.result-card.danger .result-status { color: var(--danger); }
.risk-bar-container {
  margin: 1rem auto;
  max-width: 300px;
}
.risk-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.risk-bar {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.risk-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease-out;
  width: 0;
}
.result-card.safe .risk-bar-fill {
  background: linear-gradient(90deg, var(--safe), #69f0ae);
}
.result-card.danger .risk-bar-fill {
  background: linear-gradient(90deg, #ff9100, var(--danger));
}
.result-details {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.detail-tag {
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
/* ABOUT */
.about {
  max-width: 620px;
  width: 100%;
  margin-top: 3rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(24px);
}
.about h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.about p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.feature-item {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}
.feature-item:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.feature-item .f-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.feature-item .f-title { font-size: 0.85rem; font-weight: 600; }
.feature-item .f-desc { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
/* FOOTER */
footer {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
  border-top: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.85rem;
}
footer a {
  color: var(--accent2);
  text-decoration: none;
}
footer a:hover { text-decoration: underline; }
/* ========== RESPONSIVE ========== */
@media (max-width: 600px) {
  header {
    padding: 1rem;
    flex-direction: column;
    gap: 0.75rem;
  }
  .input-group { flex-direction: column; }
  .btn-scan { width: 100%; justify-content: center; }
  .scan-card, .about { padding: 1.25rem; }
  main { padding: 2rem 1rem; }
}
.lang-switcher {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.lang-switcher button {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  font-weight: 600;
}
.lang-switcher button:hover {
  background: rgba(108,99,255,0.2);
  border-color: var(--accent);
  color: #fff;
}