/* =========================
   MODAL / AGENT ZERO / TOAST
========================= */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  display: grid;
  place-items: center;
  z-index: 50;
}

.modal-card {
  width: 420px;
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
  position: relative;
}

.agent-zero-modal {
  width: min(760px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  border-color: rgba(34, 211, 238, 0.45);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 32%),
    radial-gradient(circle at bottom left, rgba(167, 139, 250, 0.12), transparent 32%),
    #0f172a;
}

.close {
  position: absolute;
  right: 18px;
  top: 16px;
  background: transparent;
  color: white;
  font-size: 24px;
}

.hint-buttons {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.hint-buttons button {
  background: #1e293b;
  color: white;
}

.full {
  width: 100%;
}

.agent-chat {
  display: grid;
  gap: 12px;
  max-height: 280px;
  overflow-y: auto;
  margin: 20px 0;
  padding: 16px;
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.agent-message {
  padding: 14px;
  border-radius: 16px;
  line-height: 1.55;
}

.agent-message p {
  margin: 6px 0 0;
  color: #dbeafe;
}

.agent-message.agent {
  background: rgba(34, 211, 238, 0.11);
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.agent-message.user {
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.28);
}

.agent-message strong {
  color: #67e8f9;
}

.agent-question-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.agent-question-grid button {
  text-align: left;
  padding: 14px;
  border-radius: 16px;
  color: white;
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.22);
  transition: 0.2s ease;
}

.agent-question-grid button:hover {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(14, 116, 144, 0.24);
  transform: translateY(-2px);
}

.agent-question-grid button:last-child {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(167, 139, 250, 0.18));
  border-color: rgba(34, 211, 238, 0.38);
}

.agent-input-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.agent-input-row input {
  flex: 1;
  min-width: 0;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.75);
  color: white;
}

.agent-input-row input::placeholder {
  color: #64748b;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(34, 197, 94, 0.55);
  color: white;
  padding: 16px 20px;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  z-index: 60;
}

.pulse-unlock {
  animation: pulseUnlock 0.9s ease;
}

@keyframes pulseUnlock {
  0% {
    transform: scale(1);
    box-shadow: none;
  }

  45% {
    transform: scale(1.04);
    box-shadow: 0 0 35px rgba(34, 197, 94, 0.35);
  }

  100% {
    transform: scale(1);
    box-shadow: none;
  }
}

/* =========================
   ACHIEVEMENT POPUP
========================= */

.achievement-popup{

    position:fixed;

    top:30px;

    right:30px;

    width:360px;

    display:flex;

    align-items:center;

    gap:18px;

    padding:18px;

    border-radius:20px;

    background:rgba(15,23,42,.96);

    border:1px solid rgba(255,215,0,.45);

    box-shadow:
        0 20px 60px rgba(0,0,0,.45),
        0 0 30px rgba(255,215,0,.18);

    z-index:999;

    animation:achievementSlide .45s ease;

}

.achievement-icon{

    width:44px;

    height:44px;

    display:grid;

    place-items:center;

    border-radius:14px;

    background:rgba(34,211,238,.12);

    font-size:22px;

    flex-shrink:0;

}

.achievement-popup small{

    color:#facc15;

    font-weight:bold;

    letter-spacing:1px;

}

.achievement-popup h3{

    margin:4px 0 0;

    color:white;

}

@keyframes achievementSlide{

    from{

        opacity:0;

        transform:translateX(80px);

    }

    to{

        opacity:1;

        transform:translateX(0);

    }
}

/* =========================
   INTELLIGENCE POPUP
========================= */

.intel-popup{

    position:fixed;

    top:50%;

    left:50%;

    transform:translate(-50%,-50%);

    width:500px;

    padding:28px;

    border-radius:22px;

    background:#020617;

    border:2px solid #22d3ee;

    box-shadow:
        0 0 45px rgba(34,211,238,.25);

    text-align:center;

    z-index:9999;

    animation:intelAppear .35s ease;

}

.intel-header,
.intel-footer{

    overflow:hidden;

    white-space:nowrap;

    color:#22d3ee;

    letter-spacing:2px;

    margin:10px 0;

    animation:intelBars 1.8s linear infinite;

}

.intel-achievement-icon{

    font-size:64px;

    margin-bottom:18px;

    animation:trophyPulse 2s ease-in-out infinite;

}
.intel-title{

    font-size:28px;

    font-weight:bold;

    color:white;

    margin-top:18px;

}

.intel-subtitle{

    color:#67e8f9;

    margin:18px 0;

    letter-spacing:2px;

}

.intel-name{

    font-size:34px;

    font-weight:bold;

    color:#22d3ee;

    margin:24px 0;

}

.intel-status{

    color:white;

    margin-top:18px;

}

.intel-status span{

    color:#22c55e;

    font-weight:bold;

}

@keyframes intelAppear{

    from{

        opacity:0;

        transform:translate(-50%,-45%) scale(.92);

    }

    to{

        opacity:1;

        transform:translate(-50%,-50%) scale(1);

    }

}

@keyframes intelBars{

    0%{

        transform:translateX(-40px);

        opacity:.25;

    }

    50%{

        transform:translateX(40px);

        opacity:1;

    }

    100%{

        transform:translateX(-40px);

        opacity:.25;

    }

}

@keyframes trophyPulse{

    0%{

        transform:scale(1);

    }

    50%{

        transform:scale(1.08);

    }

    100%{

        transform:scale(1);

    }

}



