/* style.css for index.php */

:root {
  --bg: #121212;
  --fg: #e0e0e0;
  --primary: #4988e9;
  --accent: #5865f2;
  --card-bg: #2b2b2b;
  --border: #333;
  --radius: 0.5rem;
  --gap: 1rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

main {
  display: flex;
  flex-direction: column;
  gap: calc(var(--gap) * 3);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: var(--gap);
}

.site-header {
  position: relative;
  background: transparent;
  border-bottom: 1px solid #333;
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #3d3d3d, transparent);
  opacity: 0.6;
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  transition: all 0.3s ease;
  z-index: 2;
  position: relative;
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: transparent;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.logo-wrapper:hover .logo-glow {
  opacity: 1;
}

.logo-wrapper:hover .logo-icon {
  transform: scale(1.05);
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.logo-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin: 0;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: text;
  text-shadow: 0 0 40px rgba(73, 136, 233, 0.38);
}

.logo-mem {
  font-weight: 500;
  color: #b5b5b5;
}

.logo-re {
  font-weight: 900;
}

.logo-subtitle {
  font-size: 0.95rem;
  color: #a0a0a0;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.action-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.action-btn:hover::before {
  left: 100%;
}

.btn-icon {
  transition: transform 0.3s ease;
}

.action-btn:hover .btn-icon {
  transform: scale(1.1);
}

.primary-btn {
  background: linear-gradient(135deg, #4988e9 0%, #357abd 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(73, 136, 233, 0.3);
}

.primary-btn:hover {
  background: linear-gradient(135deg, #357abd 0%, #2563eb 100%);
  box-shadow: 0 6px 20px rgba(73, 136, 233, 0.4);
  transform: translateY(-2px);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.discord-btn {
  background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.discord-btn:hover {
  background: linear-gradient(135deg, #4752c4 0%, #3c45a5 100%);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
  transform: translateY(-2px);
}

.section {
  margin-bottom: calc(var(--gap) * 0.1);
}

.section h2 {
  margin-bottom: 0.5rem;
  font-size: 1.35rem;
  font-weight: 600;
  margin-right: 1rem;
  padding-left: 15px;
  padding-top: 10px;
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  margin-top: 1rem;
  padding-left: 10px;
}

.section-icon {
  width: 2.6rem; height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.05);
}

.section-icon.nightly {
  background: rgba(168,85,247,0.2);
  color: #a855f7;
}

.section-icon.github {
  background: rgba(22,163,74,0.2);
  color: #16a34a;
}

.section-header h2 {
  font-size: 1.5rem;
  color: var(--fg);
}

.badge {
  font-weight: 600;
  padding: 0.1em 0.4em;
  border-radius: 0.25rem;
  border: 1px solid currentColor;
}

.nightly-badge {
  color: #a855f7;
  border-color: rgba(168,85,247,0.3);
  background: rgba(168,85,247,0.1);
}

.github-badge {
  color: #16a34a;
  border-color: rgba(22,163,74,0.3);
  background: rgba(22,163,74,0.1);
}

.intro {
  text-align: center;
  padding-top: 20px;
}
.intro-text {
  font-weight: 600;
}

.intro-wrapper {
  max-width: 1400px;      /* limits line length */
  margin: 0 auto;        /* centers it */
  padding: 0 1rem;       /* always 1rem on left/right */
}

.updates-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Update Cards */
.update-card {
  background: linear-gradient(1deg, rgba(43, 43, 43, 0.71), rgba(35, 35, 35, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.update-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #4988e9, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.update-card:hover::before {
  opacity: 1;
}

.update-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

.update-card h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 1.1rem;
}

.update-card .date {
  font-size: 0.9rem;
  opacity: 0.7;
}

.update-card ul {
  list-style: disc inside;
}

.update-card li + li {
  margin-top: 0.25rem;
}

.update-card.nightly {
  border-left: 4px solid #a855f7;
}

.update-card.github {
  border-left: 4px solid #22c55e;
}

.tabs {
  overflow: visible;
}

.tab-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  padding: 0.75rem;
  background: linear-gradient(135deg, rgba(24,24,24,0.8), rgba(24,24,24,0.9));
  border-top-right-radius: 12px;
  border-top-left-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
}

.tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: #aaa;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  flex-shrink: 0;
  font-weight: 900;
  width: 100%;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e0e0e0;
  transform: translateY(-1px);
}

.tab-btn.active {
  background: linear-gradient(135deg, #4988e9, #357abd);
  color: white;
  box-shadow: 0 4px 15px rgba(73, 136, 233, 0.3);
}

.tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.tab-btn:hover .tab-icon {
  transform: scale(1.1);
}

.tab-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.tab-btn.active .tab-indicator {
  width: 100%;
}

.tab-buttons::-webkit-scrollbar {
  height: 4px;
}

.tab-buttons::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.tab-content {
  background: linear-gradient(135deg, rgba(18, 18, 18, 0.95), rgba(25, 25, 25, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom-right-radius: 12px;
  border-bottom-left-radius: 12px;
  backdrop-filter: blur(20px);
}

.tab-panel {
  display: none;
  padding: 0.5rem;
  padding-top: 1rem;
}

.tab-panel.active {
  display: block;
}

.see-more {
  display: flex;
  justify-content: center;
  text-align: center;
  margin: 1.5rem 0;
}
.see-more .btn {
  display: inline-block;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-auto-rows: 200px;
  gap: 1rem;
  grid-auto-flow: dense;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, rgba(43, 43, 43, 0.8), rgba(35, 35, 35, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item.wide {
  grid-column: span 2;
}

/* ---------- Documents two-column layout ---------- */
.docs-panel {
  display: grid;
  grid-template-columns: 300px 1fr;
  background: linear-gradient(135deg, rgba(43, 43, 43, 0.8), rgba(35, 35, 35, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  min-height: 750px;
}

.docs-list {
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.9), rgba(20, 20, 20, 0.95));
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
}

.docs-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.docs-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #9ca3af;
  border-left: 3px solid transparent;
}

.docs-list li:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e5e7eb;
}

.docs-list li.active {
  background: rgba(73, 136, 233, 0.1);
  color: #4988e9;
  border-left-color: #4988e9;
  font-weight: 600;
}

.docs-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 2rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.docs-header time {
  position: static;
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.7;
  white-space: nowrap;
}

/* ─── Content area (right) ────────────────────────────────────── */
.docs-content {
  display: flex;
  flex-direction: column;
}

.docs-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
}

.docs-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.doc-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #9ca3af;
  font-size: 0.875rem;
}

.read-time {
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.75rem;
}

.docs-body {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  max-height: 675px;
}

/* ─── AUTO-SCALE LARGE IMAGES ──────────────────────────────────── */
.docs-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: var(--gap) 0;
}

/* ─── MATCH QUILL “SNOW” STYLES ───────────────────────────────── */
.docs-body ul,
.docs-body ol {
  margin: var(--gap) 0;    
  padding-left: 2.5rem;
}

.docs-body ul li,
.docs-body ol li {
  margin: 0.25rem 0;
}

.docs-body blockquote {
  margin: var(--gap) 0;
  padding: var(--gap);
  border-left: 4px solid var(--accent);
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius);
  color: #ddd;
}
.docs-body pre {
  margin: var(--gap) 0;
  padding: var(--gap);
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: monospace;
}
.docs-body code {
  background: rgba(255,255,255,0.1);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius);
  font-family: monospace;
}

.docs-body,
.docs-body p,
.docs-body pre,
.docs-body code {
  word-wrap: break-word;
  scrollbar-width: thin;
  scrollbar-color: rgba(73, 136, 233, 0.47) rgba(255, 255, 255, 0.05);
}

/* ── Quill “Snow” Font Sizes ───────────────────────────────────── */
.docs-body .ql-size-small   { font-size: 0.75em; }
.docs-body .ql-size-large   { font-size: 1.5em;  }
.docs-body .ql-size-huge    { font-size: 2.5em;  }

/* ── Quill “Snow” Font Families ──────────────────────────────── */
.docs-body .ql-font-serif       { font-family: Georgia, serif;         }
.docs-body .ql-font-monospace   { font-family: 'Courier New', monospace; }
.docs-body .ql-font-sans-serif  { font-family: Arial, sans-serif;      }

/* ── Text Alignment ────────────────────────────────────────── */
.docs-body .ql-align-center  { text-align: center; }
.docs-body .ql-align-right   { text-align: right;  }
.docs-body .ql-align-justify { text-align: justify; }

/* ── List Indentation ──────────────────────────────────────── */
.docs-body ul .ql-indent-1,
.docs-body ol .ql-indent-1 { margin-left: 2em; }
.docs-body ul .ql-indent-2,
.docs-body ol .ql-indent-2 { margin-left: 4em; }
.docs-body ul .ql-indent-3,
.docs-body ol .ql-indent-3 { margin-left: 6em; }

/* ── Inline Indentation (e.g. indent on paragraphs) ───────── */
.docs-body .ql-indent-1 { margin-left: 3em; }
.docs-body .ql-indent-2 { margin-left: 6em; }

.docs-body::-webkit-scrollbar {
  width: 8px;
}

.docs-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.docs-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.docs-body::-webkit-scrollbar-thumb:hover {
  background: rgba(73, 136, 233, 0.6); /* Uses your primary color */
}

.docs-body::-webkit-scrollbar-thumb:active {
  background: rgba(73, 136, 233, 0.8);
}


.ql-snow .ql-editor {
  white-space: normal !important;
}

/* ── Share Button ───────── */
.update-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.share-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 0px;
  padding: 5px;
}

.share-btn img {
  width: 17px;
  height: 17px;
}

.share-dialog__content {
  background: var(--card-bg);
  color: var(--fg);
  border-radius: var(--radius);
  padding: calc(var(--gap)*1.5) var(--gap);
  max-width: 360px;
  width: 90%;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.share-dialog__close {
  position: absolute;
  top: 0.5rem; right: 0.5rem;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--fg);
  cursor: pointer;
}

.share-dialog__title {
  margin: 0;
  font-size: 1.25rem;
  color: var(--primary);
  text-align: center;
}

.share-dialog__url-group {
  display: flex;
  gap: 0.5rem;
}

.share-dialog__url {
  flex: 1;
  padding: 0.5rem;
  font-size: 0.9rem;
  background: #1f1f1f;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
}

.share-dialog__copy-btn {
  background: var(--primary);
  border: none;
  padding: 0 0.75rem;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.share-dialog__list {
  list-style: none;
  display: flex;
  justify-content: space-around;
  padding: 0;
  margin: 0;
}

.share-dialog__list a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  transition: opacity 0.2s;
}

.share-dialog__list a:hover {
  opacity: 0.75;
}

/* ─── Modal Overlay ───────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.modal.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0s;
}

.modal img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  object-fit: contain;
  transition: none;
}

code {
  background: rgba(255,255,255,0.1);
  padding: 0.1rem 0.3rem;
  border-radius: 0.25rem;
  font-family: monospace;
}

/* Responsive */
@media (max-width: 1000px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
}


@media (max-width: 860px) {
  .header-container {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.25rem 1rem;
  }

  .logo-title {
    font-size: 2rem;
  }
  
  .logo-icon {
    width: 80px;
    height: 80px;
  }

  .nav-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .action-btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .tab-buttons {
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
  }
  
  .tab-buttons {
    gap: 0.25rem;
    padding: 0.35rem 0.35rem;
  }

  .tab-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 600px) {
  .tab-buttons {
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
  }
  
  .tab-buttons {
    gap: 0.25rem;
    padding: 0.35rem 0.35rem;
  }

  .tab-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-auto-rows: 150px;
    grid-auto-flow: dense;
  }

  .gallery-item.large,
  .gallery-item.tall,
  .gallery-item.wide {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
  
  .docs-panel {
    display: flex;
    flex-direction: column;
    min-height: auto;
  }
  
  .docs-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .docs-header time {
    margin-top: 0.25rem;
    white-space: normal;
  }

  .docs-list {
    display: flex;
    flex-direction: row;
    border-right: none; 
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    height: auto;
    background-color: #1a1a1a;
  }

  .docs-list ul {
    display: flex;
    flex-direction: row;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .docs-list li {
    flex: 0 0 auto;
    padding: 0.5rem 1rem;
    white-space: nowrap;
    margin-right: 0.25rem;
  }

  .docs-list li.active {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
  }

  .docs-content {
    padding: var(--gap);
  }

  .docs-body {
    max-height: none;
    overflow: visible;
    margin: var(--gap) 0;
  }
}

@media (max-width: 542px) {
  .logo-section {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
  }

  .logo-title {
    font-size: 1.75rem;
  }

  .action-btn {
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 520px) {
  .nav-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .action-btn {
    flex: 1 1 auto;
    min-width: 120px;
  }

  .nav-actions .action-btn:nth-child(3) {
    flex: 1 1 100%;
    min-width: 0;
  }
}

@media (max-width: 440px) {
  .update-card .date,
  .update-card time.update-date {
    display: none;
  }
    
  .tab-buttons {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .tab-buttons .tab-btn {
    width: auto !important;
    flex: 0 0 auto;
    min-width: 5rem;
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    margin-right: 0.25rem;
    white-space: nowrap;
  }

  .tab-buttons::-webkit-scrollbar {
    height: 4px;
  }
  .tab-buttons::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
  }
}

.modal:not(.active) img {
  display: none !important;
}