@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;600;700&family=Roboto+Mono:wght@400;500;700&display=swap');

:root {
  --accent: #00cc7a;
  --text: #00cc7a;
  --bg: #04180f;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #04180f;
  color: var(--text);
  font-family: 'Roboto Mono', monospace;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

#matrix-rain {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1; opacity: 0.13;
  pointer-events: none;
}

.background-grid {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(rgba(0, 204, 122, 0.035) 1px, transparent 1px),
              linear-gradient(90deg, rgba(0, 204, 122, 0.035) 1px, transparent 1px);
  background-size: 70px 70px;
  z-index: 2;
}

.frame {
  width: 100%; max-width: 540px;
  background: rgba(3, 12, 9, 0.97);
  border: 2px solid var(--accent);
  border-radius: 4px;
  box-shadow: 0 0 35px rgba(0, 204, 122, 0.72);
  overflow: hidden;
  z-index: 10;
  position: relative;
}

.scanline {
  position: absolute;
  top: -10px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(transparent, rgba(0, 204, 122, 0.82), transparent);
  box-shadow: 0 0 12px #00cc7a;
  animation: scanMove 4s linear infinite;
  z-index: 5;
  opacity: 0.6;
  pointer-events: none;
}

@keyframes scanMove {
  0% { transform: translateY(0); }
  100% { transform: translateY(620px); }
}

.header {
  background: #000;
  padding: 12px 20px;
  border-bottom: 1px solid var(--accent);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  position: relative;
  z-index: 6;
}

.header-left { color: #00cc7a; letter-spacing: 1px; }

.header-right {
  color: #ff0033;
  font-weight: bold;
  animation: blinkRed 0.8s infinite;
}

@keyframes blinkRed {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.content { 
  padding: 45px 35px; 
  text-align: center; 
  position: relative;
  z-index: 6;
}

.title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.55rem;
  margin-bottom: 18px;
  letter-spacing: 3px;
}

.subtitle {
  font-size: 0.82rem;
  font-weight: 400;
  opacity: 0.65;
  margin-bottom: 45px;
  line-height: 1.6;
}

.btn {
  width: 100%; 
  padding: 16px;
  margin-bottom: 40px;
  font-size: 1.05rem; 
  font-weight: 700;
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.btn:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 30px var(--accent);
}

.info {
  text-align: left;
  font-size: 0.78rem;
  font-weight: 400;
  opacity: 0.55;
  line-height: 1.8;
}

/* Modals */
.modal {
  display: none;
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(2, 10, 7, 0.98);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: rgba(3, 12, 9, 0.98);
  border: 2px solid var(--accent);
  border-radius: 4px;
  width: 90%; max-width: 420px;
  padding: 35px 30px;
  text-align: center;
}

.radar-box {
  width: 155px; height: 155px;
  margin: 20px auto 25px;
  position: relative;
}

.radar {
  width: 100%; height: 100%;
  border: 2px solid rgba(0, 204, 122, 0.45);
  border-radius: 50%;
  background: rgba(0, 20, 15, 0.7);
  position: relative;
}

.radar-sweep {
  position: absolute; top: 50%; left: 50%;
  width: 50%; height: 2px;
  background: linear-gradient(90deg, transparent, #00cc7a, transparent);
  transform-origin: left center;
  animation: radarSweep 2.2s linear infinite;
  box-shadow: 0 0 20px #00cc7a;
}

@keyframes radarSweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.progress-container {
  height: 5px; background: #0a1f18;
  margin: 25px 0; border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%; width: 0%;
  background: #00cc7a;
  box-shadow: 0 0 15px #00cc7a;
}

.log {
  text-align: left;
  font-size: 0.88rem;
  color: #77ffbb;
  min-height: 140px;
  background: #000;
  padding: 14px;
  border: 1px solid #00281f;
  margin: 20px 0;
  white-space: pre-wrap;
  line-height: 1.7;
}

.log-line {
  opacity: 0;
  transform: translateY(8px);
  animation: logFadeIn 0.4s forwards;
}

@keyframes logFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

footer {
  padding: 15px;
  font-size: 0.75rem;
  opacity: 0.5;
  text-align: center;
  border-top: 1px solid #0a1f18;
}