/* ═══════════════════════════════════════════════════════════════
   POST PAGE  ·  minemev.com  ·  dark editorial-gamer stylesheet
   Depends on base.css variables (--bg-*, --accent, --font-*, …)
   ═══════════════════════════════════════════════════════════════ */

/* ── Layout shell ───────────────────────────────────────────── */

.main_container {
  background-color: var(--bg-base);
  padding: 16px;
  min-height: 100vh;
  font-family: var(--font-body);
}

.post_page {
  display: flex;
  gap: 24px;
  flex-wrap: wrap-reverse;
}

.post_left {
  flex: 2;
  min-width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post_right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-self: start;
}


/* ── Base card ──────────────────────────────────────────────── */

.card {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;

  /* subtle inner-top accent line */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 4px 24px rgba(0,0,0,0.35);
  transition: border-color var(--transition);
}

.card:hover {
  border-color: var(--border-focus);
}


/* ── Preview iframe ─────────────────────────────────────────── */

#preview_container iframe {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  width: 100%;
  display: block;
}


/* ── Gallery card ───────────────────────────────────────────── */

.gallery.card h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.gallery_main img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  object-fit: cover;
  background-color: var(--bg-raised);
  display: block;
  border: 1px solid var(--border);
}

.gallery_thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.gallery_thumbs img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
}

.gallery_thumbs img:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}


/* ── Post info card ─────────────────────────────────────────── */

.post_info.card {
  color: var(--text-primary);
}

.post_info.card #post_title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 400;           /* Bebas Neue is already bold by nature */
  letter-spacing: 0.03em;
  color: var(--text-primary);
  margin: 0 0 16px;
  line-height: 1.1;
}

.info_row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 0;
  margin: 6px 0;
  align-items: baseline;
}

.info_row .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── User link ──────────────────────────────────────────────── */

.user_link,
#post_user {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}

.user_link:hover,
#post_user:hover {
  color: var(--accent-dim);
}

#post_user {
  padding: 4px 0;
}


/* ── Tags & versions ────────────────────────────────────────── */

#post_tags,
#post_versions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.post_tag_link,
.post_version_link {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
  background-color: transparent;
}

.post_tag_link {
  color: #f0a0a0;
  border: 1px solid rgba(240, 160, 160, 0.35);
}

.post_tag_link:hover {
  background-color: rgba(240, 160, 160, 0.12);
  border-color: #f0a0a0;
  color: #ffcfcf;
}

.post_version_link {
  color: var(--accent);
  border: 1px solid rgba(127, 255, 0, 0.35);
}

.post_version_link:hover {
  background-color: var(--accent-subtle);
  border-color: var(--accent);
}


/* ── Download buttons ───────────────────────────────────────── */

.download-button {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 6px;
  background-color: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition);
  text-decoration: none;
}

.download-button:hover {
  border-color: var(--accent);
  background-color: var(--bg-overlay);
}

/* download icon (first svg — green) */
.download-button > svg:first-of-type {
  width: 42px;
  height: 42px;
  padding: 6px;
  flex-shrink: 0;
  background-color: var(--accent);
  border-radius: var(--radius-sm);
  stroke: var(--bg-base);
  border: 2px solid transparent;
  transition: background-color var(--transition), border-color var(--transition), transform var(--transition);
}

.download-button:hover > svg:first-of-type {
  background-color: var(--accent-dim);
  border-color: rgba(0,0,0,0.5);
  transform: translateY(1px);
}

.download-button svg:first-of-type path:last-of-type {
  transition: transform var(--transition);
}

.download-button:hover svg:first-of-type path:last-of-type {
  animation: nudgeDown 0.45s ease-in-out infinite alternate;
}

@keyframes nudgeDown {
  from { transform: translateY(0); }
  to   { transform: translateY(3px); }
}

/* preview / eye icon (last svg — gold) */
.download-button > svg:last-child {
  width: 42px;
  height: 42px;
  padding: 6px;
  flex-shrink: 0;
  background-color: var(--warning);
  border-radius: var(--radius-sm);
  stroke: var(--bg-base);
  border: 2px solid transparent;
  margin-left: auto;
  transition: background-color var(--transition), border-color var(--transition);
}

.download-button > svg:last-child:hover {
  background-color: #e0982a;
  border-color: rgba(0,0,0,0.5);
}

/* eye open/closed toggle */
.download-button svg:last-child .eye-open  { display: none; }
.download-button svg:last-child .eye-closed { display: initial; }
.download-button svg:last-child:hover .eye-open  { display: initial; }
.download-button svg:last-child:hover .eye-closed { display: none; }

/* file name / text area */
.download-button-text {
  margin-left: 10px;
  padding-right: 10px;
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
}

.litematic_name {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* versions row inside button */
.versions_list {
  display: flex;
  flex-direction: row;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  max-width: 200px;
  gap: 4px;
}

.versions_list p {
  margin: 0 2px;
  color: #c8b8e0;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* click-to-rotate spinner on download svg */
.rotate-on-click {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.rotate-on-click.rotate {
  transform: rotateX(360deg);
  background-color: var(--bg-base) !important;
  stroke: var(--accent) !important;
  border-color: var(--accent) !important;
}


/* ── Description card ───────────────────────────────────────── */

.description.card h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

#post_description {
  white-space: break-spaces;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
}


/* ── Title container (card header row) ──────────────────────── */

.title_container {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.title_container h3 {
  flex-grow: 1;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.owner_menu_wrapper {
  flex-shrink: 0;
  margin-left: auto;
}


/* ── Utility buttons ────────────────────────────────────────── */

.translate-btn,
.view-toggle-btn {
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 15px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background-color var(--transition);
}

.translate-btn:hover,
.view-toggle-btn:hover {
  color: var(--text-primary);
  background-color: var(--bg-raised);
}

.button_group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}


/* ── Edit / admin link ──────────────────────────────────────── */

.edit_post_link {
  color: var(--danger);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: opacity var(--transition);
}

.edit_post_link:hover {
  opacity: 0.7;
}


/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 720px) {
  .post_left {
    min-width: 100%;
  }

  .post_page {
    gap: 16px;
  }

  .post_info.card #post_title {
    font-size: 28px;
  }
}



/* ── Tabs Navigation ────────────────────────────────────────── */
/* ── Pill Navigation (Updated from Tabs) ────────────────────── */
.tabs_header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 4px;
    width: fit-content;
    background: var(--bg-surface);
    border-radius: 50px;
}

.tab_btn {
    font-family: var(--font-display);
    font-size: 0.95rem;      /* Slightly smaller for pill aesthetic */
    letter-spacing: 0.5px;
    padding: 8px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    /* Removed border-bottom: none to make it a full shape */
    color: var(--text-secondary);
    border-radius: 50px;     /* Full "Pill" rounding */
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tab_btn:hover {
    color: var(--text-primary);
    background: var(--bg-raised);
    border-color: var(--border-hover); /* Assumes you have a hover var */
}

.tab_btn.active {
    background: var(--accent-subtle); /* Softer background for the pill */
    color: var(--accent);
    border-color: var(--accent);
    /* Removed box-shadow top-line; replaced with subtle outer glow */
    box-shadow: 0 0 0 1px var(--accent); 
}

/* ── Content Transition ─────────────────────────────────────── */
.tab_content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab_content.active {
    display: block;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(8px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}
/* ── Technical Table ────────────────────────────────────────── */
.files_table_container {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table_responsive {
    overflow-x: auto;
    width: 100%;
}

.technical_table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
}

.technical_table th {
    background: var(--bg-overlay);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.technical_table td {
    padding: 16px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.technical_table tr:last-child td {
    border-bottom: none;
}

.technical_table tr:hover td {
    background: var(--accent-subtle);
}

/* ── Table Components ───────────────────────────────────────── */
.ver_badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: var(--bg-overlay);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    margin: 2px;
    border: 1px solid var(--accent-subtle);
}

.table_dl_btn {
    background: var(--accent);
    color: var(--bg-base);
    border: none;
    padding: 8px 16px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.table_dl_btn:hover {
    background: var(--accent-dim);
    transform: scale(1.02);
}

/* ── Security Status Classes ────────────────────────────────── */
.security_link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: var(--transition);
}

.status-safe { 
    color: var(--accent); 
    text-shadow: 0 0 10px var(--accent-glow);
}

.status-waiting { 
    color: var(--warning); 
}

.status-alert { 
    color: var(--danger); 
}

.security_link:hover {
    text-decoration: underline;
    filter: brightness(1.2);
}

/* ── Sidebar Download Buttons (Refining your current style) ──── */
.download-button {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 10px;
    transition: var(--transition);
}

.download-button:hover {
    border-color: var(--accent-dim);
    background: var(--bg-raised);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.litematic_name {
    color: var(--text-primary);
    font-weight: 600;
}

.versions_list p {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}