/*
 * glyph.sh Theme Styles
 * Consolidated theme CSS for cleaner organization
 */

/* ============================================
   TYPOGRAPHY
   ============================================ */

body {
  font-family: 'Raleway', sans-serif;
}

/* ============================================
   BOOTSTRAP THEME OVERRIDES
   ============================================ */

:root, [data-bs-theme=light] {
  --bs-primary: #00171f;
  --bs-primary-rgb: 0,23,31;
  --bs-secondary: #001016;
  --bs-secondary-rgb: 0,16,22;
  --bs-success: #4CB944;
  --bs-success-rgb: 76,185,68;
  --bs-info: #FFFFFF;
  --bs-info-rgb: 255,255,255;
  --bs-warning: #AFFC41;
  --bs-warning-rgb: 175,252,65;
  --bs-danger: #68E1FD;
  --bs-danger-rgb: 104,225,253;
  --bs-light: #23CE6B;
  --bs-light-rgb: 35,206,107;
  --bs-dark: #23CE6B;
  --bs-dark-rgb: 35,206,107;
  --bs-body-color: #FFFFFF;
  --bs-body-color-rgb: 255,255,255;
  --bs-body-bg: #00171f;
  --bs-body-bg-rgb: 0,23,31;
  --bs-link-color: #23CE6B;
  --bs-link-color-rgb: 35,206,107;
  --bs-link-hover-color: #2fe684;
  --bs-link-hover-color-rgb: 47,230,132;
}

/* ============================================
   LAYOUT
   ============================================ */

body {
  padding-top: 80px;
}

.vh-50 {
  height: 50vh;
}

.vh-75 {
  height: 75vh;
}

/* ============================================
   BORDERS
   ============================================ */

.border-light {
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.border {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.card.border {
  border-color: rgba(35, 206, 107, 0.3) !important;
}

.navbar.border-bottom {
  border-bottom-color: rgba(35, 206, 107, 0.5) !important;
}

footer.border-top {
  border-top-color: rgba(35, 206, 107, 0.5) !important;
}

/* ============================================
   LINKS
   ============================================ */

a {
  color: #23CE6B;
  text-decoration: none;
}

a:hover {
  color: #2fe684;
  text-decoration: underline;
}

.link-secondary:hover,
.link-secondary:focus {
  color: RGBA(230, 230, 230, var(--bs-link-opacity, 1)) !important;
  -webkit-text-decoration-color: RGBA(255, 219, 51, var(--bs-link-underline-opacity, 1)) !important;
  text-decoration-color: RGBA(255, 219, 51, var(--bs-link-underline-opacity, 1)) !important;
}

/* ============================================
   NAVIGATION
   ============================================ */

#mainNav .navbar-nav > li.nav-item > a.nav-link.active {
  font-weight: 700 !important;
  text-decoration: underline;
}

/* Dropdown Menu Styling */
.dropdown-menu {
  background-color: #001016 !important;
  border: 1px solid rgba(35, 206, 107, 0.3) !important;
  border-radius: 0.5rem;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}

.dropdown-item {
  color: #ffffff !important;
  padding: 0.5rem 1.5rem;
  transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: rgba(35, 206, 107, 0.1) !important;
  color: #23CE6B !important;
}

.dropdown-item i {
  color: #23CE6B;
  width: 1.25rem;
  transition: all 0.2s ease;
}

.dropdown-item:hover i {
  transform: translateX(3px);
}

.dropdown-divider {
  border-color: rgba(35, 206, 107, 0.2) !important;
  margin: 0.5rem 0;
}

/* ============================================
   BACKGROUNDS
   ============================================ */

.bg-secondary {
  background-color: #001016 !important;
}

.bg-primary {
  background-color: #00171f !important;
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background-color: #001016;
}

/* ============================================
   TEXT
   ============================================ */

.text-info {
  color: #ffffff !important;
}

.underline:after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: #4CB944;
  z-index: -1;
}

/* ============================================
   CONTENT SPACING
   ============================================ */

.content h2 {
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(35, 206, 107, 0.3);
  color: #23CE6B;
}

.content h3 {
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  color: rgba(255, 255, 255, 0.95);
}

.content h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.content h2:first-child,
.content h3:first-child,
.content h4:first-child {
  margin-top: 0;
}

.content ul,
.content ol {
  margin-bottom: 2rem;
  line-height: 1.8;
}

.content ul li,
.content ol li {
  margin-bottom: 0.5rem;
}

.content p {
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

/* ============================================
   TABLES
   ============================================ */

table {
  color: #ffffff;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(35, 206, 107, 0.05);
  --bs-table-hover-bg: rgba(35, 206, 107, 0.1);
  --bs-table-border-color: rgba(35, 206, 107, 0.2);
  color: #ffffff;
}

.table-dark {
  --bs-table-bg: #001016;
  --bs-table-striped-bg: rgba(35, 206, 107, 0.05);
  --bs-table-hover-bg: rgba(35, 206, 107, 0.1);
  --bs-table-border-color: rgba(35, 206, 107, 0.2);
  color: #ffffff;
  border-color: rgba(35, 206, 107, 0.2);
}

.table > :not(caption) > * > * {
  border-bottom-color: rgba(35, 206, 107, 0.2);
}

.table thead th {
  color: #23CE6B;
  font-weight: 600;
  border-bottom: 2px solid rgba(35, 206, 107, 0.3);
}

.table tbody tr {
  border-bottom: 1px solid rgba(35, 206, 107, 0.15);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-accent-bg: rgba(35, 206, 107, 0.05);
}

.table-hover > tbody > tr:hover > * {
  --bs-table-accent-bg: rgba(35, 206, 107, 0.1);
}

/* ============================================
   FORMS & INPUTS
   ============================================ */

.form-control {
  background-color: #00171f;
  border-color: rgba(35, 206, 107, 0.3);
  color: #ffffff;
}

.form-control:focus {
  background-color: #00171f;
  border-color: #23CE6B;
  color: #ffffff;
  box-shadow: 0 0 0 0.25rem rgba(35, 206, 107, 0.25);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-control:disabled,
.form-control[readonly] {
  background-color: #001016;
  border-color: rgba(35, 206, 107, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

textarea.form-control {
  background-color: #00171f;
  color: #ffffff;
}

.form-select {
  background-color: #00171f !important;
  border-color: rgba(35, 206, 107, 0.3);
  color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2323CE6B' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.form-select:focus {
  background-color: #00171f !important;
  border-color: #23CE6B;
  color: #ffffff !important;
  box-shadow: 0 0 0 0.25rem rgba(35, 206, 107, 0.25);
}

.form-select option {
  background-color: #00171f;
  color: #ffffff;
}

/* Dark variants for select */
.bg-dark.form-select,
.form-select.bg-dark {
  background-color: #00171f !important;
  color: #ffffff !important;
}

/* Dark variants */
.bg-dark.form-control,
.form-control.bg-dark {
  background-color: #00171f !important;
  border-color: rgba(35, 206, 107, 0.3) !important;
  color: #ffffff !important;
}

.bg-dark.form-control:focus,
.form-control.bg-dark:focus {
  background-color: #00171f !important;
  border-color: #23CE6B !important;
  box-shadow: 0 0 0 0.25rem rgba(35, 206, 107, 0.25);
}

/* Force white text on dark inputs */
.form-control.text-light,
input.form-control.text-light,
input.text-light {
  color: #ffffff !important;
}

/* Input groups */
.input-group-text {
  background-color: #001016;
  border-color: rgba(35, 206, 107, 0.3);
  color: #23CE6B;
}

/* ============================================
   CODE BLOCKS
   ============================================ */

/* Inline code */
code {
  background-color: #001016;
  color: #ffffff;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

/* Code blocks */
pre {
  background-color: #001016;
  color: #ffffff;
  padding: 1em;
  border-radius: 5px;
  border: 1px solid rgba(35, 206, 107, 0.3);
  overflow-x: auto;
}

pre.bg-dark {
  background-color: #001016 !important;
  color: #ffffff !important;
}

pre code {
  background-color: transparent;
  color: #ffffff !important;
  padding: 0;
}

code.text-light {
  color: #ffffff !important;
}

/* Syntax highlighting overrides */
.highlight pre {
  background-color: #001016;
  color: #ffffff;
}

.highlight code {
  color: #ffffff;
}

/* ============================================
   HOMEPAGE HERO SECTION
   ============================================ */

.hero-container {
  max-width: 500px;
}

.hero-title {
  font-size: 2.5rem;
  line-height: 1.2;
}

.hero-icon-container {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-icon {
  font-size: 8rem;
  color: #23CE6B;
}

.feature-icon {
  color: #23CE6B;
}

.post-thumbnail {
  max-height: 150px;
  width: 100%;
  object-fit: cover;
}
/* ============================================
   CODE COPY BUTTON
   ============================================ */

.highlight {
  position: relative;
}

.copy-code-btn {
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 0.85rem;
  z-index: 10;
}

.highlight:hover .copy-code-btn {
  opacity: 1;
}

.copy-code-btn:focus {
  opacity: 1;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Skip to content link */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #23CE6B;
  color: #00171f;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.3s;
}

.skip-to-content:focus {
  top: 1rem;
  text-decoration: none;
  outline: 3px solid #AFFC41;
  outline-offset: 2px;
}

/* ============================================
   BREADCRUMBS
   ============================================ */

.breadcrumb {
  background-color: transparent;
  font-size: 0.875rem;
  padding: 0;
}

.breadcrumb-item {
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-item a {
  color: #23CE6B;
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: #2fe684;
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.9);
}

.breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.5);
  content: "›";
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Hidden by default, shown by JavaScript */
.hidden-by-default {
  display: none;
}

/* Code block copy button z-index */
.code-copy-btn {
  z-index: 10;
}

/* List page thumbnail image */
.list-thumbnail {
  max-height: 150px;
  width: 100%;
  object-fit: cover;
}

/* ============================================
   SCANLINE OVERLAY (403 PAGE)
   ============================================ */

.scanline-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: calc(100vh + 6px);
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 4px,
    rgba(220, 38, 38, 0.25) 4px,
    rgba(220, 38, 38, 0.25) 6px
  );
  animation: scanline-scroll 3s linear infinite;
}

@keyframes scanline-scroll {
  from {
    transform: translateY(0px);
  }
  to {
    transform: translateY(6px);
  }
}

/* ============================================
   SECURITY WARNING BANNER (403 PAGE)
   ============================================ */

.security-warning-banner {
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid #dc2626;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  box-shadow:
    0 0 20px rgba(220, 38, 38, 0.4),
    inset 0 0 20px rgba(220, 38, 38, 0.1);
  animation: banner-pulse 2s ease-in-out infinite;
}

.warning-seal {
  font-size: 48px;
  color: #eab308;
  animation: seal-rotate 1s linear infinite;
}

.warning-text {
  text-align: center;
}

.warning-agency {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: bold;
  color: #dc2626;
  letter-spacing: 3px;
  margin-bottom: 5px;
}

.warning-message {
  font-family: 'Courier New', monospace;
  font-size: 20px;
  font-weight: bold;
  color: #ef4444;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
}

.warning-details {
  margin-top: 10px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: #9ca3af;
  letter-spacing: 1px;
}

.warning-detail-item {
  margin: 2px 0;
}

@keyframes banner-pulse {
  0%, 100% {
    box-shadow:
      0 0 20px rgba(220, 38, 38, 0.4),
      inset 0 0 20px rgba(220, 38, 38, 0.1);
  }
  50% {
    box-shadow:
      0 0 30px rgba(220, 38, 38, 0.6),
      inset 0 0 30px rgba(220, 38, 38, 0.2);
  }
}

@keyframes seal-rotate {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(5deg);
  }
}

/* ============================================
   PRO TIP BOX (403 PAGE)
   ============================================ */

.pro-tip-403 {
  background-color: #1a1a1a !important;
}

/* ============================================
   GLITCH 403 NUMBER (403 PAGE)
   ============================================ */

.glitch-403 {
  position: relative;
  animation: glitch-shake 3s infinite;
}

.glitch-403::before,
.glitch-403::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}

.glitch-403::before {
  animation: glitch-anim-1 2s infinite linear alternate-reverse;
  color: #ff6b6b;
  z-index: -1;
}

.glitch-403::after {
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
  color: #ff0000;
  z-index: -2;
}

@keyframes glitch-shake {
  0%, 90%, 100% {
    transform: translate(0);
  }
  91% {
    transform: translate(-2px, 2px);
  }
  92% {
    transform: translate(2px, -2px);
  }
  93% {
    transform: translate(-2px, -2px);
  }
  94% {
    transform: translate(2px, 2px);
  }
  95% {
    transform: translate(0);
  }
}

@keyframes glitch-anim-1 {
  0% {
    clip-path: inset(40% 0 61% 0);
    transform: translate(0);
  }
  20% {
    clip-path: inset(92% 0 1% 0);
    transform: translate(-3px, 3px);
  }
  40% {
    clip-path: inset(43% 0 1% 0);
    transform: translate(-3px, 3px);
  }
  60% {
    clip-path: inset(25% 0 58% 0);
    transform: translate(3px, -3px);
  }
  80% {
    clip-path: inset(54% 0 7% 0);
    transform: translate(-3px, 3px);
  }
  100% {
    clip-path: inset(58% 0 43% 0);
    transform: translate(0);
  }
}

@keyframes glitch-anim-2 {
  0% {
    clip-path: inset(65% 0 15% 0);
    transform: translate(0);
  }
  20% {
    clip-path: inset(40% 0 43% 0);
    transform: translate(3px, -3px);
  }
  40% {
    clip-path: inset(20% 0 20% 0);
    transform: translate(3px, -3px);
  }
  60% {
    clip-path: inset(56% 0 23% 0);
    transform: translate(-3px, 3px);
  }
  80% {
    clip-path: inset(88% 0 13% 0);
    transform: translate(3px, -3px);
  }
  100% {
    clip-path: inset(23% 0 67% 0);
    transform: translate(0);
  }
}
