/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Orbitron', sans-serif;
  background: #000;
  color: #fff;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== LOADER ===== */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-content {
  text-align: left;
  width: 380px;
  max-width: 90vw;
}

.loader-line {
  font-family: 'Orbitron', monospace;
  font-size: 14px;
  color: #00e5ff;
  letter-spacing: 2px;
  min-height: 1.6em;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

.loader-line::after {
  content: '█';
  animation: blink-cursor 0.6s step-end infinite;
  color: #00e5ff;
}

@keyframes blink-cursor {
  50% { opacity: 0; }
}

.loader-bar-wrapper {
  margin-top: 24px;
  opacity: 0;
}

.loader-bar {
  width: 100%;
  height: 3px;
  background: rgba(0, 229, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00e5ff, #7c4dff);
  border-radius: 2px;
  transition: width 0.05s linear;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.5);
}

/* ===== STARFIELD CANVAS ===== */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  will-change: contents;
}

/* ===== BACKGROUND ===== */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#bg-image {
  position: absolute;
  inset: -20px;
  background: url('assets/background.jpg') center center / cover no-repeat;
  will-change: transform;
  animation: float-bg 10s ease-in-out infinite;
}

#bg-overlay {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.75) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 40%, rgba(0,0,0,0.7) 100%);
}

@keyframes float-bg {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ===== GRAIN OVERLAY ===== */
#grain {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ===== MAIN CONTENT ===== */
#main-content {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: none;
}

.content-wrapper {
  text-align: center;
  padding: 20px;
}

/* ===== TITLE ===== */
.title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-bottom: 48px;
  line-height: 1;
}

.title-top {
  font-size: clamp(32px, 8vw, 72px);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #fff;
  opacity: 0;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.4),
    0 0 30px rgba(0, 229, 255, 0.3),
    0 0 60px rgba(0, 229, 255, 0.15),
    0 4px 20px rgba(0, 0, 0, 0.8);
}

.title-bottom {
  font-size: clamp(56px, 14vw, 130px);
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #fff;
  opacity: 0;
  text-shadow:
    0 0 15px rgba(255, 255, 255, 0.5),
    0 0 40px rgba(0, 229, 255, 0.4),
    0 0 80px rgba(124, 77, 255, 0.2),
    0 6px 30px rgba(0, 0, 0, 0.9);
  margin-top: -5px;
}

/* ===== GLASS BUTTONS ===== */
.buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.glass-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #fff;
  opacity: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-transform: uppercase;
}

.glass-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(124, 77, 255, 0.08));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.glass-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.glass-btn:hover {
  border-color: rgba(0, 229, 255, 0.4);
  transform: translateY(-3px);
  box-shadow:
    0 0 20px rgba(0, 229, 255, 0.2),
    0 0 60px rgba(0, 229, 255, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.4);
}

.glass-btn:hover::before {
  opacity: 1;
}

.glass-btn:hover::after {
  opacity: 1;
}

.glass-btn:hover .btn-text {
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
}

.glass-btn:active {
  transform: translateY(-1px);
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  position: relative;
  z-index: 1;
}

.glass-btn:hover .btn-icon {
  opacity: 1;
}

.btn-text {
  position: relative;
  z-index: 1;
  transition: text-shadow 0.4s ease;
}

/* ===== FOOTER TAG ===== */
.footer-tag {
  margin-top: 56px;
  font-size: 10px;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.25);
  opacity: 0;
  text-transform: uppercase;
}

/* ===== SCANLINE (extra cinematic) ===== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* ===== ADMIN TRIGGER ===== */
#admin-trigger {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 50;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.08);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

#admin-trigger:hover {
  color: rgba(0, 229, 255, 0.6);
  border-color: rgba(0, 229, 255, 0.2);
  background: rgba(0, 229, 255, 0.05);
}

/* ===== ADMIN OVERLAY ===== */
#admin-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

#admin-overlay.active {
  display: flex;
}

/* ===== ADMIN PANEL ===== */
#admin-panel {
  position: relative;
  width: 420px;
  max-width: 92vw;
  max-height: 85vh;
  overflow-y: auto;
  background: rgba(10, 14, 26, 0.95);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow:
    0 0 40px rgba(0, 229, 255, 0.08),
    0 24px 80px rgba(0, 0, 0, 0.6);
}

#admin-panel::-webkit-scrollbar {
  width: 4px;
}

#admin-panel::-webkit-scrollbar-track {
  background: transparent;
}

#admin-panel::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.2);
  border-radius: 2px;
}

.admin-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s ease;
  line-height: 1;
}

.admin-close:hover {
  color: #ff4d6a;
}

.admin-header {
  text-align: center;
  margin-bottom: 28px;
}

.admin-header .admin-lock {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
}

.admin-header h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #00e5ff;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.admin-section {
  margin-bottom: 24px;
}

.admin-section h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-field {
  margin-bottom: 16px;
}

.admin-field label {
  display: block;
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 6px;
}

.admin-field input {
  width: 100%;
  padding: 12px 14px;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  outline: none;
  transition: all 0.3s ease;
}

.admin-field input::placeholder {
  color: rgba(255, 255, 255, 0.2);
  font-size: 11px;
}

.admin-field input:focus {
  border-color: rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.04);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.08);
}

.admin-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.admin-btn {
  flex: 1;
  padding: 12px 20px;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  border: 1px solid;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.admin-btn.primary {
  color: #000;
  background: #00e5ff;
  border-color: #00e5ff;
}

.admin-btn.primary:hover {
  background: #00c8e0;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.admin-btn.secondary {
  color: rgba(255, 255, 255, 0.6);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.15);
}

.admin-btn.secondary:hover {
  color: #ff4d6a;
  border-color: rgba(255, 77, 106, 0.4);
  background: rgba(255, 77, 106, 0.06);
}

.admin-error {
  margin-top: 12px;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  color: #ff4d6a;
  min-height: 1.4em;
}

.admin-status {
  margin-top: 14px;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  color: #00e5ff;
  min-height: 1.4em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .buttons {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .glass-btn {
    width: 240px;
    justify-content: center;
    padding: 14px 24px;
  }

  .title {
    margin-bottom: 36px;
  }

  .footer-tag {
    margin-top: 40px;
    font-size: 8px;
  }
}
