/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light theme colors */
    --primary-color: #8b5cf6;
    --secondary-color: #7c3aed;
    --nav-color: #8b5cf6;
    --success-color: #10b981;
    --warrior-gold: #d4af37;
    --danger-color: #ef4444;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --bg-card: #ffffff;
    --bg-blue: #1e293b;
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent-color: #e2e8f0;
  
 

    
    --border-color: #e2e8f0;
    --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.35s ease;
}

/* Dark theme */
[data-theme="dark"] {
    /* --bg-primary: #0f172a;

    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b; */
    --nav-color: #00f7ff;
     --primary-color: #8b5cf6;
  --secondary-color: #2575fc;
  --accent-color: #00f7ff;
  --danger-color: rgba(220, 38, 38, 0.20);

  --bg-primary: #0a0f1c;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --bg-card: #131a2d;
  --bg-blue: #131a2d;
--warrior-gold: #fbbf24;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
    
    --border-color: #334155;
    --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.header {
    background: var(--bg-card);
    /* border-bottom: 1px solid var(--border-color); */
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all var(--transition-normal);
   border-bottom: 2px solid var(--accent-color);
  box-shadow: 0 4px 20px rgba(0, 247, 255, 0.2);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    height: 50px;
    width: auto;
    transition: transform var(--transition-normal);
    /* filter: drop-shadow(0 0 22px var(--accent-color)); */
}

.logo-image:hover {
    transform: scale(1.05);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.nav-links ul{
  list-style: none;
  display: flex ;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  font-weight: 600;
  font-size: 1.1rem;
}
.nav-links ul li a{
  text-decoration: none;
  color: var(--nav-color);
  font-size: 1rem;
  font-weight: 400;
}


.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}
/* drop down */
.language-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-right: 1em;
  position: relative;
}

.language-switcher select {
  appearance: none; /* removes default browser styling */
  backdrop-filter: blur(10px);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  color: var(--accent-color);
  background: var(--bg-blue);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;

  /* gradient border trick */
  background-image: linear-gradient(
      rgba(18, 18, 28, 0.6), 
      rgba(18, 18, 28, 0.6)
    ),
    linear-gradient(120deg, var(--primary-color), var(--accent-color), var(--secondary-color));
  background-origin: border-box;
  background-clip: padding-box, border-box;

  /* subtle glow */
  box-shadow: 0 0 12px rgba(0, 247, 255, 0.2);
  transition: all 0.3s ease-in-out;
}

.language-switcher select:hover {
  box-shadow: 0 0 5px var(--accent-color), 0 0 5px rgba(0, 247, 255, 0.5);
  transform: translateY(-2px) scale(1.02);
}

/* 🔥 Animated border effect */
@keyframes neonBorderMove {
  0% {
    background-image: linear-gradient(
        rgba(18, 18, 28, 0.6),
        rgba(18, 18, 28, 0.6)
      ),
      linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--secondary-color));
  }
  50% {
    background-image: linear-gradient(
        rgba(18, 18, 28, 0.6),
        rgba(18, 18, 28, 0.6)
      ),
      linear-gradient(180deg, var(--accent-color), var(--secondary-color), var(--primary-color));
  }
  100% {
    background-image: linear-gradient(
        rgba(18, 18, 28, 0.6),
        rgba(18, 18, 28, 0.6)
      ),
      linear-gradient(360deg, var(--secondary-color), var(--primary-color), var(--accent-color));
  }
}

.language-switcher select:focus {
  outline: none;
  animation: neonBorderMove s linear infinite;
}

/* custom dropdown arrow */
.language-switcher::after {
  content: ">";
  position: absolute;
  right: 2rem;
  rotate: 90deg;
  font-size: 1rem;
  color: var(--accent-color);
  pointer-events: none;
  transition: transform 0.3s ease;
}
.language-switcher select:focus + .language-switcher::after {
  transform: rotate(180deg);
}

.theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--accent-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 5px var(--accent-color), 0 0 10px rgba(0, 247, 255, 0.4);
  transition: 0.3s ease;

}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
    transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 15px var(--accent-color), 0 0 30px rgba(0, 247, 255, 0.6);
}
.theme-toggle:focus,
.theme-toggle:active,
.language-switcher select:focus {
  outline: none;
}
/* Hide elements for mobile */
.nav-links, .language-switcher, .theme-toggle {
  display: flex;
}
.hamburger {
  display: none;
}

/* Hamburger button */
.hamburger {
  width: 30px;
  height: 25px;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--accent-color);
  border-radius: 2px;
  transition: 0.3s;
}

/* Mobile Menu (hidden initially) */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 70%;
  height: 100vh;
  background: var(--bg-card);
  box-shadow: -5px 0 15px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: right 0.3s ease;
  z-index: 999;
}
.mobile-menu ul {
  list-style: none;
  text-align: center;
  padding: 0;
}
.mobile-menu ul li {
  margin: 1rem 0;
}
.mobile-menu ul li a {
  color: var(--nav-color);
  font-size: 1.2rem;
  font-weight: 500;
  text-decoration: none;
}
.mobile-theme {
  margin-top: 2rem;
}

/* Active class for open drawer */
.mobile-menu.active {
  right: 0;
  z-index: 0;
}

/* Hamburger animation (X) */
.hamburger:focus,
.hamburger:active {
  outline: none;
}
.hamburger.active{
  z-index: 1;
}
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
  margin-bottom: 5px;
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Responsive Rules */
@media (max-width: 768px) {
  .nav-links,
  .language-switcher,
  .theme-toggle {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}


/* Hero Section */

    .hero {
    background: linear-gradient(
        135deg,
        var(--bg-primary),
        var(--bg-secondary),
        var(--bg-tertiary)
    );
    color: var(--text-primary);
    padding: 6rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    }

/* floating glowing blobs */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  animation: float 10s ease-in-out infinite;
}

.hero::before {
  top: -100px;
  left: -150px;
  background: var(--primary-color);
  opacity: 0.35;
}

.hero::after {
  bottom: -120px;
  right: -100px;
  background: var(--accent-color);
  opacity: 0.25;
  animation-delay: 3s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-30px); }
}

/* glassmorphic card */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  display: inline-block;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--border-color);
  position: relative;
  z-index: 2;
}

/* animated glowing border */
.glass-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-xl) + 2px);
  padding: 2px;
  background: linear-gradient(
    120deg,
    var(--primary-color),
    var(--accent-color),
    var(--secondary-color)
  );
  background-size: 300% 300%;
  animation: borderFlow 6s linear infinite;
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
          mask-composite: exclude;
  pointer-events: none;
}

@keyframes borderFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* text styles */
.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-primary);
  text-shadow: 0 0 6px rgba(0, 247, 255, 0.6);
  animation: slideInUp 0.8s ease-out;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.95;
  font-weight: 500;
  color: var(--text-secondary);
  text-shadow: 0 0 5px var(--primary-color);
  animation: slideInUp 0.8s ease-out 0.2s both;
}

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


/* Calculator Section */
.calculator-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.calculator-container {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-large);
    padding: 2rem;
    animation: slideInUp 0.8s ease-out;
}

.calculator-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--accent-color);
}

.calculator-header h3 {
  font-size: 2rem;
  font-weight: 700;
  background: var(--accent-color);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.reset-btn {
      background: rgba(var(--danger-color), 0.5);
    color: white;
    border: 1px solid var(--danger-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reset-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* Trade Container */
.trade-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: start;
}

.trade-side {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 2px solid transparent;
    transition: all var(--transition-normal);
}

.trade-side:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.offer-side {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(124, 58, 237, 0.05));
}

.request-side {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(251, 113, 133, 0.05));
}

.trade-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.trade-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


.add-items-btn {
  background: rgba(19, 26, 45, 0.8);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(0, 212, 255, 0.4);
  border-radius: var(--radius-lg);
  padding: 0.8rem 1.5rem;
  color: var(--accent-color);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.add-items-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 247, 255, 0.2), transparent);
  transition: left var(--transition-normal);
}
.add-items-btn:hover::before {
  left: 100%;
}


.trade-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Value Difference */
.value-difference {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.difference-container {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
    border: 2px solid rgba(79, 70, 229, 0.3);
    border-radius: var(--radius-xl);
    padding: 2rem 1.5rem;
    text-align: center;
    min-width: 180px;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

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

.difference-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.difference-value {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.difference-indicator {
    font-size: 1.5rem;
    color: var(--primary-color);
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.difference-container.positive {
    border-color: rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
}

.difference-container.positive::before {
    background: linear-gradient(90deg, var(--success-color), #059669);
}

.difference-container.positive .difference-value {
    color: var(--success-color);
}

.difference-container.positive .difference-indicator {
    color: var(--success-color);
}

.difference-container.negative {
    border-color: rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
}

.difference-container.negative::before {
    background: linear-gradient(90deg, var(--danger-color), #dc2626);
}

.difference-container.negative .difference-value {
    color: var(--danger-color);
}

.difference-container.negative .difference-indicator {
    color: var(--danger-color);
}
/* General Glass Look */
.calculator-container,
.trade-side,
.stat,
.difference-container {
    background: rgba(20, 20, 40, 0.45); /* translucent dark */
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.difference-container {
  transition: all 0.4s ease, transform 0.3s ease;
}

.difference-container.positive {
  animation: pulseGlow 1.2s ease-out;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0px rgba(16,185,129,0.6); transform: scale(1); }
  50% { box-shadow: 0 0 25px rgba(16,185,129,0.4); transform: scale(1.03); }
  100% { box-shadow: 0 0 0px rgba(16,185,129,0.6); transform: scale(1); }
}
.reset-btn {
    background: var(--danger-color);
    backdrop-filter: blur(10px);
    border: 1px solid var(--danger-color);
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.35);
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: rgba(220, 38, 38, 0.35);
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.5);
}

/* Stats look glossy */







/* Selected Items */
.selected-items {
  min-height: 200px;
  background: rgba(10, 15, 28, 0.4);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 2px dashed rgba(0, 212, 255, 0.3);
  transition: all var(--transition-normal);
}

.selected-items:hover {
  border-color: var(--accent-color);
  background: rgba(10, 15, 28, 0.6);
}

/* .empty-state {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem; 
  align-items: center;
  justify-items: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
} */
 .selected-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 per row */
  gap: 1rem;
}
.empty-state, .selected-item {
  border: 1px solid #555;
  border-radius: 5px;
  padding: 2rem;
  text-align: center;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.empty-state:hover, .selected-item:hover {
  border: 1px solid var(--accent-color);
  
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
  opacity: 0.5;
  animation: emptyFloat 3s ease-in-out infinite;
}

@keyframes emptyFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}


.add-items-empty-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.add-items-empty-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.selected-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-normal);
    position: relative;
    backdrop-filter: blur(10px);
}

.selected-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.item-image-container {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.item-details {
    text-align: center;
    flex: 1;
}

.item-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.item-price {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.item-value {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
}

.item-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}



.remove-item {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.remove-item:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
    overflow: hidden;
    box-shadow: var(--shadow-large);
    animation: slideInScale 0.3s ease-out;
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.close-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.close-modal:hover {
    background: var(--danger-color);
    color: white;
}

/* Search Container */
.search-container {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

#itemSearch {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-normal);
}

#itemSearch:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}



/* Items Grid */
.items-grid {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.item-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

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

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.item-card:hover::before {
    transform: scaleX(1);
}

.item-card.physical::before {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.item-card.permanent::before {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.item-card.gamepass::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.item-card.scroll::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.item-card-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    margin: 0 auto 0.75rem;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid var(--border-color);
    overflow: hidden;
}

.item-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.item-card-name {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.item-card-price {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.item-card-value {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* Trending Section */
.trending-section {
    padding: 4rem 0;
    background: var(--bg-card);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 3rem;
  background: var(--accent-color);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.trending-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: all var(--transition-normal);
    border: 2px solid rgba(0, 212, 255, 0.2);
    overflow: hidden;
}

.trending-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-large);
    border: 2px solid var(--accent-color);
}
.trending-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  transition: left var(--transition-slow);
}

.trending-item:hover::before {
    width: 100%;
  left: 0%;
}

.trending-item-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    border: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1rem;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.trending-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trending-item:hover .trending-item-icon {
    transform: scale(1.1);
    border-color: var(--accent-color);
}

.trending-item h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.trending-item p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Content Section */
.content-section {
  padding: 4rem 0;
  background: rgba(19, 26, 45, 0.4);
  backdrop-filter: blur(10px);
}

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

.content-card {
  background: rgba(19, 26, 45, 0.7);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 212, 255, 0.1);
  border: 2px solid rgba(0, 212, 255, 0.2);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.content-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  transition: left var(--transition-slow);
}

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

.content-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent-color);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 50px rgba(0, 212, 255, 0.2);
}

.content-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--warrior-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.content-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-weight: 400;
}

/* Footer */

/* Enhanced footer with glassmorphism */
.footer {
  background: rgba(10, 15, 28, 0.9);
  backdrop-filter: blur(20px);
  border-top: 2px solid rgba(0, 212, 255, 0.3);
  padding: 4rem 0 2rem;
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  animation: footerGlow 4s ease-in-out infinite;
}

@keyframes footerGlow {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

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

.footer-section h4 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--accent-color);
  /* text-shadow: 0 0 7px rgba(0, 247, 255, 0.5) */
}

.footer-section p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.8rem;
}

.footer-section ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-normal);
  position: relative;
}

.footer-section ul li a::before {
  content: "⚔";
  margin-right: 0.5rem;
  color: var(--warrior-gold);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.footer-section ul li a:hover::before {
  opacity: 1;
}

.footer-section ul li a:hover {
  color: var(--accent-color);
  text-shadow: 0 0 10px rgba(0, 247, 255, 0.5);
  transform: translateX(10px);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: rgba(19, 26, 45, 0.8);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(0, 212, 255, 0.3);
  border-radius: 50%;
  color: var(--accent-color);
  text-decoration: none;
  transition: all var(--transition-normal);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.social-links a:hover {
  background: rgba(19, 26, 45, 0.9);
  border-color: var(--accent-color);
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 247, 255, 0.4);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--text-muted);
}

.footer-bottom p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}


/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .trade-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .value-difference {
        order: -1;
    }
    
    .trade-stats {
        grid-template-columns: 1fr;
    }
    
    .calculator-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    /* .header-content {
        flex-direction: column;
        gap: 1rem;
    } */
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .category-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 50%;
    }
    
    .tab-btn:nth-child(1) {
        border-radius: var(--radius-md) 0 0 0;
    }
    
    .tab-btn:nth-child(2) {
        border-radius: 0 var(--radius-md) 0 0;
    }
    
    .tab-btn:nth-child(3) {
        border-radius: 0 0 0 var(--radius-md);
    }
    
    .tab-btn:nth-child(4) {
        border-radius: 0 0 var(--radius-md) 0;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }
    
    .calculator-container {
        padding: 1rem;
    }
    
    .trade-side {
        padding: 1rem;
    }
    
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .trending-grid {
        grid-template-columns: 1fr;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

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

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-muted: #666666;
    }
    
    [data-theme="dark"] {
        --border-color: #ffffff;
        --text-muted: #cccccc;
    }
}


.no-results{
    display: flex;
    align-items: center;
    gap: 2em;
    margin-left: 1em;
}
.lottie-sprinkles{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}