/* Import font komik */
@font-face {
  font-family: 'komik';
  src: url('Komik.otf') format('opentype');
  font-display: swap;
}

/* Terapkan ke semua teks */
body, button, input, textarea, a, h1, h2, h3, h4, h5, h6, p, span, div {
  font-family: 'komik', sans-serif !important;
}

/* ================ GLOBAL VARIABLES ================ */
:root {
  /* Dark Theme (Default) */
  --primary: #00dfc4;
  --primary-light: #6bfae8;
  --primary-dark: #00a392;
  --secondary: #0a192f;
  --secondary-light: #172a45;
  --accent: #1f3a68;
  --text-primary: #e6f1ff;
  --text-secondary: #ccd6f6;
  --text-muted: #8892b0;
  --shadow: 0 4px 30px rgba(0, 223, 196, 0.15);
  --transition: all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
  --border-radius: 12px;
  --section-spacing: 5rem;
  --container-padding: 2rem;
  --card-spacing: 1.5rem;
  --element-radius: 12px;
}

[data-theme="light"] {
  --primary: #0077ff;
  --primary-light: #5da8ff;
  --primary-dark: #0055cc;
  --secondary: #ffffff;
  --secondary-light: #f5f7ff;
  --accent: #e1e8ff;
  --text-primary: #0a192f;
  --text-secondary: #465880;
  --text-muted: #6c7a9c;
  --shadow: 0 4px 30px rgba(0, 119, 255, 0.15);
}

/* ================ BASE STYLES ================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--secondary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: var(--transition);
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ================ NAVIGATION IMPROVEMENTS ================ */
.main-nav {
  padding: 1rem 5%;
  background-color: rgba(10, 25, 47, 0.95);
  backdrop-filter: blur(15px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 4px 30px rgba(0, 223, 196, 0.2);
  border-bottom: 1px solid rgba(0, 223, 196, 0.15);
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  padding: 0.5rem;
  border-radius: var(--border-radius);
}

.nav-logo:hover {
  background: rgba(0, 223, 196, 0.1);
  transform: translateY(-2px);
}

.nav-logo i {
  font-size: 1.8rem;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  background: rgba(10, 25, 47, 0.8);
  padding: 0.5rem;
  border-radius: 2rem;
  border: 1px solid rgba(0, 223, 196, 0.2);
  backdrop-filter: blur(10px);
}

.nav-link {
  padding: 0.7rem 1.5rem;
  border-radius: 2rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 223, 196, 0.2), transparent);
  transition: 0.5s;
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: rgba(0, 223, 196, 0.15);
  box-shadow: 0 4px 15px rgba(0, 223, 196, 0.2);
  transform: translateY(-2px);
}

.nav-link.active {
  background: var(--primary);
  color: var(--secondary);
  box-shadow: 0 4px 15px rgba(0, 223, 196, 0.3);
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--primary);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* ================ COMPONENTS ================ */
/* Buttons & Badges */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: var(--element-radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  border: none;
  outline: none;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--secondary);
  box-shadow: 0 4px 15px rgba(0, 223, 196, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 223, 196, 0.4);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

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

.btn-outline:hover {
  background: rgba(0, 223, 196, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 223, 196, 0.2);
}

.badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 500;
  background: rgba(0, 223, 196, 0.1);
  color: var(--primary);
  border: 1px solid rgba(0, 223, 196, 0.3);
}

/* Cards */
.card {
  background: var(--secondary-light);
  border-radius: var(--element-radius);
  padding: var(--card-spacing);
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 223, 196, 0.1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 223, 196, 0.05), transparent);
  transition: 0.5s;
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 223, 196, 0.15);
  border-color: rgba(0, 223, 196, 0.3);
}

/* ================ LAYOUT IMPROVEMENTS ================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: var(--section-spacing) 0;
  position: relative;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%, rgba(0, 223, 196, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* Improved Grid System */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Consistent Typography */
.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  color: var(--text-primary);
  text-align: center;
  width: 100%;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 2px;
}

.text-center {
  text-align: center;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

/* Footer Consistency */
footer {
  text-align: center;
  padding: 3rem var(--container-padding);
  background: var(--secondary);
  color: var(--text-muted);
  border-top: 1px solid rgba(0, 223, 196, 0.1);
  margin-top: var(--section-spacing);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

#live-clock {
  margin-top: 1rem;
  font-size: 0.9rem;
  display: inline-block;
  background: rgba(0, 223, 196, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  color: var(--primary);
  border: 1px solid rgba(0, 223, 196, 0.2);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* ================ RESPONSIVE DESIGN ================ */
@media (max-width: 1200px) {
  .container {
    max-width: 1000px;
  }
}

@media (max-width: 992px) {
  :root {
    --section-spacing: 4rem;
    --container-padding: 1.5rem;
  }
  
  .container {
    max-width: 800px;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  :root {
    --section-spacing: 3rem;
    --container-padding: 1rem;
    --card-spacing: 1.25rem;
  }
  
  .section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--secondary);
    flex-direction: column;
    padding: 1rem;
    border-radius: 0;
    border: none;
    border-top: 1px solid rgba(0, 223, 196, 0.2);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-link {
    border-radius: var(--border-radius);
    margin: 0.25rem 0;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  :root {
    --section-spacing: 2.5rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
}