/* ZenKrypta Staking - Main Styles (3D & Animated Edition) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables */
:root {
  --primary: #8B5CF6;
  --primary-dark: #6D28D9;
  --secondary: #10B981;
  --accent: #F59E0B;
  --dark: #0f172a;
  /* Lebih gelap untuk kontras 3D */
  --dark-light: #1e293b;
  --card-bg: rgba(30, 41, 59, 0.7);
  --gray: #94a3b8;
  --white: #FFFFFF;

  /* 3D Gradients */
  --gradient-primary: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
  --gradient-secondary: linear-gradient(135deg, #10B981 0%, #059669 100%);
  --gradient-accent: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  --gradient-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);

  /* Shadows for Depth */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-3d: 0 10px 30px -10px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-neon-primary: 0 0 20px rgba(139, 92, 246, 0.4);

  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  /* Bouncy transition */
  --sidebar-width: 260px;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  /* Modern Font */
  background-color: var(--dark);
  background-image:
    radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(245, 158, 11, 0.1) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  perspective: 1000px;
  /* Enable 3D space */
}

/* Animations */
@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px) rotateY(-10deg);
  }

  to {
    opacity: 1;
    transform: translateX(0) rotateY(0);
  }
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  70% {
    transform: scale(1.05);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- DASHBOARD LAYOUT --- */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar 3D Style */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 20px 0 50px rgba(0, 0, 0, 0.3);
  transform-style: preserve-3d;
}

.sidebar-header {
  padding: 2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(to right, #fff, #8B5CF6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
  letter-spacing: -1px;
}

.sidebar-menu {
  padding: 1rem;
  flex: 1;
  overflow-y: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: var(--gray);
  text-decoration: none;
  border-radius: 1rem;
  transition: var(--transition);
  margin-bottom: 0.75rem;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  transform: translateX(5px);
}

.menu-item.active {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
  transform: translateX(10px) scale(1.02);
}

.menu-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
}

/* Top Header */
.top-header {
  height: 90px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-title h2 {
  font-size: 1.8rem;
  margin: 0;
  background: linear-gradient(to right, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Page Content */
.page-content {
  padding: 2rem;
  flex: 1;
  perspective: 1000px;
  /* Essential for 3D cards */
}

/* 3D Glass Cards */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  /* Top lighting */
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-3d);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
  animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
  /* 3D Properties */
  transform-style: preserve-3d;
}

/* Stagger Animations */
.glass-card:nth-child(1) {
  animation-delay: 0.1s;
}

.glass-card:nth-child(2) {
  animation-delay: 0.2s;
}

.glass-card:nth-child(3) {
  animation-delay: 0.3s;
}

.glass-card:hover {
  transform: translateY(-10px) rotateX(2deg);
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  border-color: rgba(255, 255, 255, 0.2);
}

.glass-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
}

.glass-card:hover::after {
  opacity: 1;
  transform: scale(1);
}

.glass-card .table-responsive {
  box-shadow: none;
}

/* Balance Cards (3D Cubes style) */
.balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  perspective: 1000px;
}

.balance-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  padding: 2rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-3d);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  animation: slideInRight 0.5s backwards;
}

.balance-card:nth-child(1) {
  animation-delay: 0.1s;
  border-bottom: 4px solid var(--primary);
}

.balance-card:nth-child(2) {
  animation-delay: 0.2s;
  border-bottom: 4px solid var(--secondary);
}

.balance-card:nth-child(3) {
  animation-delay: 0.3s;
  border-bottom: 4px solid var(--accent);
}

.balance-card:hover {
  transform: translateY(-12px) scale(1.03);
  background: rgba(255, 255, 255, 0.08);
}

.balance-amount {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0.5rem 0;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.balance-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gray);
  font-weight: 600;
}

/* 3D Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  top: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn:active {
  top: 4px;
  box-shadow: none !important;
  transform: scale(0.98);
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 6px 0 #5b21b6, 0 10px 10px rgba(0, 0, 0, 0.3);
  /* 3D Border Bottom */
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #5b21b6, 0 15px 20px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: var(--white);
  box-shadow: 0 6px 0 #047857, 0 10px 10px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #047857, 0 15px 20px rgba(16, 185, 129, 0.4);
}

.btn-accent {
  background: var(--gradient-accent);
  color: var(--white);
  box-shadow: 0 6px 0 #b45309, 0 10px 10px rgba(0, 0, 0, 0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #b45309, 0 15px 20px rgba(245, 158, 11, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 0 rgba(255, 255, 255, 0.1);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
}

/* Packages 3D Grid */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  perspective: 1000px;
}

.package-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform-style: preserve-3d;
}

.package-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.package-card:hover {
  transform: translateY(-15px) rotateX(5deg);
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  border-color: var(--primary);
}

.package-card:hover::before {
  transform: scaleX(1);
}

.package-amount {
  font-size: 3rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

/* Table Styling */
.table-responsive {
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.2);
}

th {
  background: rgba(139, 92, 246, 0.1);
  color: var(--primary);
  padding: 1.5rem;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

td {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--gray);
  font-weight: 500;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--white);
}

/* LANDING PAGE SPECIFIC (Horizontal Nav & Hero) */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar Float Effect */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  height: 70px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  z-index: 1000;
  border-radius: 50px;
  /* Pill shape */
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--gray);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--white);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Hero Section 3D */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  position: relative;
  overflow: hidden;
}

/* Floating Elements Background */
.hero::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: var(--primary);
  filter: blur(150px);
  border-radius: 50%;
  top: 20%;
  left: 10%;
  opacity: 0.3;
  animation: float 6s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: var(--secondary);
  filter: blur(150px);
  border-radius: 50%;
  bottom: 10%;
  right: 10%;
  opacity: 0.2;
  animation: float 8s ease-in-out infinite reverse;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 10;
  animation: popIn 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-content h1 {
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 1.1;
  margin-bottom: 2rem;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Mobile Toggle */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Form Styles */
.form-input {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  color: var(--white);
  font-size: 1.1rem;
  transition: var(--transition);
}

.form-input:focus {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
  outline: none;
}

/* Badges */
.badge {
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.badge-primary {
  background: linear-gradient(135deg, #8B5CF6, #6D28D9);
  color: white;
}

.badge-secondary,
.badge-success {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
}

.badge-warning {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: white;
}

/* REFINED MOBILE RESPONSIVE STYLES */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 280px;
  }

  /* Navbar Mobile Reset */
  .navbar {
    top: 0;
    width: 100%;
    border-radius: 0;
    max-width: none;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Sidebar Mobile - Drawer Style */
  .sidebar {
    transform: translateX(-110%);
    opacity: 0;
    width: 85%;
    max-width: 300px;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
    opacity: 1;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  /* Ensure toggles are visible */
  .mobile-menu-btn {
    display: block;
  }

  .mobile-toggle {
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  }

  /* Adjust Page Content Padding */
  .page-content {
    padding: 1rem;
  }

  .top-header {
    height: 70px;
    padding: 0 1rem;
  }

  /* Typography Adjustments for Small Screens */
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .balance-amount {
    font-size: 2rem;
  }

  .package-amount {
    font-size: 2.5rem;
  }

  /* Navbar Mobile Dropdown */
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    padding: 2rem;
    flex-direction: column;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
    animation: slideInRight 0.3s forwards;
  }

  /* Sidebar Overlay - Ensure verified dark background for focus */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    /* Darker overlay */
    backdrop-filter: blur(5px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .sidebar-overlay.active {
    display: block;
    opacity: 1;
  }

  /* Prevent horizontal scroll on mobile */
  body {
    overflow-x: hidden;
  }
}

/* Extra small devices (Phones) */
@media (max-width: 480px) {
  .balance-card {
    padding: 1.5rem;
  }

  .balance-amount {
    font-size: 1.75rem;
  }

  .glass-card {
    padding: 1.25rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  /* Full width buttons for ease of use */

  /* Fix header title size on very small screens */
  .header-title h2 {
    font-size: 1.2rem;
  }
}