:root {
  --bg-color: #0a0a0b;
  --primary-color: #8fae9b;
  --secondary-color: #7a8a9a;
  --accent-color: #9c8fae;
  --text-color: #9a9a9a;
  --danger-color: #b5716e;
  --card-bg: rgba(255, 255, 255, 0.02);
  --card-border: rgba(255, 255, 255, 0.09);
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: var(--font-mono);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-mono);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Scanline Overlay — faint, monochrome, no rainbow */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.15) 50%);
  background-size: 100% 3px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.35;
}

/* Matrix Background Canvas — quiet, low-contrast */
.matrix-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.12;
}

/* Layout Containers */
.container {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 10;
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
}

.logo {
  font-size: 2.75rem;
  font-weight: 600;
  color: var(--text-color);
  text-align: center;
  margin-bottom: 0.75rem;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  text-transform: uppercase;
}

.logo span {
  display: inline-block;
  animation: settleIn 1.4s ease-out;
}

@keyframes settleIn {
  0% { opacity: 0; letter-spacing: 0.9em; }
  100% { opacity: 1; letter-spacing: 0.4em; }
}

.tagline {
  text-align: center;
  color: var(--text-color);
  font-size: 0.95rem;
  margin-bottom: 3.5rem;
  min-height: 1.5em;
  letter-spacing: 0.02em;
}

.typing-cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background-color: var(--primary-color);
  vertical-align: bottom;
  opacity: 0.7;
  animation: typing-cursor 1s step-end infinite;
}

@keyframes typing-cursor {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 0; }
}

/* System Status */
.system-status {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 0.6rem;
}

.system-status span::before {
  content: '·';
  margin-right: 6px;
  color: var(--primary-color);
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* Upload Zone */
.upload-zone {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  padding: 4rem 2rem;
  text-align: center;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
}

.upload-zone:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.upload-zone.dragover {
  border-color: var(--primary-color);
  background: rgba(143, 174, 155, 0.05);
}

.upload-icon {
  font-size: 2.2rem;
  color: var(--text-color);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  opacity: 0.7;
}

.upload-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: #e6e6e6;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
  letter-spacing: 0.08em;
}

.upload-subtext {
  color: var(--text-color);
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

.max-size-note {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: var(--text-color);
  opacity: 0.6;
  position: relative;
  z-index: 1;
}

/* Hidden File Input */
#file-input {
  display: none;
}

/* Progress Container */
.progress-container {
  display: none;
  margin-top: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.5rem;
  border-radius: 3px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.file-name-uploading {
  color: #e6e6e6;
  word-break: break-all;
}

.progress-bar-wrapper {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: var(--primary-color);
  opacity: 0.75;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 0.6rem;
  font-size: 0.75rem;
  color: var(--text-color);
}

/* Upload Result */
.upload-result {
  display: none;
  margin-top: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 2rem;
  border-radius: 3px;
  animation: fadeInUp 0.4s ease-out forwards;
}

.result-header {
  font-family: var(--font-display);
  color: var(--primary-color);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-info {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-left: 2px solid var(--card-border);
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.file-info p {
  margin-bottom: 0.5rem;
}

.file-info span {
  color: var(--text-color);
  opacity: 0.7;
}

.link-container {
  display: flex;
  margin-bottom: 1.5rem;
}

.link-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-border);
  color: #e6e6e6;
  padding: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  outline: none;
}

.link-input:focus {
  border-color: rgba(255, 255, 255, 0.2);
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-primary:hover {
  background: var(--primary-color);
  color: #0a0a0b;
}

.btn-danger {
  background: transparent;
  color: var(--danger-color);
  border: 1px solid var(--danger-color);
}

.btn-danger:hover {
  background: var(--danger-color);
  color: #0a0a0b;
}

.btn-copy {
  background: transparent;
  color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
}

.btn-copy:hover {
  background: var(--secondary-color);
  color: #0a0a0b;
}

/* Download Page */
.download-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 2.5rem;
  border-radius: 3px;
  text-align: center;
  position: relative;
}

.download-icon {
  font-size: 2.5rem;
  color: var(--text-color);
  opacity: 0.7;
  margin-bottom: 1rem;
}

.download-filename {
  font-family: var(--font-display);
  color: #e6e6e6;
  font-weight: 600;
  font-size: 1.3rem;
  margin-bottom: 2rem;
  word-break: break-all;
}

.file-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
  text-align: left;
}

.meta-item {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border: 1px solid var(--card-border);
  border-left: 2px solid rgba(255, 255, 255, 0.15);
}

.meta-label {
  font-size: 0.7rem;
  color: var(--text-color);
  opacity: 0.6;
  margin-bottom: 0.3rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.meta-value {
  color: #e6e6e6;
  font-weight: 500;
}

.countdown-container {
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
}

.countdown-label {
  color: var(--text-color);
  opacity: 0.7;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.time-unit {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--card-border);
  padding: 1rem;
  min-width: 70px;
  transition: border-color 0.3s ease;
}

.time-unit .value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: #e6e6e6;
  display: block;
}

.time-unit .label {
  font-size: 0.65rem;
  color: var(--text-color);
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.warning-text {
  color: var(--text-color);
  opacity: 0.7;
  font-size: 0.8rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.download-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

/* Notifications */
#notification-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification {
  background: #111113;
  border: 1px solid var(--card-border);
  border-left: 2px solid var(--primary-color);
  color: #e6e6e6;
  font-size: 0.85rem;
  padding: 0.9rem 1.4rem;
  min-width: 280px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transform: translateX(120%);
  animation: slideIn 0.3s forwards;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notification.error {
  border-left-color: var(--danger-color);
}

.notification.fade-out {
  animation: slideOut 0.3s forwards;
}

@keyframes slideIn {
  to { transform: translateX(0); }
}
@keyframes slideOut {
  to { transform: translateX(120%); }
}

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

/* Admin Styles */
.admin-body {
  margin: 0;
  padding: 0;
  height: 100vh;
}

.admin-layout {
  display: flex;
  height: 100vh;
  width: 100%;
}

.admin-sidebar {
  width: 240px;
  background: #060607;
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.25rem;
  z-index: 100;
}

.sidebar-logo {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-color);
  font-size: 1.15rem;
  letter-spacing: 0.15em;
  text-align: center;
  margin-bottom: 0.2rem;
}

.sidebar-logo span {
  color: #e6e6e6;
}

.sidebar-subtitle {
  color: var(--text-color);
  opacity: 0.5;
  font-size: 0.7rem;
  text-align: center;
  margin-bottom: 2.5rem;
  letter-spacing: 0.15em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.7rem 0.9rem;
  border-radius: 3px;
  transition: all 0.2s;
  border-left: 2px solid transparent;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #e6e6e6;
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.04);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
}

.admin-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  position: relative;
  z-index: 10;
}

/* Admin Dashboard Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.5rem;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.stat-title {
  color: var(--text-color);
  opacity: 0.65;
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.7rem;
  color: #e6e6e6;
}

/* Data Tables */
.table-container {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--card-border);
  border-radius: 3px;
  overflow: hidden;
}

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

.data-table th, .data-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.data-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-color);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.72rem;
}

.data-table tbody tr {
  transition: background 0.2s;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.status-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.status-active { background: rgba(143, 174, 155, 0.12); color: var(--primary-color); }
.status-expired { background: rgba(181, 113, 110, 0.12); color: var(--danger-color); }

/* Forms & Inputs */
.search-box {
  display: flex;
  margin-bottom: 1.5rem;
}
.search-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  color: #e6e6e6;
  padding: 0.75rem 1rem;
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  outline: none;
}
.search-input:focus { border-color: rgba(255, 255, 255, 0.2); }

/* Admin Login */
.admin-login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.admin-login {
  background: #0c0c0d;
  border: 1px solid var(--card-border);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  position: relative;
}
.admin-login::before {
  content: 'RESTRICTED';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #0c0c0d;
  padding: 0 10px;
  color: var(--text-color);
  opacity: 0.6;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  font-weight: 600;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-label {
  display: block;
  color: var(--text-color);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.form-label::before { content: '~ '; color: var(--text-color); opacity: 0.5; }
.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: none;
  border-bottom: 1px solid var(--card-border);
  color: #e6e6e6;
  padding: 0.75rem;
  font-family: var(--font-mono);
  outline: none;
  transition: border-color 0.2s;
}
.form-control:focus {
  border-bottom-color: var(--primary-color);
}

.alert {
  padding: 0.9rem 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid;
  border-radius: 3px;
  font-size: 0.88rem;
}
.alert-danger { background: rgba(181, 113, 110, 0.08); border-color: var(--danger-color); color: #e6e6e6; }
.alert-success { background: rgba(143, 174, 155, 0.08); border-color: var(--primary-color); color: #e6e6e6; }

/* Site Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  padding: 2rem 1.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  position: relative;
  z-index: 10;
}

.site-footer a {
  color: var(--text-color);
  opacity: 0.55;
  text-decoration: none;
  transition: opacity 0.2s, color 0.2s;
}

.site-footer a:first-child {
  opacity: 0.8;
  color: var(--primary-color);
}

.site-footer a:hover {
  opacity: 1;
  color: #e6e6e6;
}

/* Doc Pages (About / Whitepaper / Founder) */
.doc-back {
  display: inline-block;
  margin-bottom: 2.5rem;
  color: var(--secondary-color);
  font-size: 0.8rem;
  text-decoration: none;
  opacity: 0.85;
}
.doc-back:hover { opacity: 1; }

.doc-eyebrow {
  color: var(--primary-color);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  opacity: 0.8;
  margin-bottom: 0.75rem;
}

.doc-title {
  font-size: 1.7rem;
  font-weight: 600;
  color: #e6e6e6;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.doc-subtitle {
  color: var(--text-color);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 3rem;
  max-width: 54ch;
}

.doc-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--card-border);
}

.doc-section:last-of-type {
  border-bottom: none;
}

.doc-section-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-color);
  opacity: 0.7;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.doc-section p {
  color: var(--text-color);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.doc-section p:last-child { margin-bottom: 0; }

.doc-section strong {
  color: #e6e6e6;
  font-weight: 600;
}

.doc-section code,
.doc-list code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.06);
  color: var(--primary-color);
  padding: 0.1em 0.4em;
  border-radius: 2px;
  font-size: 0.9em;
}

.doc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.doc-list li {
  color: var(--text-color);
  font-size: 0.88rem;
  line-height: 1.6;
  padding-left: 1.2rem;
  position: relative;
}

.doc-list li::before {
  content: '·';
  position: absolute;
  left: 0.15rem;
  color: var(--primary-color);
}

/* Founder Card */
.founder-card {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.75rem;
  margin-bottom: 3rem;
}

.founder-name {
  font-size: 1.3rem;
  font-weight: 600;
  color: #e6e6e6;
  letter-spacing: 0.02em;
}

.founder-role {
  color: var(--primary-color);
  font-size: 0.82rem;
  margin-top: 0.35rem;
}

.founder-meta {
  color: var(--text-color);
  opacity: 0.6;
  font-size: 0.75rem;
  text-align: right;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.social-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-color);
  text-decoration: none;
  padding: 0.9rem 1rem;
  font-size: 0.85rem;
  transition: border-color 0.2s, color 0.2s;
}

.social-link span:first-child {
  color: #e6e6e6;
}

.social-link span:last-child {
  opacity: 0.5;
  font-size: 0.75rem;
}

.social-link:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: #e6e6e6;
}

/* Responsive */
@media (max-width: 768px) {
  .logo { font-size: 1.9rem; letter-spacing: 0.25em; }
  .file-meta { grid-template-columns: 1fr; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; padding: 1rem; }
  .nav-link { display: inline-block; margin-right: 1rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .site-footer { gap: 0.4rem 1rem; padding: 1.5rem 1rem; }
  .doc-title { font-size: 1.4rem; }
  .founder-card { flex-direction: column; align-items: flex-start; }
  .founder-meta { text-align: left; }
  .social-grid { grid-template-columns: 1fr; }
}
