@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg-primary: #070b12;
  --bg-secondary: #0d1422;
  --bg-card: rgba(18, 28, 48, 0.65);
  --bg-card-hover: rgba(26, 40, 68, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.3);
  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-purple: #b388ff;
  --accent-gradient: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  --badge-active: linear-gradient(135deg, #00b09b, #96c93d);
  --badge-inactive: linear-gradient(135deg, #ff416c, #ff4b2b);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 242, 254, 0.1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(0, 242, 254, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(179, 136, 255, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: var(--accent-blue);
  text-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
}

/* Header & Nav */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7, 11, 18, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}

.logo-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.logo-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

nav ul li a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
}

nav ul li a:hover, nav ul li a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
}

.btn-export {
  background: linear-gradient(135deg, #11998e, #38ef7d);
  color: #000 !important;
  font-weight: 700;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 12px rgba(56, 239, 125, 0.3);
  cursor: pointer;
  border: none;
}
.btn-export:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(56, 239, 125, 0.6);
}

/* Hero Section */
.hero {
  padding: 3.5rem 2rem;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero h1 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 2rem auto;
}

/* Search & Filters */
.controls-bar {
  max-width: 1300px;
  margin: 0 auto 2rem auto;
  padding: 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.search-box input, .bulk-select {
  width: 100%;
  padding: 0.8rem 1.2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.search-box input:focus, .bulk-select:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.2);
}

.filter-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent-gradient);
  color: #000;
  border-color: transparent;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

/* Main Container & Grid */
.main-content {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem 4rem 2rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

/* Project Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-lg);
}

.card.has-featured {
  background: linear-gradient(to bottom, rgba(10, 15, 30, 0.45) 0%, rgba(10, 15, 30, 0.82) 100%), var(--featured-bg) no-repeat center center / cover;
}

.card.has-featured:hover {
  background: linear-gradient(to bottom, rgba(10, 15, 30, 0.30) 0%, rgba(10, 15, 30, 0.75) 100%), var(--featured-bg) no-repeat center center / cover;
  border-color: var(--accent-cyan);
  box-shadow: 0 12px 30px -5px rgba(0, 242, 254, 0.25);
}

.card.has-featured .card-title {
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9);
}

.card.has-featured .card-meta,
.card.has-featured .card-body {
  color: #e2e8f0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

.card.has-featured .card-footer {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

.card-header {
  padding: 1.5rem 1.5rem 0.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  white-space: nowrap;
}

.badge.active { background: var(--badge-active); }
.badge.inactive { background: var(--badge-inactive); }

.card-meta {
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body {
  padding: 1rem 1.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.btn-view {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card:hover .btn-view {
  background: var(--accent-gradient);
  color: #000;
  border-color: transparent;
}

/* Detail View / Modal */
.detail-view {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 3rem;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.detail-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.btn-back {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-back:hover {
  color: var(--text-primary);
  border-color: var(--accent-cyan);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 2.5rem;
}

.detail-grid > div {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-desc {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 2rem;
  background: rgba(0,0,0,0.2);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.04);
}

.asset-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
}

.tab-btn.active, .tab-btn:hover {
  background: var(--accent-blue);
  color: #000;
  border-color: transparent;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item:hover {
  transform: scale(1.03);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

/* Guide Cards & Guide Viewer Modal */
.guide-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.guide-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 20px rgba(0, 242, 254, 0.2);
}

.guide-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
  background: #000;
}

.guide-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.guide-viewer-card {
  background: var(--bg-secondary);
  border: 1px solid var(--accent-cyan);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  width: 1400px;
  max-width: 96vw;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 15px 50px rgba(0,0,0,0.9);
  position: relative;
}

.guide-text-panel {
  background: rgba(0,0,0,0.3);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.05);
  font-size: 0.95rem;
  line-height: 1.8;
  white-space: pre-wrap;
  margin-bottom: 1.5rem;
  font-family: var(--font-body);
}

/* Discord Quote Card & Interactive Checkbox */
.discord-card {
  background: rgba(114, 137, 218, 0.08);
  border-left: 4px solid #7289da;
  padding: 1.2rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: all 0.2s;
}

.discord-card:hover {
  background: rgba(114, 137, 218, 0.15);
}

.discord-card input[type="checkbox"] {
  margin-top: 0.3rem;
  transform: scale(1.3);
  cursor: pointer;
  accent-color: var(--accent-cyan);
}

.discord-content-wrap {
  flex: 1;
}

.discord-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #a3b6f5;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

/* Sticky Bulk Action Bar */
.bulk-bar {
  position: sticky;
  top: 75px;
  z-index: 900;
  background: rgba(13, 20, 34, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--accent-cyan);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.2);
}

.bulk-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn-action {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  transition: all 0.2s;
}
.btn-action:hover {
  background: var(--accent-blue);
  color: #000;
}
.btn-danger {
  background: rgba(255, 65, 108, 0.2);
  color: #ff416c;
  border-color: #ff416c;
}
.btn-danger:hover {
  background: #ff416c;
  color: #fff;
}

/* Timeline View */
.timeline-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  padding: 2rem 0;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
  transform: translateX(-50%);
}

.timeline-year {
  background: var(--accent-gradient);
  color: #000;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  padding: 0.5rem 2rem;
  border-radius: 30px;
  width: fit-content;
  margin: 2rem auto;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.timeline-event {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  width: 45%;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.timeline-event:nth-child(odd) { margin-left: 0; }
.timeline-event:nth-child(even) { margin-left: 55%; }

@media (max-width: 768px) {
  .timeline-container::before { left: 20px; }
  .timeline-event { width: 85%; margin-left: 50px !important; }
}

/* People / Users Table */
.people-table-wrapper {
  overflow-x: auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 1rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.95rem;
}

th {
  background: rgba(0,0,0,0.3);
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent-cyan);
}

tr:hover {
  background: rgba(255,255,255,0.03);
}

/* User Edit Modal */
.user-modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--accent-cyan);
  padding: 2rem;
  border-radius: var(--radius-lg);
  width: 500px;
  max-width: 90vw;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.form-group {
  margin-bottom: 1.2rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  font-weight: 600;
}
.form-group input, .form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

/* Lightbox Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  max-width: 92vw;
  max-height: 90vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content img, .modal-content video {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-glow);
}

.modal-nav-arrow:hover {
  background: var(--accent-cyan) !important;
  color: #000 !important;
  box-shadow: 0 0 15px var(--accent-cyan);
  transform: scale(1.1);
}

.modal-close {
  position: absolute;
  top: -35px; right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 2020;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--accent-cyan);
}

/* Hover show/hide toggle buttons */
.gallery-thumb-wrap .thumb-hover-btn,
.guide-card-row .thumb-hover-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--accent-cyan);
  color: var(--text-primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
}

.doc-item-row .thumb-hover-btn {
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--accent-cyan);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
}

.gallery-thumb-wrap:hover .thumb-hover-btn,
.guide-card-row:hover .thumb-hover-btn,
.doc-item-row:hover .thumb-hover-btn {
  opacity: 1;
}

.thumb-hover-btn:hover {
  background: var(--accent-cyan) !important;
  color: #000 !important;
}
