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

:root {
  /* Enhanced Color Palette */
  --primary-color: #F46900;
  --primary-light: #FF8A4C;
  --primary-dark: #D55800;
  --secondary-color: #4ECDC4;
  --accent-color: #FFD166;
  --dark-color: #0a0a0a;
  --darker-color: #050505;
  --light-dark: #1a1a1a;
  --card-dark: #1E1E1E;
  --card-light: #2A2A2A;
  --card-hover: #333333;
  --text-light: #f0f0f0;
  --text-muted: #aaa;
  --text-dim: #777;
  --success-color: #4CAF50;
  --info-color: #2196F3;
  --warning-color: #FFC107;
  --danger-color: #F44336;
  
  /* Light mode colors */
  --light-bg: #f5f5f5;
  --light-card: #ffffff;
  --light-text: #333333;
  --light-text-muted: #666666;
  --light-border: rgba(0, 0, 0, 0.1);
  
  /* Transitions & Animations */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
  --transition-slow: all 0.5s ease;
  
  /* Spacing */
  --container-max-width: 1200px;
  --content-max-width: 800px;
  --section-gap: 3rem;
  --card-padding: 2rem;
  --border-radius: 16px;
  --border-radius-lg: 20px;
  
  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
  --shadow-primary: 0 8px 24px rgba(244, 105, 0, 0.3);
  --shadow-secondary: 0 8px 24px rgba(78, 205, 196, 0.2);
  
  /* Light mode shadows */
  --light-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
  --light-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
  --light-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.15);
}

body {
  font-family: 'Poppins', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--dark-color);
  color: var(--text-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light mode styles */
[data-theme="light"] body {
  background: var(--light-bg);
  color: var(--light-text);
}

/* Enhanced Animated Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(244, 105, 0, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(255, 209, 102, 0.05) 0%, transparent 40%);
  z-index: -1;
  pointer-events: none;
}

[data-theme="light"] body::before {
  background: 
    radial-gradient(circle at 20% 50%, rgba(244, 105, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(78, 205, 196, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(255, 209, 102, 0.05) 0%, transparent 40%);
}

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

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ================================
   LAYOUT CONTAINERS
   ================================ */

.app-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.app {
  width: 100%;
  max-width: var(--container-max-width);
  padding: 1.5rem;
  margin: 0 auto;
}

.content-wrapper {
  max-width: var(--content-max-width);
  margin: 0 auto;
  width: 100%;
}

/* ================================
   ENHANCED NAVIGATION
   ================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
  padding: 0.75rem 0;
  background: rgba(10, 10, 10, 0.95);
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
}

.navbar-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-color);
}

.navbar-logo img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.navbar-menu {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.navbar-menu a {
  color: var(--text-light);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

[data-theme="light"] .navbar-menu a {
  color: var(--light-text);
}

.navbar-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s;
}

.navbar-menu a:hover::after {
  width: 100%;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
}

[data-theme="light"] .navbar-toggle {
  color: var(--light-text);
}

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: var(--transition);
}

.theme-toggle:hover {
  color: var(--primary-color);
  background: rgba(244, 105, 0, 0.1);
}

[data-theme="light"] .theme-toggle {
  color: var(--light-text);
}

[data-theme="light"] .theme-toggle:hover {
  color: var(--primary-color);
  background: rgba(244, 105, 0, 0.1);
}

/* ================================
   ENHANCED HEADER
   ================================ */

.header {
  text-align: center;
  margin: 6rem 0 3rem;
  position: relative;
  padding-bottom: 1.5rem;
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.header-badge {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  border-radius: 30px;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.header h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.header p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  opacity: 0.85;
  color: var(--text-muted);
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

[data-theme="light"] .header p {
  color: var(--light-text-muted);
}

/* ================================
   ENHANCED BALANCE CARD
   ================================ */

.card-balance {
  background: linear-gradient(135deg, var(--card-dark), var(--card-light));
  border-radius: var(--border-radius-lg);
  padding: var(--card-padding);
  position: relative;
  overflow: hidden;
  margin-bottom: var(--section-gap);
  box-shadow: var(--shadow-lg), var(--shadow-primary);
  border: 1px solid rgba(255,255,255,0.08);
  transition: var(--transition);
}

[data-theme="light"] .card-balance {
  background: linear-gradient(135deg, var(--light-card), #f0f0f0);
  border: 1px solid var(--light-border);
  box-shadow: var(--light-shadow-lg);
}

.card-balance:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6), 0 15px 30px rgba(244, 105, 0, 0.3);
}

[data-theme="light"] .card-balance:hover {
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 15px 30px rgba(244, 105, 0, 0.2);
}

/* Enhanced Decorative elements */
.card-balance::before,
.card-balance::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.card-balance::before {
  top: -70px; 
  right: -70px;
  width: 250px; 
  height: 250px;
  background: radial-gradient(circle, rgba(244, 105, 0, 0.2) 0%, transparent 70%);
  animation: pulse 5s infinite alternate;
}

.card-balance::after {
  bottom: -50px; 
  left: -50px;
  width: 180px; 
  height: 180px;
  background: radial-gradient(circle, rgba(78, 205, 196, 0.15) 0%, transparent 70%);
  animation: pulse 5s infinite alternate-reverse;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.2; }
  100% { transform: scale(1.15); opacity: 0.35; }
}

.card-balance h2 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  position: relative;
  z-index: 1;
}

[data-theme="light"] .card-balance h2 {
  color: var(--light-text);
}

.card-balance .coins {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  opacity: 0.85;
  margin-bottom: 2rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

[data-theme="light"] .card-balance .coins {
  color: var(--light-text-muted);
}

.card-balance .actions {
  display: flex;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.card-balance .actions a {
  flex: 1;
  min-width: 160px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 14px;
  padding: 1.25rem 1.75rem;
  color: #fff;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  font-weight: 600;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-primary);
  transition: var(--transition);
  cursor: pointer;
}

.card-balance .actions a:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(244, 105, 0, 0.5);
}

.card-balance .actions a:active {
  transform: translateY(0);
  filter: brightness(0.95);
}

.card-balance .actions a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.card-balance .actions a:hover::before {
  transform: translateX(100%);
}

.cbox-wrapper {
  margin: 2.5rem 0;
  padding-top: 48px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--card-dark);
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
}

[data-theme="light"] .cbox-wrapper {
  background: var(--light-card);
  border: 1px solid var(--light-border);
  box-shadow: var(--light-shadow-lg);
}

.cbox-wrapper::before {
  content: '💬 ChitChat Skenpat';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(244, 105, 0, 0.9);
  color: white;
  padding: 0.75rem;
  font-weight: 600;
  text-align: center;
  z-index: 10;
}

/* ================================
   ENHANCED SECTIONS
   ================================ */

.section {
  margin-bottom: var(--section-gap);
  animation: fadeInUp 0.7s backwards;
}

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

.section:nth-child(3) { animation-delay: 0.1s; }
.section:nth-child(4) { animation-delay: 0.2s; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0 0.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-header h3 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-header h3 i {
  color: var(--primary-color);
  background: rgba(244, 105, 0, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-header a {
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: var(--primary-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  background: rgba(244, 105, 0, 0.1);
  transition: var(--transition);
}

.section-header a:hover {
  background: rgba(244, 105, 0, 0.2);
  color: var(--primary-light);
}

/* ================================
   ENHANCED GRID BUTTONS
   ================================ */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1.25rem;
}

.grid .btn {
  background: linear-gradient(135deg, var(--card-dark), var(--card-light));
  border-radius: var(--border-radius);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 140px;
}

[data-theme="light"] .grid .btn {
  background: linear-gradient(135deg, var(--light-card), #f0f0f0);
  border: 1px solid var(--light-border);
  box-shadow: var(--light-shadow-md);
}

.grid .btn:hover {
  background: linear-gradient(135deg, var(--card-hover), #3a3a3a);
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
  border-color: rgba(244, 105, 0, 0.3);
}

[data-theme="light"] .grid .btn:hover {
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.grid .btn:active {
  transform: translateY(0);
  filter: brightness(0.95);
}

.grid .btn .icon {
  font-size: clamp(2rem, 5vw, 2.5rem);
  display: block;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  transition: var(--transition);
  background: rgba(244, 105, 0, 0.1);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="light"] .grid .btn .icon {
  color: var(--light-text-muted);
}

.grid .btn:hover .icon {
  transform: scale(1.15);
  color: var(--primary-color);
  background: rgba(244, 105, 0, 0.2);
}

.grid .btn span {
  display: block;
  color: var(--text-light);
  font-size: clamp(0.9rem, 2vw, 1rem);
  font-weight: 600;
  line-height: 1.3;
}

[data-theme="light"] .grid .btn span {
  color: var(--light-text);
}

/* ================================
   ENHANCED VISI MISI SECTION
   ================================ */

.visi-misi {
  background: linear-gradient(135deg, var(--card-dark), var(--card-light));
  border-radius: var(--border-radius-lg);
  padding: var(--card-padding);
  margin-bottom: var(--section-gap);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.08);
  animation: fadeInUp 0.7s 0.3s backwards;
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .visi-misi {
  background: linear-gradient(135deg, var(--light-card), #f0f0f0);
  border: 1px solid var(--light-border);
  box-shadow: var(--light-shadow-lg);
}

.visi-misi::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  margin-bottom: 2rem;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--dark-color);
  border: 1px solid rgba(255,255,255,0.08);
}

[data-theme="light"] .video-container {
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  box-shadow: var(--light-shadow-md);
}

.video-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.visi-misi h2 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  display: inline-block;
  width: 100%;
}

.visi-misi h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.visi-misi h3 {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  margin: 2rem 0 1rem;
  font-weight: 600;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.visi-misi h3::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
  display: inline-block;
}

.visi-misi p, 
.visi-misi li {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  line-height: 1.8;
  margin-bottom: 1.2rem;
  color: var(--text-light);
}

[data-theme="light"] .visi-misi p, 
[data-theme="light"] .visi-misi li {
  color: var(--light-text);
}

.visi-misi ul {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.visi-misi li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
  transition: var(--transition-fast);
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem 1rem 1rem 2rem;
  border-radius: var(--border-radius);
  border-left: 3px solid transparent;
}

[data-theme="light"] .visi-misi li {
  background: rgba(0, 0, 0, 0.02);
}

.visi-misi li:hover {
  transform: translateX(5px);
  color: var(--primary-color);
  background: rgba(244, 105, 0, 0.05);
  border-left-color: var(--primary-color);
}

.visi-misi li::before {
  content: "▶";
  color: var(--primary-color);
  font-size: 1rem;
  position: absolute;
  left: 1rem;
  top: 1rem;
}

.visi-misi h6 {
  margin-top: 2rem;
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

[data-theme="light"] .visi-misi h6 {
  color: var(--light-text-muted);
  border-top: 1px solid var(--light-border);
}

/* ================================
   ENHANCED FOOTER
   ================================ */

.footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: clamp(0.9rem, 2vw, 1rem);
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 2rem;
  animation: fadeInUp 0.7s 0.4s backwards;
  background: rgba(10, 10, 10, 0.5);
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

[data-theme="light"] .footer {
  background: rgba(255, 255, 255, 0.5);
  border-top: 1px solid var(--light-border);
  color: var(--light-text-muted);
}

.footer a {
  color: var(--primary-color);
  font-weight: 600;
  position: relative;
}

.footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s;
}

.footer a:hover::after {
  width: 100%;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ================================
   ENHANCED FLOATING BUTTONS
   ================================ */

.fab,
.back-to-top {
  position: fixed;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 100;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.fab {
  bottom: 25px;
  right: 25px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-primary), var(--shadow-lg);
}

.fab::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: scale(0);
  transition: transform 0.5s;
}

.fab:hover::after {
  transform: scale(1);
  opacity: 0;
}

.back-to-top {
  bottom: 25px;
  left: 25px;
  background: rgba(30, 30, 30, 0.9);
  backdrop-filter: blur(10px);
  color: var(--primary-color);
  opacity: 0;
  visibility: hidden;
  border: 1px solid rgba(244, 105, 0, 0.3);
}

[data-theme="light"] .back-to-top {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(244, 105, 0, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--card-light);
  transform: translateY(-5px);
  border-color: var(--primary-color);
}

[data-theme="light"] .back-to-top:hover {
  background: rgba(255, 255, 255, 0.95);
}

/* ================================
   ENHANCED LOADING SCREEN
   ================================ */

.loader {
  position: fixed;
  inset: 0;
  background: var(--dark-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.5s, visibility 0.5s;
}

[data-theme="light"] .loader {
  background: var(--light-bg);
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-circle {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(244, 105, 0, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  position: relative;
}

.loader-circle::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: var(--secondary-color);
  animation: spin 1.5s linear infinite reverse;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================================
   MUSIC PLAYER MOBILE TWEAKS
   ================================ */
@media (max-width: 768px) {
  .soundcloud-player { flex-wrap: wrap; justify-content: center; }
  .player-artwork-info { width: 100%; justify-content: center; margin-bottom: 10px; }
  .player-controls-progress { width: 100%; order: 3; }
  .player-extras { width: 100%; justify-content: center; order: 2; margin-top: 5px; }
  .player-track-title { max-width: 200px; }
}

/* ================================
   ENHANCED RESPONSIVE BREAKPOINTS
   ================================ */

/* Small devices (landscape phones) */
@media (min-width: 576px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .card-balance .actions a {
    min-width: 180px;
  }
}

/* Medium devices (tablets) */
@media (min-width: 768px) {
  :root {
    --section-gap: 3.5rem;
    --card-padding: 2.5rem;
  }
  
  .app {
    padding: 2rem;
  }
  
  .header {
    margin: 7rem 0 4rem;
  }
  
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
  }
  
  .grid .btn {
    min-height: 160px;
  }
  
  .card-balance .actions {
    flex-wrap: nowrap;
  }
  
  .navbar-menu {
    display: flex !important;
  }
  
  .navbar-toggle {
    display: none !important;
  }
}

/* Large devices (desktops) */
@media (min-width: 992px) {
  :root {
    --section-gap: 4rem;
    --card-padding: 3rem;
  }
  
  .app {
    padding: 2.5rem;
  }
  
  .header {
    margin: 8rem 0 5rem;
  }
  
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 2rem;
  }
  
  .grid .btn {
    padding: 2rem 1.25rem;
    min-height: 180px;
  }
}

/* Extra large devices */
@media (min-width: 1200px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* Mobile Navigation */
@media (max-width: 767px) {
  .navbar-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 5rem 1rem 2rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 999; /* Di bawah navbar (1000) */
  }
  
  [data-theme="light"] .navbar-menu {
    background: rgba(255, 255, 255, 0.98);
  }

  /* Tampilkan menu saat aktif */
  .navbar-menu.active {
    transform: translateX(0);
  }

  /* Gaya untuk item menu di mobile */
  .navbar-menu li {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  .navbar-menu li a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s, color 0.2s;
  }
  
  [data-theme="light"] .navbar-menu li a {
    color: var(--light-text);
  }
  
  .navbar-menu li a:hover {
    color: var(--primary-color);
    background-color: rgba(244, 105, 0, 0.1);
  }
  
  /* Gaya untuk overlay */
  .menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998; /* Di bawah menu (999) */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }
  .menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  .navbar-toggle {
    display: block !important;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .card-balance:hover,
  .grid .btn:hover,
  .fab:hover,
  .back-to-top:hover {
    transform: none;
  }
  
  .grid .btn:active {
    transform: scale(0.98);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --text-light: #ffffff;
    --text-muted: #cccccc;
  }
  
  .card-balance,
  .grid .btn,
  .visi-misi {
    border: 2px solid rgba(255,255,255,0.3);
  }
}

/* Dark mode (already dark, but for systems) */
@media (prefers-color-scheme: dark) {
  /* Already optimized for dark */
}

/* Print styles */
@media print {
  body::before,
  .particles,
  .fab,
  .back-to-top,
  .loader,
  .navbar {
    display: none !important;
  }
  
  .card-balance,
  .grid .btn,
  .visi-misi {
    box-shadow: none;
    border: 1px solid #000;
  }
}

/* ================================
   NEW FEATURES: MODALS, NOTIFICATIONS, AND SEARCH
   ================================ */

/* Modal Styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.modal-content-wrapper {
  background: var(--card-dark);
  border-radius: 20px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.modal-overlay.visible .modal-content-wrapper {
  transform: translateY(0);
}

[data-theme="light"] .modal-content-wrapper {
  background: var(--light-card);
  border: 1px solid var(--light-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Notification Styles */
.notification {
  position: fixed;
  bottom: 100px;
  right: 25px;
  background: var(--card-dark);
  color: var(--text-light);
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary-color);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  z-index: 1000;
  max-width: 300px;
}

[data-theme="light"] .notification {
  background: var(--light-card);
  color: var(--light-text);
  box-shadow: var(--light-shadow-lg);
}

.notification.show {
  transform: translateX(0);
}

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

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

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

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

/* Search Bar Styles */
.search-container {
  position: relative;
  margin: 2rem 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.search-input {
  width: 100%;
  padding: 1rem 3rem 1rem 1.5rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--card-dark);
  color: var(--text-light);
  font-size: 1rem;
  transition: var(--transition);
}

[data-theme="light"] .search-input {
  background: var(--light-card);
  color: var(--light-text);
  border: 1px solid var(--light-border);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(244, 105, 0, 0.2);
}

.search-button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-color);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: var(--transition);
}

.search-button:hover {
  background: var(--primary-light);
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--dark-color);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: var(--light-bg);
}

/* Accessibility Improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
