/* ===== CSS VARIABLES ===== */
:root {
  --primary: #7b2fff;
  --primary-light: #a855f7;
  --neon-blue: #00d4ff;
  --neon-purple: #bf00ff;
  --neon-glow: #7b2fff;
  --accent: #00ff9f;
  --bg: #f0eafa;
  --bg2: #e8e0f5;
  --card-bg: rgba(255,255,255,0.85);
  --card-border: rgba(123,47,255,0.25);
  --text: #1a0a2e;
  --text-muted: #6b4fa0;
  --sidebar-bg: #1a0a2e;
  --sidebar-text: #e8d5ff;
  --header-bg: rgba(240,234,250,0.95);
  --running-bg: #1a0a2e;
  --running-text: #00d4ff;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Rajdhani', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }

/* ===== LOADING SCREEN ===== */
#loading-screen {
  position: fixed;
  inset: 0;
  background: #0d0020;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.6s ease;
}
#loading-screen.hidden { opacity: 0; pointer-events: none; }
.loading-content { text-align: center; width: 280px; }
.loading-bar-container {
  width: 100%;
  height: 4px;
  background: rgba(123,47,255,0.2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 20px;
}
.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
  border-radius: 2px;
  box-shadow: 0 0 10px var(--neon-blue);
  transition: width 0.3s ease;
}
.loading-text {
  font-family: 'Orbitron', monospace;
  color: var(--neon-blue);
  font-size: 1.1rem;
  letter-spacing: 3px;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

/* ===== RUNNING TEXT ===== */
.running-text-wrapper {
  background: var(--running-bg);
  overflow: hidden;
  white-space: nowrap;
  height: 32px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--neon-purple);
}
.running-text {
  display: inline-block;
  animation: marquee 20s linear infinite;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--running-text);
  letter-spacing: 1px;
}
@keyframes marquee { 0% { transform: translateX(100vw); } 100% { transform: translateX(-100%); } }

/* ===== HEADER ===== */
.main-header {
  position: sticky;
  top: 32px;
  z-index: 90;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  gap: 1rem;
}
.header-title {
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--primary), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: all 0.3s;
  box-shadow: 0 0 6px var(--primary);
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  background: var(--sidebar-bg);
  z-index: 200;
  transition: left 0.35s cubic-bezier(.4,0,.2,1);
  border-right: 1px solid rgba(123,47,255,0.3);
  overflow-y: auto;
  box-shadow: 4px 0 30px rgba(123,47,255,0.3);
}
.sidebar.open { left: 0; }
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(123,47,255,0.3);
}
.sidebar-logo {
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 1.2rem;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.close-sidebar {
  background: none;
  border: none;
  color: var(--sidebar-text);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.close-sidebar:hover { opacity: 1; }
.sidebar nav { padding: 1rem 0; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  color: var(--sidebar-text);
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.nav-link:hover, .nav-link.active {
  background: rgba(123,47,255,0.15);
  border-left-color: var(--neon-blue);
  color: var(--neon-blue);
}
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 190;
  display: none;
  backdrop-filter: blur(2px);
}
.overlay.show { display: block; }

/* ===== PAGE CONTENT ===== */
.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ===== HERO ===== */
.hero-section {
  text-align: center;
  padding: 3rem 1rem 2rem;
  position: relative;
}
.hero-avatar {
  position: relative;
  display: inline-block;
  margin-bottom: 1.25rem;
}
.avatar-img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  box-shadow: 0 0 30px rgba(123,47,255,0.5), 0 0 60px rgba(0,212,255,0.2);
  position: relative;
  z-index: 1;
}
.avatar-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(var(--neon-blue), var(--neon-purple), var(--accent), var(--neon-blue));
  animation: spin 4s linear infinite;
  filter: blur(3px);
  opacity: 0.7;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-name {
  font-family: 'Orbitron', monospace;
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}
.hero-tagline {
  color: var(--text-muted);
  font-size: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ===== CARD SECTION ===== */
.card-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 24px rgba(123,47,255,0.08);
  transition: box-shadow 0.3s;
}
.card-section:hover { box-shadow: 0 8px 40px rgba(123,47,255,0.15); }
.section-title {
  font-family: 'Orbitron', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--card-border);
  letter-spacing: 1px;
}
.about-text {
  line-height: 1.8;
  color: var(--text);
  font-size: 1.05rem;
}

/* ===== SOCIAL ===== */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.social-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s;
  border: 1px solid transparent;
}
.social-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.social-icon { font-size: 1.5rem; }
.social-name { font-family: 'Orbitron', monospace; font-size: 0.85rem; }
.social-sub { font-size: 0.8rem; opacity: 0.7; margin-top: 2px; }
.youtube { background: #fff0f0; border-color: #ff4444; color: #cc0000; }
.youtube:hover { background: #ff4444; color: white; }
.tiktok { background: #f0f0f0; border-color: #333; color: #111; }
.tiktok:hover { background: #111; color: white; }
.instagram { background: #fff0f8; border-color: #c13584; color: #c13584; }
.instagram:hover { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af); color: white; border-color: transparent; }
.telegram { background: #f0f8ff; border-color: #0088cc; color: #0088cc; }
.telegram:hover { background: #0088cc; color: white; }

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.skill-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.skill-icon { font-size: 1.2rem; }
.skill-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 90px;
}
.skill-bar {
  flex: 1;
  height: 6px;
  background: rgba(123,47,255,0.12);
  border-radius: 3px;
  overflow: hidden;
  min-width: 80px;
}
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--neon-blue));
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(123,47,255,0.5);
  animation: fillIn 1.5s ease forwards;
  width: 0 !important;
}
@keyframes fillIn { to { width: var(--target-width, 80%); } }

/* ===== FORM ===== */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--primary);
  margin-bottom: 0.4rem;
  letter-spacing: 1px;
}
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(123,47,255,0.05);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(123,47,255,0.2);
}
.form-textarea { min-height: 120px; resize: vertical; }
.btn-primary {
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--neon-blue));
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Orbitron', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(123,47,255,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(123,47,255,0.5);
}
.form-status { margin-top: 0.75rem; font-size: 0.95rem; }

/* ===== FOOTER ===== */
.main-footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--card-border);
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  margin-top: 2rem;
}

/* ===== CHAT PAGE ===== */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
}
.chat-welcome {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.6;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem 0;
}
.message {
  max-width: 80%;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  font-size: 0.97rem;
  line-height: 1.6;
}
.message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary), var(--neon-blue));
  color: white;
  border-bottom-right-radius: 4px;
}
.message.ai {
  align-self: flex-start;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.message.ai code {
  background: rgba(123,47,255,0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
}
.chat-input-area {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
}
.chat-input {
  flex: 1;
  padding: 0.85rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  outline: none;
  resize: none;
  transition: border-color 0.2s;
}
.chat-input:focus { border-color: var(--primary); }
.chat-send-btn {
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--neon-blue));
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.1rem;
  font-family: 'Orbitron', monospace;
  transition: all 0.2s;
}
.chat-send-btn:hover { transform: scale(1.05); }

/* ===== NEWS PAGE ===== */
.news-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.news-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow 0.3s;
}
.news-card:hover { box-shadow: 0 8px 32px rgba(123,47,255,0.15); }
.news-media img, .news-media video {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}
.news-body { padding: 1.5rem; }
.news-title {
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.news-content { color: var(--text); line-height: 1.7; font-size: 0.97rem; }
.news-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* ===== MUSIC PAGE ===== */
.music-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.music-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.music-title {
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 700;
}
.music-item audio {
  width: 100%;
  accent-color: var(--primary);
}

/* ===== SHARING CODE PAGE ===== */
.code-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.code-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
}
.code-header {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--card-border);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.code-title { font-family: 'Orbitron', monospace; font-size: 0.9rem; color: var(--primary); font-weight: 700; }
.code-author { font-size: 0.8rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.code-body {
  background: #0d0020;
  color: #e8d5ff;
  padding: 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  max-height: 300px;
  overflow-y: auto;
}
.code-actions {
  padding: 0.75rem 1.25rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.btn-sm {
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-sm:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ===== KHODAM ===== */
.khodam-center { text-align: center; }
.khodam-input-wrap { margin: 2rem 0; }
.khodam-result {
  margin-top: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(123,47,255,0.1), rgba(0,212,255,0.1));
  border: 1px solid var(--primary);
  border-radius: 16px;
  display: none;
}
.khodam-result.show { display: block; animation: fadeIn 0.5s ease; }
.khodam-name-display {
  font-family: 'Orbitron', monospace;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.khodam-desc { color: var(--text-muted); font-size: 0.95rem; }
@keyframes fadeIn { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: translateY(0); } }

/* ===== QNA ===== */
/* reuses form styles */

/* ===== DONASI ===== */
.donasi-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.qris-img { max-width: 280px; border-radius: 12px; border: 2px solid var(--primary); }
.ewallet-list { width: 100%; display: flex; flex-direction: column; gap: 0.75rem; }
.ewallet-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.97rem;
}
.ewallet-name { font-family: 'Orbitron', monospace; font-size: 0.85rem; color: var(--primary); }
.ewallet-number { font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; }

/* ===== ADMIN ===== */
.admin-section { margin-bottom: 2.5rem; }
.admin-grid { display: grid; gap: 1rem; }
.admin-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.25rem;
}
.admin-card h3 { font-family: 'Orbitron', monospace; color: var(--primary); font-size: 0.9rem; margin-bottom: 1rem; }
.btn-danger {
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  border: 1px solid #ff4466;
  background: transparent;
  color: #ff4466;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  cursor: pointer;
}
.btn-danger:hover { background: #ff4466; color: white; }

/* ===== PAGE TITLE ===== */
.page-title {
  font-family: 'Orbitron', monospace;
  font-size: 1.6rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .hero-name { font-size: 1.8rem; }
  .chat-container { height: calc(100vh - 110px); }
  .message { max-width: 92%; }
  .skills-grid { grid-template-columns: 1fr; }
  .social-grid { grid-template-columns: 1fr; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ===== MISC ===== */
.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 0.85rem 1.1rem;
}
.typing-dot {
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: bounce 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-8px); } }

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
}
