/* ThunderHost Premium Theme */
:root {
  --bg-primary: #050505; /* Głęboka czerń */
  --bg-secondary: rgba(10, 10, 10, 0.6); /* Transparentne tło dla glassmorphismu */
  --text-primary: #ffffff; /* Biały tekst */
  --text-secondary: #a1a1aa; /* Szary tekst */
  --highlight: #00f0ff; /* Elektryzujący Thunder Cyan */
  --highlight-glow: rgba(0, 240, 255, 0.4);
  --accent: #8b5cf6; /* Fioletowy akcent */
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  /* Lepsze wygładzanie czcionek */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 4px;
  border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--highlight);
  box-shadow: 0 0 10px var(--highlight-glow);
}

/* Sidebar item */
.sidebar-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  cursor: pointer;
  border-radius: 0.75rem;
  margin: 0.35rem 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.sidebar-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  transform: translateX(6px);
  border-color: rgba(255, 255, 255, 0.05);
}

.sidebar-item.active {
  color: var(--highlight);
  font-weight: 600;
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.1) 0%, rgba(0, 240, 255, 0.02) 100%);
  border-left: 3px solid var(--highlight);
  border-radius: 0.5rem;
  box-shadow: -5px 0 20px -5px var(--highlight-glow);
}

/* TOC */
.toc-link {
  padding: 0.4rem 0;
  display: block;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  border-left: 2px solid rgba(255, 255, 255, 0.05);
  padding-left: 1rem;
  margin-left: -1rem;
  font-size: 0.875rem;
  position: relative;
}

.toc-link:hover {
  color: var(--text-primary);
  border-left-color: rgba(255, 255, 255, 0.3);
  padding-left: 1.25rem;
}

.toc-link.active {
  color: var(--highlight);
  border-left-color: var(--highlight);
  font-weight: 600;
  text-shadow: 0 0 15px var(--highlight-glow);
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.05) 0%, transparent 100%);
}

/* Animowane tło i blury (Glassmorphism) */
.glass-header {
  background: rgba(5, 5, 5, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.glass-sidebar {
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-toc {
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

/* Chevron animacja */
.chevron {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.rotate-180 {
  transform: rotate(180deg) !important;
}
.rotate-0 {
  transform: rotate(0deg) !important;
}

/* Grid Layout */
.grid-container {
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .grid-container {
    grid-template-columns: 288px 1fr 288px;
  }
}

/* Logo blendowanie (jeśli ma czarne tło, to się stopi z headerem) */
.logo-blend {
  mix-blend-mode: screen;
}

/* Markdown Content Styling */
#document-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, var(--highlight) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}
#document-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
#document-content h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}
#document-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}
#document-content ul {
  color: var(--text-secondary);
  list-style-type: none;
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}
#document-content li {
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.6;
}
#document-content li::before {
  content: "•";
  color: var(--highlight);
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.25rem;
  line-height: 1.4;
  text-shadow: 0 0 8px var(--highlight-glow);
}
#document-content a {
  color: var(--highlight);
  text-decoration: none;
  transition: all 0.2s;
  border-bottom: 1px solid transparent;
}
#document-content a:hover {
  text-shadow: 0 0 15px var(--highlight-glow);
  border-bottom-color: var(--highlight);
}

/* Custom premium alerts */
.alert-premium {
  background: rgba(255, 170, 0, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 170, 0, 0.2);
  border-left: 4px solid #ffaa00;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 20px rgba(255, 170, 0, 0.05);
}
.alert-premium strong {
  color: #ffaa00;
}

/* Animations */
@keyframes blob {
  0% { transform: translate(0px, 0px) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0px, 0px) scale(1); }
}

.animate-blob {
  animation: blob 15s infinite alternate;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

/* Page Transition Animation */
.page-transition {
  animation: fadeSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo Hover Glow */
.logo-glow-hover {
  transition: filter 0.3s ease;
}
.logo-glow-hover:hover {
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.5));
}

/* --- QUILL EDITOR STYLES FOR MAIN CONTENT --- */
.ql-align-center { text-align: center; }
.ql-align-right { text-align: right; }
.ql-align-justify { text-align: justify; }

/* Media (Obrazki/Wideo) */
#document-content img, #document-content iframe {
  max-width: 100%;
  border-radius: 0.75rem;
  margin: 1.5rem auto;
  display: block;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Custom Frame (Blockquote - Cytat z Quill) styled as Premium Box */
#document-content blockquote {
  background: rgba(0, 240, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 240, 255, 0.1);
  border-left: 4px solid var(--highlight);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.05);
  font-style: italic;
  position: relative;
}
#document-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Custom Code Blocks (pre) styled as Terminal */
#document-content pre.ql-syntax, #document-content pre {
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 30px solid #18181b; /* Fake terminal header */
  border-radius: 0.75rem;
  padding: 1rem;
  margin: 2rem 0;
  overflow-x: auto;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9rem;
  color: #e4e4e7;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0, 0, 0, 0.5);
  position: relative;
}
#document-content pre::before {
  content: "• • •";
  position: absolute;
  top: -24px;
  left: 12px;
  color: #52525b;
  font-size: 1.5rem;
  letter-spacing: 2px;
  line-height: 1;
}
