/* ── CRYPTON1TE GLOSSAIRE CRYPTO APP STYLES ────────────────────────── */

:root {
  --cq-cyan: #00e5ff;
  --cq-cyan-glow: rgba(0, 229, 255, 0.25);
  --cq-blue: #4364f7;
  --cq-gold: #ffd700;
  --cq-purple: #9966ff;
  --cq-green: #00e676;
  --cq-pink: #ff0055;

  --cq-bg-dark: #020612;
  --cq-bg-card: rgba(8, 18, 36, 0.75);
  --cq-bg-card-hover: rgba(13, 27, 48, 0.9);
  --cq-bg-modal: #050d1a;
  --cq-border: rgba(0, 229, 255, 0.12);
  --cq-border-hover: rgba(0, 229, 255, 0.35);

  --cq-text: #ffffff;
  --cq-text-muted: #a0aec0;
  --cq-text-dim: #64748b;
}

/* Glossary App Wrapper inside Modal or Page */
.cq-glossary-app {
  font-family: 'Poppins', 'Inter', sans-serif;
  color: var(--cq-text);
  width: 100%;
}

/* App Header & Navigation Tabs */
.cq-glossary-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--cq-border);
}

@media (min-width: 768px) {
  .cq-glossary-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cq-glossary-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cq-glossary-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--cq-border);
  color: var(--cq-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cq-glossary-tab:hover {
  color: var(--cq-text);
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.25);
}

.cq-glossary-tab.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.15) 0%, rgba(67, 100, 247, 0.2) 100%);
  border-color: var(--cq-cyan);
  color: var(--cq-cyan);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

/* Term of the Day Card */
.cq-totd-card {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.06) 0%, rgba(67, 100, 247, 0.1) 100%);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.1);
}

@media (min-width: 768px) {
  .cq-totd-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cq-totd-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cq-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cq-totd-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
}

.cq-totd-desc {
  font-size: 0.875rem;
  color: var(--cq-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0.2rem;
}

/* Search Bar & Filters */
.cq-controls-box {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cq-search-container {
  position: relative;
  width: 100%;
}

.cq-search-input {
  width: 100%;
  padding: 0.9rem 1.25rem 0.9rem 3.2rem;
  border-radius: 12px;
  background: rgba(4, 12, 24, 0.85);
  border: 1px solid var(--cq-border);
  color: var(--cq-text);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.cq-search-input:focus {
  border-color: var(--cq-cyan);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
  background: rgba(4, 12, 24, 0.95);
}

.cq-search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cq-text-muted);
  pointer-events: none;
}

.cq-clear-icon {
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cq-text-muted);
  cursor: pointer;
}

.cq-clear-icon:hover {
  color: #ffffff;
}

/* Alphabetical A-Z Bar */
.cq-az-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  background: rgba(4, 12, 24, 0.6);
  padding: 0.5rem;
  border-radius: 12px;
  border: 1px solid var(--cq-border);
}

.cq-az-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 0.35rem;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--cq-text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cq-az-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.cq-az-btn.active {
  background: var(--cq-cyan);
  color: #040a14;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.cq-az-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Category Filter Pills */
.cq-cat-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
}

.cq-cat-pill {
  white-space: nowrap;
  padding: 0.45rem 0.85rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--cq-border);
  color: var(--cq-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cq-cat-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.cq-cat-pill.active {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--cq-cyan);
  color: var(--cq-cyan);
}

/* Results Stats Bar */
.cq-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--cq-text-muted);
}

/* Term Cards Grid */
.cq-terms-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.15rem;
}

@media (min-width: 640px) {
  .cq-terms-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cq-terms-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Term Card Item */
.cq-term-card {
  background: var(--cq-bg-card);
  border: 1px solid var(--cq-border);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  transition: all 0.25s ease;
  position: relative;
}

.cq-term-card:hover {
  background: var(--cq-bg-card-hover);
  border-color: var(--cq-border-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 229, 255, 0.12);
}

.cq-term-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.cq-term-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.35;
}

.cq-fav-btn {
  background: none;
  border: none;
  color: var(--cq-text-dim);
  cursor: pointer;
  padding: 0.2rem;
  transition: all 0.2s ease;
}

.cq-fav-btn:hover, .cq-fav-btn.active {
  color: var(--cq-gold);
  transform: scale(1.15);
}

.cq-term-desc {
  font-size: 0.875rem;
  color: var(--cq-text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.cq-term-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cq-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  background: rgba(0, 229, 255, 0.1);
  color: var(--cq-cyan);
  border: 1px solid rgba(0, 229, 255, 0.25);
}

.cq-btn-details {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cq-cyan);
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap 0.2s ease;
}

.cq-term-card:hover .cq-btn-details {
  gap: 0.45rem;
}

/* Detail Pop-up Modal HTML styling */
.cq-modal-body-html {
  font-size: 1rem;
  line-height: 1.7;
  color: #cbd5e1;
}

.cq-modal-body-html h2, .cq-modal-body-html h3 {
  color: var(--cq-cyan);
  font-size: 1.3rem;
  font-weight: 800;
  margin-top: 1.25rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
  padding-bottom: 0.3rem;
}

.cq-modal-body-html p {
  margin-bottom: 0.9rem;
}

.cq-modal-body-html a {
  color: var(--cq-cyan);
  text-decoration: underline;
}

/* Flashcards View */
.cq-fc-wrapper {
  max-width: 600px;
  margin: 1.5rem auto;
  text-align: center;
}

.cq-fc-card {
  width: 100%;
  height: 320px;
  perspective: 1000px;
  cursor: pointer;
}

.cq-fc-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.cq-fc-card.flipped .cq-fc-inner {
  transform: rotateY(180deg);
}

.cq-fc-front, .cq-fc-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 18px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 229, 255, 0.15);
}

.cq-fc-front {
  background: linear-gradient(135deg, #091527 0%, #040a14 100%);
}

.cq-fc-back {
  background: linear-gradient(135deg, #040d1a 0%, #0d1e38 100%);
  transform: rotateY(180deg);
  overflow-y: auto;
}

/* Quiz View */
.cq-quiz-wrapper {
  max-width: 680px;
  margin: 1.5rem auto;
  background: var(--cq-bg-card);
  border: 1px solid var(--cq-border);
  border-radius: 18px;
  padding: 2rem;
}
