/* ==========================================================================
   A.I. INNOVATION — Custom CSS StyleSheet
   Extracted & Extended from index.html
   ========================================================================== */

/* ── Base & Resets ──────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #071C2C;
  color: #E8DFD0;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* ── Custom Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #071C2C;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.4);
}

/* ── Glassmorphism Panel ────────────────────────────────────────────────── */
.glass {
  background: rgba(7, 28, 44, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 212, 255, 0.12);
  transition: all 0.35s cubic-bezier(.4, 0, .2, 1);
}

.glass:hover {
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.12), inset 0 0 30px rgba(0, 212, 255, 0.04);
}

/* ── Glow Effects ───────────────────────────────────────────────────────── */
.glow-border {
  border: 1px solid rgba(0, 212, 255, 0.1);
  transition: all 0.35s ease;
}

.glow-border:hover {
  border-color: rgba(123, 97, 255, 0.5); /* Purple accent on hover */
  box-shadow: 0 0 25px rgba(123, 97, 255, 0.15), 0 0 50px rgba(0, 212, 255, 0.1);
}

.gold-glow:hover {
  box-shadow: 0 0 25px rgba(255, 185, 46, 0.3), 0 0 50px rgba(255, 185, 46, 0.1);
}

/* ── Shimmer Effects ────────────────────────────────────────────────────── */
.card-shimmer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(0, 200, 255, 0.04) 50%, transparent 60%);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
  border-radius: inherit;
  pointer-events: none;
}

/* ── Noise Overlay ──────────────────────────────────────────────────────── */
.noise-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  border-radius: inherit;
  opacity: 0.8;
}

/* ── Scroll Helpers ─────────────────────────────────────────────────────── */
.scroll-hide::-webkit-scrollbar {
  display: none;
}

.scroll-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ── Active Elements ────────────────────────────────────────────────────── */
.tab-active {
  color: #00C8FF;
  border-bottom: 2px solid #00C8FF;
}

/* ── Grid Pattern Background ────────────────────────────────────────────── */
.grid-bg {
  /* Removed square grid lines as requested */
}

/* ── Shimmer & Glow Text ─────────────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #00C8FF, #FFB92E, #00C8FF);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* ── Banner Glow Animation ──────────────────────────────────────────────── */
@keyframes borderGlow {

  0%,
  100% {
    border-color: #00C8FF;
    box-shadow: 0 0 30px rgba(0, 200, 255, 0.2);
  }

  50% {
    border-color: #FFB92E;
    box-shadow: 0 0 40px rgba(255, 185, 46, 0.25);
  }
}

.community-glow {
  animation: borderGlow 3s ease-in-out infinite;
}

/* ── Mobile Navigation Drawer ───────────────────────────────────────────── */
.mobile-menu {
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(.4, 0, .2, 1);
}

.mobile-menu.open {
  transform: translateX(0);
}

/* ── Toast Notifications ────────────────────────────────────────────────── */
.toast-item {
  background: rgba(15, 43, 53, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(0, 200, 255, 0.25);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 200, 255, 0.1);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-item.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-item.hide {
  transform: scale(0.9) translateY(-10px);
  opacity: 0;
}

/* ── Interactive Quiz Styles ────────────────────────────────────────────── */
.quiz-option {
  background: rgba(30, 77, 94, 0.3);
  border: 1px solid rgba(0, 200, 255, 0.15);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-option:hover:not(.disabled) {
  background: rgba(30, 77, 94, 0.6);
  border-color: rgba(0, 200, 255, 0.5);
  transform: translateX(5px);
  box-shadow: 0 0 15px rgba(0, 200, 255, 0.15);
}

.quiz-option.correct {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgb(16, 185, 129) !important;
  color: rgb(52, 211, 153) !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.quiz-option.incorrect {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgb(239, 68, 68) !important;
  color: rgb(248, 113, 113) !important;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.quiz-option.disabled {
  cursor: not-allowed;
}

/* ── Modal Animation ────────────────────────────────────────────────────── */
#subscribe-modal {
  transition: opacity 0.3s ease;
}

#subscribe-modal.hidden {
  display: none !important;
  opacity: 0;
}

#subscribe-modal:not(.hidden) {
  opacity: 1;
}

/* ── Article Card Filtering Transitions ──────────────────────────────────── */
.card-filter-item {
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

.card-filter-item.hidden {
  opacity: 0;
  transform: scale(0.9);
  position: absolute;
  pointer-events: none;
  visibility: hidden;
}

/* ── Footer Accordion ───────────────────────────────────────────────────── */
.footer-acc-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.footer-accordion.open .footer-acc-content {
  max-height: 600px;
}

.footer-accordion.open .footer-acc-icon {
  transform: rotate(180deg);
}

/* ── Chatbot Typing Animation ─────────────────────────────────────────────── */
.typing-dots span {
  display: inline-block;
  width: 5px;
  height: 5px;
  background-color: #00C8FF;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite both;
  margin-right: 3px;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }
.typing-dots span:nth-child(3) { animation-delay: 0s; margin-right: 0; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── Chatbot Markdown Styles ────────────────────────────────────────────── */
.chatbot-msg-content strong {
  color: #00C8FF;
  font-weight: 600;
}

.chatbot-msg-content em {
  color: #FFB92E;
  font-style: italic;
}

.chatbot-msg-content ul {
  list-style-type: disc;
  margin-left: 1.25rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  color: #E8DFD0;
}

.chatbot-msg-content li {
  margin-bottom: 0.25rem;
}

.chatbot-msg-content hr {
  border: 0;
  border-top: 1px solid rgba(0, 200, 255, 0.15);
  margin: 0.75rem 0;
}

/* Custom Scrollbar for Chat Messages */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(0, 200, 255, 0.2);
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 200, 255, 0.4);
}