/* ================================================
   CYBERPUNK TERMINAL THEME - Retro-Futuristic Blog
   Version: 2.0
   ================================================ */

/* ========================================
   CSS VARIABLES - Cyberpunk Color Palette
   ======================================== */
:root {
  /* Primary Cyberpunk Colors */
  --cyber-cyan: #00ffff;
  --cyber-pink: #ff00ff;
  --cyber-green: #00ff00;
  --cyber-yellow: #ffff00;
  --cyber-orange: #ff6600;
  
  /* Background Colors */
  --cyber-bg: #0a0a0a;
  --cyber-bg-card: #1a1a1a;
  --cyber-bg-console: #0d1117;
  --cyber-bg-hover: #252525;
  
  /* Neon Glow Colors */
  --cyber-neon-cyan: #00ffff;
  --cyber-neon-pink: #ff00ff;
  --cyber-neon-green: #00ff00;
  
  /* Text Colors */
  --cyber-text-primary: #e0e0e0;
  --cyber-text-secondary: #a0a0a0;
  --cyber-text-muted: #666666;
  
  /* Border & Effects */
  --cyber-border: 2px;
  --cyber-border-radius: 8px;
  --cyber-glow-size: 15px;
  
  /* Transitions */
  --cyber-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   GLOBAL STYLES & BODY
   ======================================== */
body {
  background-color: var(--cyber-bg);
  color: var(--cyber-text-primary);
  font-family: 'Courier New', Courier, monospace;
  position: relative;
  overflow-x: hidden;
}

/* Scanline Effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 255, 255, 0.03) 0px,
    transparent 2px,
    transparent 4px
  );
  pointer-events: none;
  z-index: 9999;
  animation: scanline 8s linear infinite;
}

@keyframes scanline {
  0% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* Grid Background */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.3;
}

/* ========================================
   NAVIGATION BAR - Cyberpunk Style
   ======================================== */
.navbar-cyber {
  background: rgba(13, 17, 23, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--cyber-cyan);
  box-shadow: 0 0 var(--cyber-glow-size) rgba(0, 255, 255, 0.3);
  padding: 1rem 0;
  z-index: 1000 !important; /* Below CKEditor toolbar */
}

.navbar-brand-cyber {
  color: var(--cyber-cyan) !important;
  font-size: 1.5rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
  transition: var(--cyber-transition);
}

.navbar-brand-cyber:hover {
  color: var(--cyber-pink) !important;
  text-shadow: 0 0 15px rgba(255, 0, 255, 0.8);
}

.nav-link-cyber {
  color: var(--cyber-text-primary) !important;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  transition: var(--cyber-transition);
}

.nav-link-cyber::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--cyber-cyan);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.nav-link-cyber:hover {
  color: var(--cyber-cyan) !important;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
}

.nav-link-cyber:hover::after {
  width: 80%;
}

/* ========================================
   HERO SECTION - Matrix Rain Background
   ======================================== */
.hero-cyber {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
  border-bottom: 3px solid var(--cyber-cyan);
  overflow: hidden;
  margin-top: 70px;
}

.hero-cyber-sm {
  min-height: 350px;
}

#matrix-rain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--cyber-cyan);
  text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--cyber-text-secondary);
}

@media (max-width: 768px) {
  .hero-cyber {
    min-height: 350px;
    margin-top: 60px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
}

/* ========================================
   CARDS - Cyberpunk Style
   ======================================== */
.card-cyber {
  background: var(--cyber-bg-card);
  border: 2px solid var(--cyber-cyan);
  border-radius: var(--cyber-border-radius);
  padding: 1.5rem;
  transition: var(--cyber-transition);
  position: relative;
  overflow: hidden;
}

.card-cyber::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.card-cyber:hover {
  border-color: var(--cyber-pink);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
  transform: translateY(-5px);
}

.card-cyber:hover::before {
  left: 100%;
}

.card-cyber-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.card-cyber-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.card-cyber-subtitle {
  color: var(--cyber-text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.card-cyber-body {
  color: var(--cyber-text-primary);
  line-height: 1.6;
}

.card-cyber-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 255, 255, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ========================================
   BUTTONS - Cyberpunk Style
   ======================================== */
.btn-cyber {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: transparent;
  color: var(--cyber-cyan);
  border: 2px solid var(--cyber-cyan);
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 1px;
  text-decoration: none;
  transition: var(--cyber-transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-cyber::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(0, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.btn-cyber:hover {
  color: var(--cyber-bg);
  background: var(--cyber-cyan);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
  transform: translateY(-2px);
}

.btn-cyber:hover::before {
  width: 300px;
  height: 300px;
}

.btn-cyber-sm {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
}

.btn-cyber-lg {
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
}

.btn-cyber-outline {
  border-color: var(--cyber-pink);
  color: var(--cyber-pink);
}

.btn-cyber-outline:hover {
  background: var(--cyber-pink);
  color: var(--cyber-bg);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.8);
}

.btn-cyber-danger {
  border-color: #ff0000;
  color: #ff0000;
}

.btn-cyber-danger:hover {
  background: #ff0000;
  color: var(--cyber-bg);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
}

.btn-cyber-active {
  background: var(--cyber-cyan);
  color: var(--cyber-bg);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

/* ========================================
   TERMINAL TEXT STYLING
   ======================================== */
.terminal-text {
  font-family: 'Courier New', Courier, monospace;
  color: var(--cyber-text-primary);
  line-height: 1.6;
}

.text-cyber-cyan {
  color: var(--cyber-cyan);
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.text-cyber-pink {
  color: var(--cyber-pink);
  text-shadow: 0 0 5px rgba(255, 0, 255, 0.5);
}

.text-cyber-green {
  color: var(--cyber-green);
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.text-cyber-yellow {
  color: var(--cyber-yellow);
  text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
}

.cyber-bracket {
  color: var(--cyber-cyan);
  font-weight: bold;
}

/* ========================================
   GLITCH TEXT EFFECT
   ======================================== */
.cyber-glitch-text {
  position: relative;
  font-weight: bold;
  animation: glitch-skew 1s infinite;
}

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

.cyber-glitch-text::before {
  left: 2px;
  text-shadow: -2px 0 var(--cyber-pink);
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim 5s infinite linear alternate-reverse;
}

.cyber-glitch-text::after {
  left: -2px;
  text-shadow: -2px 0 var(--cyber-cyan);
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip: rect(31px, 9999px, 94px, 0); }
  5% { clip: rect(70px, 9999px, 71px, 0); }
  10% { clip: rect(31px, 9999px, 94px, 0); }
  15% { clip: rect(50px, 9999px, 20px, 0); }
  20% { clip: rect(80px, 9999px, 40px, 0); }
  100% { clip: rect(31px, 9999px, 94px, 0); }
}

@keyframes glitch-anim2 {
  0% { clip: rect(65px, 9999px, 119px, 0); }
  5% { clip: rect(30px, 9999px, 80px, 0); }
  10% { clip: rect(90px, 9999px, 10px, 0); }
  15% { clip: rect(65px, 9999px, 119px, 0); }
  20% { clip: rect(20px, 9999px, 60px, 0); }
  100% { clip: rect(65px, 9999px, 119px, 0); }
}

@keyframes glitch-skew {
  0% { transform: skew(0deg); }
  10% { transform: skew(2deg); }
  20% { transform: skew(0deg); }
  30% { transform: skew(-2deg); }
  40% { transform: skew(0deg); }
  100% { transform: skew(0deg); }
}

.glitch-on-hover:hover {
  animation: glitch-skew 1s infinite;
}

/* ========================================
   NEON GLOW TEXT
   ======================================== */
.cyber-text-glow {
  color: var(--cyber-cyan);
  text-shadow: 
    0 0 10px rgba(0, 255, 255, 0.8),
    0 0 20px rgba(0, 255, 255, 0.6),
    0 0 30px rgba(0, 255, 255, 0.4);
  animation: neon-glow 2s ease-in-out infinite alternate;
}

@keyframes neon-glow {
  from {
    text-shadow: 
      0 0 10px rgba(0, 255, 255, 0.8),
      0 0 20px rgba(0, 255, 255, 0.6),
      0 0 30px rgba(0, 255, 255, 0.4);
  }
  to {
    text-shadow: 
      0 0 15px rgba(0, 255, 255, 1),
      0 0 30px rgba(0, 255, 255, 0.8),
      0 0 45px rgba(0, 255, 255, 0.6);
  }
}

/* ========================================
   FORMS - Cyberpunk Style
   ======================================== */
.form-cyber {
  width: 100%;
}

.form-group-cyber {
  margin-bottom: 1.5rem;
}

.form-control-cyber {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--cyber-bg-console);
  border: 2px solid var(--cyber-cyan);
  border-radius: 4px;
  color: var(--cyber-text-primary);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  transition: var(--cyber-transition);
}

.form-control-cyber:focus {
  outline: none;
  border-color: var(--cyber-pink);
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
  background: rgba(13, 17, 23, 0.95);
}

.form-control-cyber::placeholder {
  color: var(--cyber-text-muted);
  opacity: 0.7;
}


textarea.form-control-cyber {
  resize: vertical;
  min-height: 150px;
}

select.form-control-cyber {
  cursor: pointer;
}

/* ========================================
   LINKS - Cyberpunk Style
   ======================================== */
.cyber-link {
  color: var(--cyber-cyan);
  text-decoration: none;
  position: relative;
  transition: var(--cyber-transition);
}

.cyber-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cyber-cyan);
  transition: width 0.3s ease;
}

.cyber-link:hover {
  color: var(--cyber-pink);
  text-shadow: 0 0 8px rgba(255, 0, 255, 0.6);
}

.cyber-link:hover::after {
  width: 100%;
  background: var(--cyber-pink);
}

.cyber-link-title {
  color: var(--cyber-cyan);
  text-decoration: none;
  transition: var(--cyber-transition);
}

.cyber-link-title:hover {
  color: var(--cyber-pink);
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.7);
}

/* ========================================
   PAGINATION - Cyberpunk Style
   ======================================== */
.pagination-cyber {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.pagination-btn,
.pagination-page {
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--cyber-cyan);
  border: 2px solid var(--cyber-cyan);
  border-radius: 4px;
  text-decoration: none;
  transition: var(--cyber-transition);
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
}

.pagination-btn:hover,
.pagination-page:hover {
  background: var(--cyber-cyan);
  color: var(--cyber-bg);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
  transform: translateY(-2px);
}

.pagination-page.active {
  background: var(--cyber-pink);
  border-color: var(--cyber-pink);
  color: var(--cyber-bg);
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.6);
}

.pagination-pages {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.pagination-ellipsis {
  color: var(--cyber-text-secondary);
  padding: 0 0.5rem;
}

/* ========================================
   BADGES - Cyberpunk Style
   ======================================== */
.badge {
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
}

.bg-cyber-pink {
  background-color: var(--cyber-pink) !important;
  color: var(--cyber-bg) !important;
  box-shadow: 0 0 8px rgba(255, 0, 255, 0.5);
}

.bg-cyber-cyan {
  background-color: var(--cyber-cyan) !important;
  color: var(--cyber-bg) !important;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

/* ========================================
   ALERTS - Cyberpunk Style
   ======================================== */
.alert-cyber {
  padding: 1rem 1.5rem;
  border-radius: var(--cyber-border-radius);
  margin-bottom: 1rem;
}

.alert-cyber-success {
  background: rgba(0, 255, 0, 0.1);
  border: 2px solid var(--cyber-green);
  color: var(--cyber-green);
}

.alert-cyber-danger {
  background: rgba(255, 0, 0, 0.1);
  border: 2px solid #ff0000;
  color: #ff0000;
}

.alert-cyber-info {
  background: rgba(0, 255, 255, 0.1);
  border: 2px solid var(--cyber-cyan);
  color: var(--cyber-cyan);
}

/* ========================================
   COMMENTS - Cyberpunk Style
   ======================================== */
.comment-cyber {
  padding: 1rem;
  background: var(--cyber-bg-console);
  border-left: 3px solid var(--cyber-cyan);
  border-radius: 4px;
  margin-bottom: 1rem;
}

.cyber-avatar {
  border: 2px solid var(--cyber-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.comment-text-cyber {
  color: var(--cyber-text-primary);
  line-height: 1.6;
  margin-top: 0.5rem;
}

.comment-text-cyber p {
  margin-bottom: 0.5rem;
}

/* ========================================
   POST CONTENT STYLING
   ======================================== */
.post-content-cyber {
  color: var(--cyber-text-primary);
  line-height: 1.8;
}

.post-content-cyber h1,
.post-content-cyber h2,
.post-content-cyber h3 {
  color: var(--cyber-cyan);
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-content-cyber p {
  margin-bottom: 1rem;
}

.post-content-cyber a {
  color: var(--cyber-pink);
  text-decoration: underline;
  transition: var(--cyber-transition);
}

.post-content-cyber a:hover {
  color: var(--cyber-cyan);
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
}

.post-content-cyber code {
  background: var(--cyber-bg-console);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  color: var(--cyber-green);
  font-family: 'Courier New', Courier, monospace;
}

.post-content-cyber pre {
  background: var(--cyber-bg-console);
  padding: 1rem;
  border-left: 3px solid var(--cyber-cyan);
  border-radius: 4px;
  overflow-x: auto;
}

/* ========================================
   FOOTER - Cyberpunk Style
   ======================================== */
.footer-cyber {
  background: var(--cyber-bg-card);
  border-top: 3px solid var(--cyber-cyan);
  position: relative;
  overflow: hidden;
}

.footer-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    rgba(0, 255, 255, 0.03) 2px,
    transparent 4px
  );
  pointer-events: none;
}

.cyber-divider {
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--cyber-cyan),
    transparent
  );
}

.social-icon-cyber {
  color: var(--cyber-cyan);
  transition: var(--cyber-transition);
  display: inline-block;
}

.social-icon-cyber:hover {
  color: var(--cyber-pink);
  transform: translateY(-5px) scale(1.1);
  filter: drop-shadow(0 0 10px rgba(255, 0, 255, 0.8));
}

/* ========================================
   ADMIN ACTIONS
   ======================================== */
.admin-actions {
  display: flex;
  gap: 0.5rem;
}

/* ========================================
   TYPING EFFECT
   ======================================== */
.typing-effect {
  overflow: hidden;
  border-right: 2px solid var(--cyber-green);
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
  display: inline-block;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--cyber-green); }
}

/* ========================================
   BORDER CYBER
   ======================================== */
.border-cyber {
  border-color: rgba(0, 255, 255, 0.3) !important;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .btn-cyber-lg {
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .card-cyber {
    padding: 1rem;
  }
  
  .pagination-cyber {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .admin-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .admin-actions .btn-cyber {
    width: 100%;
  }
}


/* ========================================
   POST EDITOR - DISABLE HOVER EFFECTS & CKEDITOR PROTECTION
   ======================================== */
/* CKEditor toolbar must be above navbar and sticky */
.ck.ck-toolbar {
  z-index: 1050 !important; /* Above navbar (1000) */
  position: sticky !important;
  top: 70px !important; /* Below navbar height */
  background: var(--cyber-bg-card) !important;
  border-bottom: 2px solid var(--cyber-cyan) !important;
}

/* Ensure toolbar stays sticky in all states */
.ck-sticky-panel__content_sticky .ck-toolbar {
  position: sticky !important;
  top: 70px !important;
}

/* Make editor container have relative positioning for sticky to work */
.ck-editor {
  position: relative !important;
}

/* CKEditor elements protection */
.ck-editor,
.ck-editor *,
.ck-toolbar,
.ck-toolbar *,
.ck-editor__editable,
.ck-editor__editable * {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Keep toolbar visible in all states */
.ck-editor__editable:focus ~ .ck-toolbar,
.ck-editor__editable:not(:focus) ~ .ck-toolbar,
.ck-focused .ck-toolbar,
.ck-blurred .ck-toolbar {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Disable hover effects on post editor form */
#postForm .form-control-cyber:hover,
#postForm .form-control-cyber:focus {
  transform: none !important;
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.5) !important;
}

/* Disable hover effects on card containing editor */
.card-cyber:has(#postForm):hover {
  transform: none !important;
  border-color: var(--cyber-cyan) !important;
  box-shadow: none !important;
}

.card-cyber:has(#postForm):hover::before {
  left: -100% !important;
}

/* Prevent 3D tilt effect on editor card */
.card-cyber:has(#postForm) {
  transform: none !important;
}

/* Disable body textarea hover effects specifically */
#body:hover,
#body:focus {
  transform: none !important;
}