/* ==========================================================
   AKINF2P — FC Mobile News & Updates (shared styles)
   Used by news.html, events.html, redeem-codes.html
   ========================================================== */

body { background: #0F0E10; }

.nu-page { min-height: 100vh; padding: 110px 20px 100px; max-width: 1000px; margin: 0 auto; }
.nu-header { text-align: center; margin-bottom: 18px; }
.nu-header h1 { font-family: 'Cinzel', serif; font-size: 2rem; color: #866e43; margin-bottom: 6px; }
.nu-header p { color: #aaa; font-size: 0.92rem; }

/* ---- Pill nav linking the three pages ---- */
.nu-pillnav { display: flex; justify-content: center; gap: 8px; margin: 0 auto 8px; flex-wrap: wrap; max-width: 560px; }
.nu-pillnav a {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(134,110,67,0.35);
    color: #cbb98f; padding: 11px 22px; border-radius: 999px;
    font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.85rem; letter-spacing: 1px;
    text-decoration: none; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.nu-pillnav a:hover { border-color: #866e43; color: #e0d5bd; }
.nu-pillnav a.active { background: linear-gradient(135deg, #a8895a, #866e43); color: #fff; border-color: #866e43; }

/* ---- Section head with + Add ---- */
.nu-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 16px; }
.nu-section-head h2 { font-family: 'Outfit', sans-serif; font-size: 1.05rem; font-weight: 800; letter-spacing: 2px; color: #cbb98f; text-transform: uppercase; }
.nu-add-btn { display: none; align-items: center; gap: 7px; background: linear-gradient(135deg, #a8895a, #866e43); color: #fff; border: none; padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 0.78rem; cursor: pointer; white-space: nowrap; }
.nu-add-btn:hover { filter: brightness(1.12); }
.nu-page.is-admin .nu-add-btn { display: inline-flex; }

/* ---- News cards: large 16:9 image LEFT, title + scrollable text RIGHT, comments full-width below ---- */
.nu-news-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
.nu-news-card { position: relative; display: flex; flex-direction: column; background: #0a0a0a; border: 1px solid rgba(134,110,67,0.35); border-radius: 12px; overflow: hidden; margin: 0; }
.nu-news-top { display: grid; grid-template-columns: 55% 1fr; min-width: 0; min-height: 0; }
.nu-news-media { position: relative; aspect-ratio: 16 / 9; min-width: 0; background: rgba(134,110,67,0.12); overflow: hidden; }
.nu-news-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.nu-news-info { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 14px 18px 16px; border-left: 1px solid rgba(134,110,67,0.25); }
.nu-news-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nu-news-date { position: static; background: none; padding: 0; color: #cbb98f; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.5px; white-space: nowrap; }
.nu-news-meta .nu-card-tools { margin-left: auto; }
.nu-news-info h3 { flex-shrink: 0; font-family: 'Cinzel', serif; color: #d9c08c; font-size: 1.45rem; font-weight: 700; line-height: 1.25; margin: 10px 0 8px; word-break: break-word; }
.nu-news-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; color: #c9c2b4; font-size: 0.92rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; padding-right: 6px; }
.nu-news-body::-webkit-scrollbar { width: 4px; }
.nu-news-body::-webkit-scrollbar-track { background: transparent; }
.nu-news-body::-webkit-scrollbar-thumb { background: rgba(134,110,67,0.45); border-radius: 999px; }

/* ---- Comments (news page only) ---- */
.nu-comments { border-top: 1px solid rgba(134,110,67,0.25); padding: 14px 18px 16px; background: rgba(0,0,0,0.3); }
.nu-comments-title { color: #cbb98f; font-size: 0.74rem; font-weight: 800; letter-spacing: 1.5px; margin-bottom: 10px; }
.nu-comment { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.nu-comment:last-of-type { border-bottom: none; }
.nu-comment-avatar { flex: 0 0 30px; height: 30px; border-radius: 50%; background: rgba(134,110,67,0.2); border: 1px solid rgba(134,110,67,0.45); color: #cbb98f; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.78rem; text-transform: uppercase; }
.nu-comment-main { flex: 1; min-width: 0; }
.nu-comment-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.nu-comment-user { color: #e0d5bd; font-weight: 700; font-size: 0.8rem; }
.nu-comment-time { color: #777; font-size: 0.68rem; }
.nu-comment-del { background: none; border: none; color: #777; cursor: pointer; font-size: 0.68rem; margin-left: auto; padding: 0 2px; }
.nu-comment-del:hover { color: #ff6b6b; }
.nu-comment-body { color: #c9c2b4; font-size: 0.84rem; line-height: 1.5; margin-top: 3px; word-break: break-word; white-space: pre-wrap; }
.nu-comments-empty { color: #666; font-size: 0.8rem; padding: 4px 0 8px; }
.nu-comment-form { display: flex; gap: 8px; margin-top: 10px; }
.nu-comment-input { flex: 1; min-width: 0; background: rgba(0,0,0,0.4); border: 1px solid rgba(134,110,67,0.35); border-radius: 9px; color: #fff; padding: 10px 13px; font-size: 0.86rem; font-family: inherit; outline: none; }
.nu-comment-input:focus { border-color: #866e43; }
.nu-comment-send { background: linear-gradient(135deg, #a8895a, #866e43); color: #fff; border: none; border-radius: 9px; padding: 0 16px; font-weight: 700; font-size: 0.8rem; cursor: pointer; white-space: nowrap; }
.nu-comment-send:disabled { opacity: 0.5; cursor: not-allowed; }
.nu-login-note { color: #888; font-size: 0.78rem; padding: 6px 0 2px; }
.nu-login-note a { color: #cbb98f; font-weight: 700; text-decoration: none; }
.nu-login-note a:hover { text-decoration: underline; }

/* ---- Event cards: 16:9 card — image fills LEFT 50%, title + scrollable description RIGHT 50% ---- */
.nu-event-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  aspect-ratio: 16 / 9;
  background: #0a0a0a;
  border: 1px solid rgba(134,110,67,0.35);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 18px;
}
.nu-event-media { min-width: 0; min-height: 0; background: rgba(134,110,67,0.12); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.nu-event-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.nu-event-media i { color: #866e43; font-size: 2rem; }
.nu-event-info { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 14px 16px; border-left: 1px solid rgba(134,110,67,0.25); }
.nu-event-info h3 { flex-shrink: 0; color: #fff; font-family: 'Outfit', sans-serif; font-size: 1.05rem; font-weight: 700; line-height: 1.3; word-break: break-word; margin-bottom: 8px; }
.nu-page.is-admin .nu-event-info h3 { padding-right: 72px; }
.nu-event-desc { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; color: #b9b2a4; font-size: 0.86rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word; padding-right: 6px; }
.nu-event-desc::-webkit-scrollbar { width: 4px; }
.nu-event-desc::-webkit-scrollbar-track { background: transparent; }
.nu-event-desc::-webkit-scrollbar-thumb { background: rgba(134,110,67,0.45); border-radius: 999px; }
.nu-event-card .nu-card-tools { position: absolute; right: 8px; top: 8px; z-index: 2; }

/* ---- Redeem codes ---- */
.nu-code-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #0a0a0a; border: 1px dashed rgba(134,110,67,0.55); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.nu-code-text { font-family: 'Courier New', monospace; font-weight: 800; color: #e0b354; font-size: 1.08rem; letter-spacing: 1.5px; word-break: break-all; }
.nu-status-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 800; letter-spacing: 1px; padding: 5px 12px; border-radius: 999px; }
.nu-status-VALID { background: rgba(46,125,50,0.18); color: #81c784; border: 1px solid rgba(129,199,132,0.4); }
.nu-status-EXPIRED { background: rgba(198,40,40,0.15); color: #ef9a9a; border: 1px solid rgba(239,154,154,0.4); }
.nu-status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.nu-code-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nu-copy-btn { display: inline-flex; align-items: center; gap: 7px; background: rgba(134,110,67,0.15); color: #cbb98f; border: 1px solid rgba(134,110,67,0.5); padding: 8px 14px; border-radius: 8px; font-weight: 700; font-size: 0.76rem; cursor: pointer; white-space: nowrap; }
.nu-copy-btn:hover { background: rgba(134,110,67,0.28); }
.nu-toggle-btn { background: rgba(0,0,0,0.4); border: 1px solid rgba(134,110,67,0.35); color: #cbb98f; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.5px; padding: 7px 11px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.nu-toggle-btn:hover { border-color: #866e43; }
.nu-page:not(.is-admin) .nu-toggle-btn { display: none; }

/* ---- Icon buttons ---- */
.nu-card-tools { display: flex; align-items: center; gap: 6px; }
.nu-icon-btn { background: rgba(0,0,0,0.4); border: 1px solid rgba(134,110,67,0.3); color: #999; cursor: pointer; font-size: 0.82rem; padding: 7px 9px; border-radius: 8px; }
.nu-icon-btn:hover { color: #cbb98f; border-color: #866e43; }
.nu-icon-btn.danger:hover { color: #ff6b6b; border-color: rgba(255,107,107,0.5); }
.nu-page:not(.is-admin) .nu-card-tools { display: none; }

/* ---- Add/Edit modal ---- */
.nu-modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 3000; align-items: flex-start; justify-content: center; padding: 20px; overflow-y: auto; }
.nu-modal-backdrop.open { display: flex; }
.nu-modal { background: #141210; border: 2px solid #866e43; border-radius: 16px; padding: 24px; max-width: 440px; width: 100%; margin: 40px 0; }
.nu-modal h2 { font-family: 'Outfit', sans-serif; font-size: 1.05rem; color: #866e43; margin-bottom: 16px; }
.nu-field { margin-bottom: 14px; }
.nu-field label { display: block; color: #cbb98f; font-size: 0.78rem; font-weight: 700; letter-spacing: 1px; margin-bottom: 7px; text-transform: uppercase; }
.nu-input { width: 100%; background: rgba(0,0,0,0.35); border: 1px solid rgba(134,110,67,0.3); border-radius: 8px; color: #fff; padding: 12px 14px; font-size: 0.95rem; font-family: inherit; outline: none; }
.nu-input:focus { border-color: #866e43; }
.nu-input[type="file"] { display: none; }
.nu-file-btn { display: flex; align-items: center; justify-content: center; gap: 9px; background: rgba(134,110,67,0.12); border: 1px dashed rgba(134,110,67,0.55); color: #cbb98f; padding: 16px; border-radius: 10px; cursor: pointer; font-size: 0.86rem; width: 100%; }
.nu-file-btn:hover { background: rgba(134,110,67,0.22); }
.nu-preview { max-width: 100%; max-height: 180px; border-radius: 10px; margin-top: 10px; display: block; }
/* Events only: the upload preview mirrors the 16:9 crop the card will show */
#nuPage[data-page="events"] .nu-preview { aspect-ratio: 16 / 9; object-fit: cover; width: 70%; max-width: 320px; height: auto; max-height: none; }
.nu-textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
.nu-modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.nu-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(135deg, #a8895a, #866e43); color: #fff; border: none; padding: 13px 18px; border-radius: 9px; font-weight: 700; font-size: 0.88rem; cursor: pointer; }
.nu-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.nu-btn-ghost { background: none; border: 1px solid rgba(134,110,67,0.5); color: #cbb98f; }
.nu-status { font-size: 0.84rem; margin-top: 12px; display: none; }
.nu-status.err { color: #ff6b6b; display: block; }
.nu-status.ok { color: #8fd694; display: block; }

/* ---- Confirm modal ---- */
.nu-confirm-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 3100; align-items: center; justify-content: center; padding: 20px; }
.nu-confirm-backdrop.open { display: flex; }
.nu-confirm { background: #141210; border: 2px solid #866e43; border-radius: 16px; padding: 26px; max-width: 380px; width: 100%; text-align: center; }
.nu-confirm p { color: #e2d8c8; font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px; }
.nu-confirm-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.nu-confirm-yes { padding: 11px 20px; border-radius: 9px; font-weight: 700; font-size: 0.84rem; cursor: pointer; border: none; background: linear-gradient(135deg, #a8895a, #866e43); color: #fff; }
.nu-confirm-cancel { padding: 11px 20px; border-radius: 9px; font-weight: 700; font-size: 0.84rem; cursor: pointer; border: 1px solid rgba(134,110,67,0.5); background: none; color: #cbb98f; }

/* ---- Empty / loading ---- */
.nu-empty { text-align: center; color: #777; padding: 36px 12px; font-size: 0.9rem; }
.nu-empty i { font-size: 1.6rem; display: block; margin-bottom: 10px; color: #5a4f3a; }
.nu-loading { text-align: center; color: #888; padding: 30px 0; }

@media (max-width: 768px) {
    .nu-page { padding: 100px 14px 90px; }
    .nu-header h1 { font-size: 1.45rem; }
    .nu-pillnav a { padding: 10px 16px; font-size: 0.78rem; }
    .nu-news-grid { grid-template-columns: 1fr; gap: 14px; }
    .nu-news-top { grid-template-columns: 1fr; }
    .nu-news-info { border-left: none; border-top: 1px solid rgba(134,110,67,0.25); padding: 12px 14px 14px; }
    .nu-news-info h3 { font-size: 1.15rem; }
    .nu-news-body { font-size: 0.84rem; }
    .nu-news-date { font-size: 0.74rem; }
    .nu-event-info { padding: 10px 12px; }
    .nu-event-info h3 { font-size: 0.9rem; margin-bottom: 6px; }
    .nu-event-desc { font-size: 0.76rem; }
    .nu-code-card { padding: 12px 13px; }
    .nu-code-text { font-size: 0.98rem; }
    .nu-comments { padding: 10px 12px 12px; }
}
