/* =========================================
   EasyStockMarkets - Premium Design System
   ========================================= */

:root {
  /* --- COLORS --- */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;

  --secondary: #0f172a;
  --secondary-light: #1e293b;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #f8fafc;

  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;

  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  /* --- SHADOWS --- */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* --- RADIUS --- */
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

/* ================= RESET & BASE ================= */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;

  /* Micro Holographic Background with White Geometric Vectors */
  background:
    url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='2' stroke-opacity='0.9'%3E%3Ccircle cx='15' cy='15' r='3' fill='%23ffffff'/%3E%3Ccircle cx='95' cy='45' r='4'/%3E%3Cpolygon points='55,25 61,33 49,33'/%3E%3Cpolygon points='25,85 30,78 35,85 30,92'/%3E%3Cpath d='M90 95 L98 103 M98 95 L90 103'/%3E%3Crect x='50' y='95' width='4' height='4' fill='%23ffffff'/%3E%3Cpath d='M35 50 L42 50'/%3E%3Cpath d='M100 15 A 6 6 0 0 1 108 23'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(circle at 15% 15%, rgba(120, 220, 255, 0.25), transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(255, 150, 200, 0.2), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(200, 150, 255, 0.15), transparent 50%),
    var(--bg-body);
  background-attachment: fixed;
  background-size: 120px 120px, 100% 100%, 100% 100%, 100% 100%, auto;

  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

ul {
  list-style: none;
}

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

/* ================= UTILITY CLASSES ================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.text-primary {
  color: var(--primary);
}

.text-muted {
  color: var(--text-muted);
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

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

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-4 {
  gap: 1rem;
}

.hidden {
  display: none !important;
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-size: 0.95rem;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: scale(0.96);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background-color: white;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-body);
  border-color: var(--text-muted);
}

.btn-secondary:active {
  transform: scale(0.96);
  background-color: var(--border-color);
}

/* ================= HEADER ================= */
.header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 70px;
  display: flex;
  align-items: center;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: -0.5px;
}

.logo-img {
  height: 40px;
  width: auto;
}

.logo span {
  color: var(--primary);
}

.navigation {
  display: flex;
  gap: 2rem;
}

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

.navigation a:hover,
.navigation a.active {
  color: var(--primary);
}

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

.navigation a:hover::after,
.navigation a.active::after {
  width: 100%;
}

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

/* ================= HERO SECTION ================= */
.hero {
  padding: 5rem 0;
  background: radial-gradient(circle at top right, var(--primary-light), transparent 40%),
    radial-gradient(circle at bottom left, #f1f5f9, transparent 40%);
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--secondary);
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* ================= CARDS & GRID ================= */
.grid-cols-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--secondary);
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.link-arrow {
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.link-arrow:hover {
  gap: 0.5rem;
  text-decoration: underline;
}

/* ================= FOOTER ================= */
.footer {
  background-color: var(--secondary);
  color: var(--text-light);
  margin-top: auto;
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.footer a {
  display: block;
  color: #94a3b8;
  margin-bottom: 0.75rem;
}

.footer a:hover {
  color: white;
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid var(--secondary-light);
  padding: 1.5rem 0;
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
}

/* ================= TABLES ================= */
.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  font-weight: 600;
  color: var(--secondary);
  background-color: #f8fafc;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.25rem;
  }

  .navigation {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 999;
  }

  .navigation.open {
    transform: translateY(0);
  }

  .menu-toggle {
    display: block;
  }

  .hero-buttons {
    flex-direction: column;
  }
}

/* ================= GLOBAL LOADER ================= */
#global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-body);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
}

#global-loader.show {
  opacity: 1;
  visibility: visible;
}

#global-loader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--primary-light);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1.5rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loader-text {
  color: var(--secondary);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  animation: pulseText 1.5s ease-in-out infinite;
}

@keyframes pulseText {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}