/* ====================================================
   components.css - Reusable UI pieces (chat widget, buttons, cards, etc.)
   Updated: Full chat widget + lab simulation styles
   ==================================================== */
/* Avatar – small circular like portfolio page */
.avatar-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.5rem;
  border: 4px solid rgba(0, 212, 255, 0.4);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.35);
  transition: transform 0.4s ease;
}

.avatar-img:hover {
  transform: scale(1.08);
}

/* Floating Cipher AI Chat Widget */
.chat-widget {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 380px;
  height: 520px;
  background: rgba(26, 26, 38, 0.96);
  border-radius: 16px;
  box-shadow: 0 12px 50px rgba(0, 247, 255, 0.35);
  border: 1px solid rgba(0, 247, 255, 0.3);
  display: none;
  flex-direction: column;
  z-index: 10000;
  overflow: hidden;
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.4s ease;
}

.chat-widget.visible {
  display: flex;
  transform: scale(1);
  opacity: 1;
}

.chat-header {
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, #00f7ff, #a777e5);
  color: #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Orbitron', sans-serif;
  font-weight: bold;
}

.chat-minimize {
  background: none;
  border: none;
  color: #000;
  font-size: 1.8rem;
  cursor: pointer;
}

.chat-body {
  flex: 1;
  padding: 1.2rem;
  overflow-y: auto;
  color: #e0e0ff;
}

.chat-message {
  margin-bottom: 1rem;
  padding: 0.9rem 1.3rem;
  border-radius: 14px;
  max-width: 85%;
  line-height: 1.4;
}

.chat-message.user {
  background: rgba(0, 247, 255, 0.25);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.chat-message.bot {
  background: rgba(167, 119, 229, 0.25);
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

.chat-input {
  display: flex;
  padding: 1rem;
  border-top: 1px solid rgba(0, 247, 255, 0.2);
  background: rgba(26, 26, 38, 0.8);
}

#chat-user-input {
  flex: 1;
  padding: 0.9rem 1.2rem;
  border: 1px solid rgba(0, 247, 255, 0.3);
  border-radius: 10px 0 0 10px;
  background: #1e1e2e;
  color: #e0e0ff;
}

#chat-send {
  padding: 0.9rem 1.4rem;
  background: linear-gradient(135deg, #00f7ff, #a777e5);
  color: #000;
  border: none;
  border-radius: 0 10px 10px 0;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

/* Small minimized Cipher button */
.chat-minimized-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #00f7ff, #a777e5);
  color: #000;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 247, 255, 0.4);
  z-index: 9999;
  display: none;
  transition: all 0.3s ease;
}

.chat-minimized-btn:hover {
  transform: scale(1.15);
}

/* Mobile adjustments */
@media (max-width: 500px) {
  .chat-widget {
    width: 90%;
    height: 70vh;
    bottom: 80px;
    right: 5%;
  }
  .chat-minimized-btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    bottom: 15px;
    right: 15px;
  }
}
/* Avatar - Small circular like portfolio page */
.avatar-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.5rem;
  border: 4px solid rgba(0, 212, 255, 0.4);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.35);
  transition: transform 0.4s ease;
}

.avatar-img:hover {
  transform: scale(1.08);
}

/* Floating AI Chat Widget - Auto-visible + minimize to small button */
.chat-widget {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 380px;
  height: 520px;
  background: rgba(26, 26, 38, 0.96);
  border-radius: 16px;
  box-shadow: 0 12px 50px rgba(0, 247, 255, 0.35);
  border: 1px solid rgba(0, 247, 255, 0.3);
  display: none;
  flex-direction: column;
  z-index: 10000;
  overflow: hidden;
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.4s ease;
}

.chat-widget.visible {
  display: flex;
  transform: scale(1);
  opacity: 1;
}

.chat-header {
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, #00f7ff, #a777e5);
  color: #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Orbitron', sans-serif;
  font-weight: bold;
}

.chat-minimize,
.chat-close {
  background: none;
  border: none;
  color: #000;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.chat-body {
  flex: 1;
  padding: 1.2rem;
  overflow-y: auto;
  color: #e0e0ff;
}

.chat-message {
  margin-bottom: 1rem;
  padding: 0.9rem 1.3rem;
  border-radius: 14px;
  max-width: 85%;
  line-height: 1.4;
}

.chat-message.user {
  background: rgba(0, 247, 255, 0.25);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.chat-message.bot {
  background: rgba(167, 119, 229, 0.25);
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

.chat-input {
  display: flex;
  padding: 1rem;
  border-top: 1px solid rgba(0, 247, 255, 0.2);
  background: rgba(26, 26, 38, 0.8);
}

#chat-user-input {
  flex: 1;
  padding: 0.9rem 1.2rem;
  border: 1px solid rgba(0, 247, 255, 0.3);
  border-radius: 10px 0 0 10px;
  background: #1e1e2e;
  color: #e0e0ff;
}

#chat-send {
  padding: 0.9rem 1.4rem;
  background: linear-gradient(135deg, #00f7ff, #a777e5);
  color: #000;
  border: none;
  border-radius: 0 10px 10px 0;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

#chat-send:hover {
  transform: scale(1.05);
}

/* Small minimized button */
.chat-minimized-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #00f7ff, #a777e5);
  color: #000;
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 247, 255, 0.4);
  z-index: 9999;
  display: none;
  transition: all 0.3s ease;
}

.chat-minimized-btn:hover {
  transform: scale(1.15);
}

/* Mobile adjustments */
@media (max-width: 500px) {
  .chat-widget {
    width: 90%;
    height: 70vh;
    bottom: 80px;
    right: 5%;
  }
  .chat-minimized-btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    bottom: 15px;
    right: 15px;
  }
}



/* Reusable Button Styles */
.btn {
  padding: 0.85rem 2.2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  display: inline-block;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00d4ff, #a777e5);
  color: white;
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 45px rgba(0, 212, 255, 0.45);
}

.btn-secondary {
  background: transparent;
  color: #00d4ff;
  border: 2.5px solid #00d4ff;
}

.btn-secondary:hover {
  background: #00d4ff;
  color: #0a0a0a;
  transform: translateY(-3px);
}

/* Floating AI Chat Widget – auto-visible on load, minimizes to small button */
.chat-widget {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 380px;
  height: 520px;
  background: rgba(26, 26, 38, 0.96);
  border-radius: 16px;
  box-shadow: 0 12px 50px rgba(0, 247, 255, 0.35);
  border: 1px solid rgba(0, 247, 255, 0.3);
  display: none;
  flex-direction: column;
  z-index: 10000;
  overflow: hidden;
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.4s ease;
}

.chat-widget.visible {
  display: flex;
  transform: scale(1);
  opacity: 1;
}

.chat-header {
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, #00f7ff, #a777e5);
  color: #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Orbitron', sans-serif;
  font-weight: bold;
}

.chat-minimize,
.chat-close {
  background: none;
  border: none;
  color: #000;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.chat-body {
  flex: 1;
  padding: 1.2rem;
  overflow-y: auto;
  color: #e0e0ff;
  font-family: 'Inter', sans-serif;
}

.chat-message {
  margin-bottom: 1rem;
  padding: 0.9rem 1.3rem;
  border-radius: 14px;
  max-width: 85%;
  line-height: 1.4;
}

.chat-message.user {
  background: rgba(0, 247, 255, 0.25);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.chat-message.bot {
  background: rgba(167, 119, 229, 0.25);
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

.chat-input {
  display: flex;
  padding: 1rem;
  border-top: 1px solid rgba(0, 247, 255, 0.2);
  background: rgba(26, 26, 38, 0.8);
}

#chat-user-input {
  flex: 1;
  padding: 0.9rem 1.2rem;
  border: 1px solid rgba(0, 247, 255, 0.3);
  border-radius: 10px 0 0 10px;
  background: #1e1e2e;
  color: #e0e0ff;
  font-family: 'Inter', sans-serif;
}

#chat-send {
  padding: 0.9rem 1.4rem;
  background: linear-gradient(135deg, #00f7ff, #a777e5);
  color: #000;
  border: none;
  border-radius: 0 10px 10px 0;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

#chat-send:hover {
  transform: scale(1.05);
}

/* Small minimized button when chat is closed */
.chat-minimized-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #00f7ff, #a777e5);
  color: #000;
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 247, 255, 0.4);
  z-index: 9999;
  display: none;
  transition: all 0.3s ease;
}

.chat-minimized-btn:hover {
  transform: scale(1.15);
}

/* Mobile adjustments */
@media (max-width: 500px) {
  .chat-widget {
    width: 90%;
    height: 70vh;
    bottom: 80px;
    right: 5%;
  }
  .chat-minimized-btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    bottom: 15px;
    right: 15px;
  }
}

/* Security Lab v2 Styles (professional simulation UI) */
.lab-body {
  background: #0a0a0a;
  color: #e0e0ff;
  font-family: 'Roboto Mono', monospace;
  min-height: 100vh;
  position: relative;
}

.lab-header {
  text-align: center;
  padding: 2rem 1rem;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid #00f7ff33;
}

.lab-header h1 {
  font-family: 'Orbitron', sans-serif;
  color: #00f7ff;
  margin-bottom: 0.5rem;
}

.lab-header p {
  color: #b0b0ff;
  font-size: 1.1rem;
}

.input-section {
  max-width: 700px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: rgba(26, 26, 38, 0.7);
  border-radius: 12px;
  border: 1px solid #00f7ff22;
}

.input-section label {
  display: block;
  margin-bottom: 1rem;
  color: #00f7ff;
  font-size: 1.2rem;
}

#test-input {
  width: 100%;
  padding: 1rem;
  background: #1a1a2e;
  color: #e0e0ff;
  border: 1px solid #00f7ff44;
  border-radius: 8px;
  font-family: 'Roboto Mono', monospace;
  resize: vertical;
  min-height: 120px;
}

#evaluate-btn {
  margin-top: 1rem;
  padding: 0.9rem 2rem;
  background: linear-gradient(90deg, #00f7ff, #a777e5);
  color: #000;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

#evaluate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 247, 255, 0.4);
}

.result-section {
  max-width: 700px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: rgba(26, 26, 38, 0.7);
  border-radius: 12px;
  border: 1px solid #00f7ff22;
}

.threat-indicator {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.threat { color: #ff5555; }
.safe { color: #00ff9d; }

.nav-buttons {
  text-align: center;
  margin-top: 3rem;
}

.nav-buttons .btn {
  margin: 0.5rem;
}

/* Additional reusable card styles (used in portfolio/lab) */
.card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s ease;
}

.card:hover {
  transform: translateY(-8px);
}
