/* ==========================================================================
   GLOBALEDU - FUTURISTIC ISLAMIC THEME STYLESHEET
   ========================================================================== */

:root {
  --bg-primary: #0b132b;
  --bg-secondary: #1c2541;
  --bg-card: rgba(28, 37, 65, 0.7);
  --accent-cyan: #48cae4;
  --accent-blue: #0077b6;
  --accent-gold: #ffd166;
  --accent-emerald: #06d6a0;
  --accent-rose: #ef476f;
  --text-main: #f8f9fa;
  --text-muted: #a0aec0;
  --border-color: rgba(72, 202, 228, 0.2);
  --radius-lg: 16px;
  --radius-md: 10px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body.dark-theme {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 119, 182, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 214, 160, 0.1) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Header & Navigasi */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 19, 43, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
}

.brand-logo .highlight {
  color: var(--accent-cyan);
}

.brand-logo small {
  font-size: 0.75rem;
  color: var(--accent-gold);
  font-weight: 400;
  margin-left: 6px;
}

.main-nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.nav-link:hover:not(.disabled) {
  color: var(--accent-cyan);
  background: rgba(72, 202, 228, 0.1);
}

.nav-link.active {
  color: #fff;
  background: var(--accent-blue);
  box-shadow: 0 0 12px rgba(0, 119, 182, 0.5);
}

.nav-link.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Viewport Layout */
.app-viewport {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px;
  min-height: calc(100vh - 80px);
}

.page-section {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}

.page-section.active {
  display: block;
}

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

/* UI Cards & Buttons */
.hero-card, .materi-card, .sim-card, .form-card, .journal-card, .eval-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}

.btn {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(72, 202, 228, 0.4);
}

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

.btn-outline:hover {
  background: rgba(72, 202, 228, 0.1);
}

.btn-glow {
  box-shadow: 0 0 15px rgba(72, 202, 228, 0.3);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-success {
  background: var(--accent-emerald);
  color: #000;
}

/* Form Styles */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(11, 19, 43, 0.7);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(72, 202, 228, 0.3);
}

/* Grid Layouts */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Beranda Elements */
.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(255, 209, 102, 0.15);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.lead-text {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.welcome-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(72, 202, 228, 0.08);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.globe-icons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.icon-trigger {
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.icon-trigger:hover {
  background: rgba(72, 202, 228, 0.2);
  border-color: var(--accent-cyan);
}

/* Tabs Materi */
.materi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.progress-bar-container {
  width: 250px;
}

.progress-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-emerald);
  transition: width 0.3s ease;
}

.materi-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 18px;
  background: rgba(28, 37, 65, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
}

.tab-btn.active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-cyan);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Islamic Theme Elements */
.islamic-theme-card {
  border-color: var(--accent-gold);
}

.arabic-text {
  font-family: 'Amiri', serif;
  font-size: 1.6rem;
  text-align: right;
  direction: rtl;
  color: var(--accent-gold);
  line-height: 2.2;
  margin-bottom: 12px;
}

.quran-box {
  background: rgba(255, 209, 102, 0.05);
  border: 1px solid rgba(255, 209, 102, 0.3);
  padding: 20px;
  border-radius: var(--radius-md);
  margin: 16px 0;
}

.ishadie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.ishadie-item {
  background: rgba(11, 19, 43, 0.6);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-gold);
  font-size: 0.9rem;
}

/* Flow Diagram */
.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0;
  gap: 8px;
}

.flow-step {
  background: rgba(11, 19, 43, 0.8);
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: var(--radius-md);
  text-align: center;
  flex: 1;
}

.flow-step.highlight-step {
  border-color: var(--accent-gold);
  background: rgba(255, 209, 102, 0.1);
}

/* Modals & Tables */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-box.modal-xl {
  max-width: 1100px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.85rem;
}

.data-table th, .data-table td {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.data-table th {
  background: rgba(11, 19, 43, 0.8);
  color: var(--accent-cyan);
}

.score-result-card {
  text-align: center;
  padding: 32px;
  background: rgba(6, 214, 160, 0.1);
  border: 2px solid var(--accent-emerald);
  border-radius: var(--radius-lg);
  margin-top: 24px;
}

.final-score-badge {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-emerald);
  margin: 16px 0;
}

.restricted-notice {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.password-wrapper {
  position: relative;
}

.btn-toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

/* Responsif Mobile */
@media (max-width: 768px) {
  .grid-2col, .grid-4col {
    grid-template-columns: 1fr;
  }
  
  .flow-diagram {
    flex-direction: column;
  }
  
  .flow-arrow {
    transform: rotate(90deg);
  }
  
  .main-nav {
    display: none;
  }
}