/* Floating Currency Bar Styles */
.floating-currency-bar {
  position: fixed;
  top: 100px;
  left: 0;
  z-index: 1200;
  background: linear-gradient(135deg, #232b39 80%, #ffd700 100%);
  color: #fff;
  border-radius: 0 16px 16px 0;
  box-shadow: 2px 4px 18px rgba(0,0,0,0.18);
  min-width: 220px;
  max-width: 320px;
  padding: 0.7rem 1.2rem 0.7rem 0.8rem;
  display: flex;
  align-items: center;
  transition: left 0.3s cubic-bezier(.4,2,.6,1), opacity 0.2s;
  font-size: 1rem;
}
.floating-currency-bar .currency-bar-content {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 1;
}
.floating-currency-bar .currency-icon {
  font-size: 1.2rem;
  margin-right: 0.2rem;
}
.floating-currency-bar .currency-label {
  font-weight: 600;
  opacity: 0.85;
}
.floating-currency-bar .currency-amount {
  font-weight: 700;
  margin-right: 0.5rem;
  color: #ffd700;
}
.floating-currency-bar .currency-divider {
  color: #aaa;
  margin: 0 0.5rem;
}
.currency-bar-hide {
  cursor: pointer;
  font-size: 1.1rem;
  margin-left: 0.5rem;
  color: #ffd700;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.currency-bar-hide:hover {
  opacity: 1;
}
.currency-bar-tab {
  position: fixed;
  top: 120px;
  left: 0;
  z-index: 1201;
  background: #232b39;
  color: #ffd700;
  border-radius: 0 12px 12px 0;
  box-shadow: 2px 4px 18px rgba(0,0,0,0.18);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s, left 0.3s cubic-bezier(.4,2,.6,1);
}
.currency-bar-tab:hover {
  opacity: 1;
}
/* Hide user-balance bar for guests (shop page) */
body.guest .user-balance,
body.guest .user-balance.logged-in-only,
body.guest .shop-header .user-balance,
body.guest .shop-header .balance-item,
body.guest .currency-dropdown,
body.guest .currency-row {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}
/* 1. Theme variables & font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

:root {
  --bg-dark: #0b121b;
  --bg-panel: #1c2733;
  --accent-blue: #66c0f4;
  --text-light: #c8d1e0;
  --shadow: rgba(0, 0, 0, 0.5);
  --border-radius: 6px;
  --transition: 0.3s ease;

  /* New variables for giveaways and modern components */
  --primary-color: #66c0f4;
  --primary-hover: #5ab6e8;
  --primary-bg: rgba(102, 192, 244, 0.1);
  --card-bg: #1c2733;
  --card-bg-secondary: #1a2733;
  --border-color: #2a3441;
  --text-color: #c8d1e0;
  --text-secondary: #8b98a8;
  --success-color: #4caf50;
  --success-hover: #45a049;
  --success-bg: rgba(76, 175, 80, 0.1);
  --error-color: #f44336;
  --error-bg: rgba(244, 67, 54, 0.1);
  --warning-color: #ff9800;
  --warning-bg: rgba(255, 152, 0, 0.1);
  --info-color: #2196f3;
  --info-bg: rgba(33, 150, 243, 0.1);
  --accent-color: #9c27b0;

  /* Additional variables for search and cards */
  --primary-light: #7bc3f0;
}

/* reset & base */
* { margin:0; padding:0; box-sizing: border-box; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.5;
  padding-top: 80px; /* Updated to match the new header height */
  position: relative;
  overflow-x: hidden;
}

/* Custom Scrollbar Styling */
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(66, 192, 244, 0.4) transparent;
}

/* Chrome, Safari, Edge */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(66, 192, 244, 0.4);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(66, 192, 244, 0.6);
  background-clip: padding-box;
}

/* Slightly off-color background for all pages except index */
.alt-bg {
  background: #181d26 !important; /* A shade between navbar and panel */
}

/* Modern Space Background - DISABLED */

@keyframes spaceFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    filter: hue-rotate(0deg);
  }
  25% {
    transform: translate(20px, -30px) scale(1.02);
    filter: hue-rotate(90deg);
  }
  50% {
    transform: translate(-10px, 20px) scale(0.98);
    filter: hue-rotate(180deg);
  }
  75% {
    transform: translate(30px, 10px) scale(1.01);
    filter: hue-rotate(270deg);
  }
}

@keyframes starsFloat {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -20px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 40px) rotate(240deg);
  }
  100% {
    transform: translate(0, 0) rotate(360deg);
  }
}
a { text-decoration: none; color: #66c0f4; }
a:hover { color: #fff; }

/* 2. Header & nav */
header {
  background: linear-gradient(90deg, #171a21, #0f131b);
  box-shadow: 0 2px 8px var(--shadow);
  padding: 0.75rem 1rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 80px; /* Increased from 70px to 80px */
  z-index: 9999;
}

/* Main navbar container */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 80px; /* Increased from 70px to 80px */
}

/* Brand logo */
.nav-brand {
  font-size: 1.2rem;
  font-weight: 700;
  margin-right: 2rem;
}

.nav-brand a {
  color: var(--accent-blue);
  text-decoration: none;
}

/* Left side navigation links */
.nav-links {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
}

.nav-links a {
  position: relative;
  padding: .5rem 0;
  color: var(--text-light);
  font-weight: 600;
  transition: color var(--transition);
  text-decoration: none;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-blue);
  transition: width var(--transition), left var(--transition);
}

.nav-links a:hover, .nav-links a.active {
  color: #fff;
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
  left: 0;
}

/* Right side social and user items */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Social navigation with icons */
.nav-social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.social-item {
  position: relative;
}

.social-icon {
  font-size: 1.2rem;
  color: var(--text-light);
  padding: 0.5rem;
  cursor: pointer;
  transition: color var(--transition);
}

.social-icon:hover {
  color: #fff;
}

/* Hide notification badge by default, only show via JS if needed */
.notification-badge {
  display: none;
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--error-color);
  color: white;
  border-radius: 9px;
  min-width: 18px;
  height: 18px;
  font-size: 0.7rem;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  padding: 0 4px;
  font-weight: bold;
}

/* Dropdown menus */
.social-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  min-width: 300px;
  max-width: 400px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1001;
  transition: all 0.2s ease;
  opacity: 0;
  transform: translateY(-10px);
}

/* Arrow for dropdown */
.social-dropdown:before {
  content: '';
  position: absolute;
  top: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: var(--bg-panel);
  transform: rotate(45deg);
  border-top: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
}

.social-dropdown.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Dropdown item styling */
.dropdown-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: rgba(255,255,255,0.05);
}

.dropdown-item.unread {
  background-color: rgba(102, 192, 244, 0.05);
}

.dropdown-item .item-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dropdown-item .item-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
}

.dropdown-item .item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-item .item-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  color: var(--accent-blue);
}

.dropdown-item .item-details {
  flex: 1;
}

.dropdown-item .item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.dropdown-item .item-name {
  font-weight: 600;
  color: var(--text-light);
}

.dropdown-item .item-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.dropdown-item .item-message {
  color: var(--text-secondary);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.dropdown-item .item-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.dropdown-item .accept-button {
  background-color: var(--success-color);
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

.dropdown-item .reject-button {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--text-secondary);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

.dropdown-item .accept-button:hover {
  background-color: var(--success-hover);
}

.dropdown-item .reject-button:hover {
  background-color: rgba(255,255,255,0.05);
}

/* Empty state and loading styles */
.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.loading-spinner {
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
}

/* Fade out animation */
.fade-out {
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.dropdown-header .view-all {
  font-size: 0.8rem;
  color: var(--accent-blue);
}

.dropdown-content {
  padding: 0;
}

.dropdown-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition);
  cursor: pointer;
}

.dropdown-item:hover {
  background: rgba(255,255,255,0.05);
}

.dropdown-item:last-child {
  border-bottom: none;
}

/* User search */
.user-search {
  position: relative;
}

.search-input {
  padding: 0.4rem 0.8rem;
  padding-left: 2rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-light);
  font-size: 0.85rem;
  width: 180px;
  outline: none;
  transition: width var(--transition), box-shadow var(--transition);
}

.search-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.search-input:focus {
  width: 220px;
  box-shadow: 0 0 0 2px rgba(102, 192, 244, 0.3);
}

.search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1001;
  margin-top: 0.5rem;
}

.search-results.show {
  display: block;
}

/* User profile dropdown */
.nav-auth {
  position: relative;
  display: flex;
  align-items: center;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: var(--border-radius);
  transition: background var(--transition);
}

.user-info:hover {
  background: rgba(255,255,255,0.05);
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-name {
  font-weight: 600;
  color: var(--text-light);
}

.user-currencies {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 15px;
}

.currency-item {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: default;
  display: flex;
  align-items: center;
  position: relative;
}

.currency-item:before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
}

.user-points {
  color: #ffcc00;
}
.user-points:before {
  background-color: #ffcc00;
}

.user-echoes {
  color: #66c0f4;
}
.user-echoes:before {
  background-color: #66c0f4;
}

.user-shards {
  color: #8e44ad;
}
.user-shards:before {
  background-color: #8e44ad;
}

.user-keys {
  color: #2ecc71;
}
.user-keys:before {
  background-color: #2ecc71;
}

.user-flux {
  color: #e74c3c;
}
.user-flux:before {
  background-color: #e74c3c;
}

/* Mobile navigation */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1000;
}

.hamburger-icon {
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  position: relative;
  transition: all 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  transition: all 0.3s ease;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

.hamburger.active .hamburger-icon {
  background: transparent;
}

.hamburger.active .hamburger-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.hamburger.active .hamburger-icon::after {
  transform: rotate(-45deg);
  top: 0;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 80px; /* Updated to match the new header height */
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-panel);
  z-index: 999;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.mobile-nav.open {
  transform: translateY(0);
  display: flex;
}

.mobile-nav-content {
  padding: 1rem;
  overflow-y: auto;
}

.mobile-nav-links a {
  display: block;
  padding: 1rem;
  color: var(--text-light);
  border-bottom: 1px solid var(--border-color);
  font-weight: 500;
}

.mobile-nav-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.mobile-social-item {
  flex: 1;
  min-width: 120px;
  padding: 1rem;
  background: rgba(255,255,255,0.05);
  border-radius: var(--border-radius);
  text-align: center;
}

.mobile-social-icon {
  font-size: 1.5rem;
  color: var(--accent-blue);
  margin-bottom: 0.5rem;
}

@media (max-width: 992px) {
  .search-input {
    width: 150px;
  }

  .search-input:focus {
    width: 180px;
  }

  .nav-links {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links,
  .nav-social,
  .user-search {
    display: none;
  }

  .navbar {
    justify-content: space-between;
  }

  .nav-right {
    gap: 0.5rem;
  }

  .auth-button {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }

  .user-info {
    padding: 0.3rem;
  }

  .user-info .user-name {
    display: none;
  }
}

/* container */
.container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* section titles */
h1 {
  margin-bottom: 1rem;
  font-size: 2rem;
  color: #66c0f4;
}

/* cards grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px,1fr));
  gap: 1.5rem;
}

/* 3. Card hover effect */
.card {
  background: var(--bg-panel);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 12px var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 20px var(--shadow);
}

.card img {
  width: 100%;
  display: block;
  border-bottom: 1px solid #2a363f;
}
.card .info {
  padding: .75rem;
}
.card .info h3 {
  margin-bottom: .5rem;
  font-size: 1.1rem;
  color: #66c0f4;
}
.card .info p {
  font-size: .9rem;
}

/* 4. Button CTA */
.button {
  display: inline-block;
  padding: .6rem 1.2rem;
  margin-top: .5rem;
  background: var(--accent-blue);
  color: #fff;
  border-radius: var(--border-radius);
  text-transform: uppercase;
  font-size: .9rem;
  letter-spacing: .5px;
  transition: background var(--transition);
}

.button:hover {
  background: #4a99d9;
}

/* Light blue giveaway button highlight */
.button.giveaway-highlight {
  background: linear-gradient(135deg, #87CEEB, #4682B4);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(70, 130, 180, 0.3);
  font-weight: 600;
}

.button.giveaway-highlight:hover {
  background: linear-gradient(135deg, #4682B4, #87CEEB);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(70, 130, 180, 0.4);
}

.button.giveaway-highlight:active {
  transform: translateY(0);
}

/* 5. Entrance animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.container > * {
  animation: fadeInUp 0.6s ease both;
}

/* Friends Page Styling */
.friends-container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.friends-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.friends-tab {
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  font-weight: 500;
}

.friends-tab:hover {
  color: var(--text-light);
}

.friends-tab.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

.friends-content {
  background: var(--bg-panel);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease forwards;
}

.friends-search {
  margin-bottom: 2rem;
  position: relative;
}

.friends-search input {
  width: 100%;
  max-width: 400px;
  padding: 1rem;
  padding-left: 2.5rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-light);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.friends-search input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(102, 192, 244, 0.2);
  outline: none;
}

.friends-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.friend-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.friend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--bg-dark);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: transform var(--transition), box-shadow var(--transition);
}

.friend-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.friend-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.friend-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-panel);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  overflow: hidden;
  border: 2px solid var(--border-color);
}

.friend-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-details h3 {
  margin: 0 0 0.5rem 0;
  color: var(--text-light);
  font-size: 1rem;
}

.friend-details p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.friend-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-friend {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.btn-accept {
  background: var(--success-color);
  color: white;
}

.btn-accept:hover {
  background: var(--success-hover);
}

.btn-decline, .btn-remove {
  background: var(--error-color);
  color: white;
}

.btn-decline:hover, .btn-remove:hover {
  background: #e53935;
}

.btn-message {
  background: var(--accent-blue);
  color: white;
}

.btn-message:hover {
  background: var(--primary-hover);
}

.btn-add {
  background: var(--accent-blue);
  color: white;
}

.btn-add:hover {
  background: var(--primary-hover);
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-state p {
  font-size: 1rem;
  max-width: 300px;
  margin: 0 auto;
}

.search-results {
  margin-top: 1rem;
}

.conversation-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-dark);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-bottom: 0.75rem;
}

.conversation-item:hover {
  background: rgba(255,255,255,0.05);
}

.conversation-item .friend-avatar {
  width: 40px;
  height: 40px;
}

.conversation-info {
  flex: 1;
}

.conversation-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.conversation-name {
  font-weight: 600;
  color: var(--text-light);
}

.conversation-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.conversation-preview {
  color: var(--text-secondary);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.unread-badge {
  background: var(--accent-blue);
  color: white;
  border-radius: 12px;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  font-weight: bold;
  margin-left: 0.5rem;
}

@media (max-width: 768px) {
  .friends-container {
    padding: 1rem;
  }

  .friends-tabs {
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    scrollbar-width: none;
  }

  .friends-tabs::-webkit-scrollbar {
    display: none;
  }

  .friends-tab {
    padding: 0.75rem 1rem;
    white-space: nowrap;
  }

  .friends-content {
    padding: 1.5rem;
  }

  .friend-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .friend-info {
    margin-bottom: 1rem;
    width: 100%;
  }

  .friend-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .btn-friend {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}

/* 6. About page styling */
.about-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    margin-bottom: 3rem;
}

.about-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.about-header .subtitle {
    margin: 0 0 1.5rem 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.about-card {
  background: var(--bg-panel);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: 0 4px 12px var(--shadow);
}

.about-card h3 {
  margin-bottom: 1rem;
}

.about-card p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.social-links {
  background: var(--bg-panel);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: 0 4px 12px var(--shadow);
  text-align: center;
}

.social-links strong {
  color: var(--accent-blue);
}

.social-links a {
  font-weight: 600;
  transition: color var(--transition);
}

/* 7. Hero Section */
.hero {
  position: relative;
  height: 80vh;
  min-height: 600px;
  background: transparent;
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Creates parallax effect */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 2rem;
}

.floating-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 400;
  font-family: 'Georgia', 'Times New Roman', serif;
  color: var(--text-light);
  text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.8);
  margin-bottom: 2rem;
  line-height: 1.4;
  animation: floatTitle 6s ease-in-out infinite;
  opacity: 1;
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
  animation-fill-mode: forwards;
  animation-delay: 0.5s;
  font-style: italic;
}

@keyframes floatTitle {
  0%, 100% {
    transform: translateY(0px);
    opacity: 1;
  }
  50% {
    transform: translateY(-10px);
  }
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: nowrap;
  opacity: 0;
  animation: fadeInUp 1s ease both;
  animation-delay: 1.5s;
}

.hero-btn {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(102, 192, 244, 0.3);
  transform: translateY(0);
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 192, 244, 0.4);
}

/* Shiny glass effect for hero buttons */
.shiny-glass {
  position: relative;
  background: rgba(102, 192, 244, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(102, 192, 244, 0.3);
  overflow: hidden;
}

.shiny-glass::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent,
    transparent
  );
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.shiny-glass:hover::before {
  animation: glass-shine 0.8s ease-in-out;
}

.shiny-glass::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 50%,
    rgba(102, 192, 244, 0.1) 100%
  );
  pointer-events: none;
}

@keyframes glass-shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
    opacity: 0;
  }
}

.hero-btn.secondary {
  background: rgba(102, 192, 244, 0.05);
  border: 2px solid rgba(102, 192, 244, 0.3);
  color: var(--accent-blue);
}

.hero-btn.secondary:hover {
  background: rgba(102, 192, 244, 0.15);
  border-color: var(--accent-blue);
}

/* Responsive adjustments for hero buttons */
@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-btn {
    width: 100%;
    max-width: 250px;
    text-align: center;
  }
}

/* 8. Stats Section - Softer Design Matching Site Colors */
.home-stats-grid {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center;
  align-items: stretch;
  margin: 0 auto;
  width: 100%;
  max-width: 900px;
  padding: 0 1rem;
  gap: 1.5rem;
  position: relative;
  z-index: 3000; /* ensure visible above hero/overlays */
  flex-wrap: wrap !important;
}

.stat-card {
  background: linear-gradient(135deg,
    rgba(28, 39, 51, 0.5) 0%,
    rgba(28, 39, 51, 0.8) 50%,
    rgba(28, 39, 51, 0.5) 100%
  ) !important;
  border: 2px solid rgba(102, 192, 244, 0.4) !important;
  border-radius: 12px;
  padding: 2rem 1rem;
  flex: 1 1 auto;
  min-width: 200px;
  max-width: 280px;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  min-height: 120px;
  backdrop-filter: blur(10px);
  transform-origin: center;
  z-index: 1;
  visibility: visible !important;
  opacity: 1 !important;
}

.stat-card:hover {
  background: var(--bg-panel);
  border-color: var(--accent-blue);
  transform: translateY(-8px) scale(1.05);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 8px 25px rgba(102, 192, 244, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 10;
  backdrop-filter: none;
}

.stat-card h3 {
  color: #a0aec0 !important;
  margin-bottom: 0.8rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  z-index: 2;
  opacity: 1 !important;
  transition: all 0.4s ease;
  visibility: visible !important;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  color: #4facfe !important;
  margin: 0;
  text-shadow: 0 0 20px rgba(79, 172, 254, 0.5) !important;
  letter-spacing: -0.02em;
  line-height: 1;
  position: relative;
  z-index: 2;
  transition: all 0.4s ease;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Smooth enlargement effect on hover */
.stat-card:hover .stat-number {
  color: var(--accent-blue);
  text-shadow:
    0 0 25px rgba(var(--accent-blue-rgb), 0.4),
    0 0 40px rgba(var(--accent-blue-rgb), 0.2);
  transform: scale(1.15);
  transition: all 0.4s ease;
}

.stat-card:hover h3 {
  color: var(--text-primary);
  transform: scale(1.05);
  transition: all 0.4s ease;
}

/* Animated pixel particles effect */
.stat-card::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: var(--accent-blue);
  border-radius: 1px;
  opacity: 0;
  pointer-events: none;
  box-shadow:
    /* Create multiple pixel particles at different positions */
    0 0 0 0 var(--accent-blue),
    -20px -15px 0 0 var(--accent-blue),
    20px -10px 0 0 var(--accent-blue),
    -15px 15px 0 0 var(--accent-blue),
    25px 20px 0 0 var(--accent-blue),
    -25px -25px 0 0 var(--accent-blue),
    30px -20px 0 0 var(--accent-blue),
    -30px 10px 0 0 var(--accent-blue),
    15px -25px 0 0 var(--accent-blue),
    -10px 25px 0 0 var(--accent-blue),
    35px 5px 0 0 var(--accent-blue),
    -35px -5px 0 0 var(--accent-blue);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 1px;
  opacity: 0;
  pointer-events: none;
  box-shadow:
    /* Secondary smaller white pixels for variety */
    10px -30px 0 0 rgba(255, 255, 255, 0.6),
    -18px 8px 0 0 rgba(255, 255, 255, 0.7),
    22px 12px 0 0 rgba(255, 255, 255, 0.5),
    -12px -18px 0 0 rgba(255, 255, 255, 0.8),
    28px -8px 0 0 rgba(255, 255, 255, 0.6),
    -28px 18px 0 0 rgba(255, 255, 255, 0.7),
    8px 28px 0 0 rgba(255, 255, 255, 0.5),
    -22px -12px 0 0 rgba(255, 255, 255, 0.6);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

.stat-card:hover::before {
  opacity: 1;
  animation: pixelFloat 2s ease-out infinite;
}

.stat-card:hover::after {
  opacity: 1;
  animation: pixelFloat 2.5s ease-out infinite 0.3s;
}

@keyframes pixelFloat {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  15% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
    box-shadow:
      0 -40px 0 0 transparent,
      -40px -35px 0 0 transparent,
      40px -30px 0 0 transparent,
      -35px 35px 0 0 transparent,
      45px 40px 0 0 transparent,
      -45px -45px 0 0 transparent,
      50px -40px 0 0 transparent,
      -50px 30px 0 0 transparent,
      35px -45px 0 0 transparent,
      -30px 45px 0 0 transparent,
      55px 25px 0 0 transparent,
      -55px -25px 0 0 transparent;
  }
}

.stat-card {
  position: relative; /* Ensure stat card is positioned relative for absolute children */
}

/* Responsive design */
@media (max-width: 768px) {
  .hero {
    height: 55vh;
    min-height: 360px;
  }
  .home-stats-grid {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
    gap: 1rem;
    position: relative;
    z-index: 2; /* ensure stats stay above footer background on mobile */
  }
  .stat-card {
    border-radius: 12px;
    padding: 1rem;
    min-height: auto;
  }
  footer {
    padding: 2rem 1rem 1rem 1rem;
  }
}

/* 9. Forum Styles */
.forum-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: var(--card-bg);
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.forum-header h1 {
  margin: 0;
  color: var(--primary-color);
}

.forum-header .user-stats {
  display: flex;
  gap: 20px;
  font-size: 16px;
}

.quick-actions {
  margin-bottom: 30px;
  padding: 20px;
  background: var(--card-bg);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  text-align: center;
}

.quick-actions .button {
  margin: 0 10px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* Forum category card refresh */
.category-card {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}
.category-card .category-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  flex: 0 0 56px;
}
.category-card .category-content h3 {
  margin: 0 0 6px 0;
}
.category-card .category-content p {
  margin: 0 0 10px 0;
}
.category-card .category-stats {
  display: flex;
  gap: 8px;
}
.category-card .category-stats .chip {
  padding: 4px 10px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
}


.category-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
  border-color: var(--primary-color);
}

.category-icon {
  font-size: 2.5em;
  margin-bottom: 15px;
}

.category-card h3 {
  margin: 0 0 10px 0;
  color: var(--primary-color);
}

.category-card p {
  margin: 0 0 15px 0;
  color: var(--text-muted);
}

.category-stats {
  display: flex;
  justify-content: space-around;
  font-size: 14px;
  color: var(--text-muted);
}

/* Topics Container & Cards */
.topics-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.topic-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.topic-card:hover {
  background: rgba(139, 69, 19, 0.1);
  border-color: var(--primary-color);
  transform: translateX(5px);
}

.topic-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.topic-card .topic-content {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 0;
}

.topic-card h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: var(--primary-color);
  font-weight: 600;
}

.topic-card .topic-meta {
  display: flex;
  gap: 15px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.topic-card .topic-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.topic-card .topic-meta i {
  font-size: 12px;
  opacity: 0.7;
}

.topic-arrow {
  color: var(--text-muted);
  font-size: 20px;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.topic-card:hover .topic-arrow {
  opacity: 1;
  transform: translateX(5px);
}

.no-topics {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.no-topics i {
  display: block;
  margin-bottom: 16px;
}

.no-topics p {
  margin-bottom: 20px;
  font-size: 16px;
}

.topic-author {
  color: var(--primary-color) !important;
  font-weight: 500;
}

.topic-replies {
  color: #00d9ff !important;
}

.topic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 20px;
  background: var(--card-bg);
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.topics-list {
  background: var(--card-bg);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.topic-item {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.topic-item:hover {
  background: rgba(139, 69, 19, 0.1);
}

.topic-item:last-child {
  border-bottom: none;
}

.topic-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.topic-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.topic-content {
  background: var(--card-bg);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.original-post,
.post-item {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.original-post {
  background: rgba(139, 69, 19, 0.05);
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
}

.post-header strong {
  color: var(--primary-color);
}

.post-content {
  line-height: 1.6;
  white-space: pre-wrap;
}

.recent-activity {
  margin-top: 40px;
}

.activity-list {
  background: var(--card-bg);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.activity-item {
  display: flex;
  gap: 15px;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-avatar {
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.activity-content {
  flex: 1;
}

.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  font-size: 14px;
}

.activity-header strong {
  color: var(--primary-color);
}

.activity-header .time {
  color: var(--text-muted);
  font-size: 12px;
}

.activity-meta {
  display: flex;
  gap: 15px;
  margin-top: 8px;
  font-size: 12px;
}

.points-reward {
  color: #28a745;
  font-weight: 600;
}

.point-system {
  margin-top: 40px;
}

.point-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.point-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
}

.point-card h3 {
  margin: 0 0 15px 0;
  color: var(--primary-color);
}

.point-card ul {
  margin: 0 0 20px 0;
  padding-left: 20px;
}

.point-card li {
  margin-bottom: 8px;
  color: var(--text-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .forum-header {
    flex-direction: column;
    text-align: center;
  }

  .quick-actions {
    justify-content: center;
  }

  .activity-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 10. Authentication & Navigation Styles */
.nav-auth {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0; /* Prevent auth section from shrinking */
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-name {
  color: var(--accent-blue);
  font-weight: 600;
  margin-right: 0.5rem;
}

.user-currencies {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.currency-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.user-points {
  color: var(--text-light);
}

.user-echoes {
  color: #9d4edd;
}

.user-shards {
  color: var(--accent-color);
}

.user-keys {
  color: #ffd60a;
}

.user-flux {
  color: #06ffa5;
}

/* Currency responsive design */
@media (max-width: 768px) {
  .user-info {
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
  }

  .user-currencies {
    gap: 0.5rem;
  }

  .currency-item {
    font-size: 0.8rem;
    gap: 0.2rem;
  }

  .user-name {
    font-size: 0.9rem;
    margin-right: 0.3rem;
  }
}

@media (max-width: 480px) {
  .user-currencies {
    gap: 0.4rem;
  }

  .currency-item {
    font-size: 0.75rem;
  }

  .currency-icon {
    font-size: 0.8rem;
  }
}

/* Currency notification animations */
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

.currency-notification {
  pointer-events: none;
  user-select: none;
}

.auth-required {
  text-align: center;
  padding: 2rem;
  background: var(--bg-panel);
  border-radius: var(--border-radius);
  margin: 1rem 0;
}

/* 11. Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: var(--card-bg);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-content.large {
  max-width: 800px;
  width: 95%;
  max-height: 90vh;
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2,
.modal-header h3 {
  margin: 0;
  color: var(--primary-color);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--primary-color);
  color: white;
}

.modal-body {
  padding: 20px;
}

.modal-actions {
  margin-bottom: 20px;
  text-align: right;
}

.no-topics,
.no-posts {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-style: italic;
}

/* Raffle Ticket Purchase Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.modal.show {
  display: flex;
}
.quantity-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(102, 192, 244, 0.05);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.quantity-btn {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 192, 244, 0.3);
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
}

.quantity-btn:active {
  transform: translateY(0);
}

.quantity-btn:disabled {
  background: #555;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.quantity-input {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  color: var(--text-light);
  padding: 0.8rem 1rem;
  border-radius: 8px;
  width: 80px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  transition: all 0.2s ease;
}

.quantity-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 192, 244, 0.2);
}

.total-cost {
  background: linear-gradient(135deg, rgba(102, 192, 244, 0.1) 0%, rgba(102, 192, 244, 0.05) 100%);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--primary-color);
  margin: 1.5rem 0;
  text-align: center;
}

.cost-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cost-value {
  color: var(--primary-color);
  font-size: 1.8rem;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(102, 192, 244, 0.3);
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.modal-actions button {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-actions .cancel-btn {
  background: #555;
  color: white;
}

.modal-actions .cancel-btn:hover {
  background: #666;
}

.modal-actions .buy-btn {
  background: linear-gradient(135deg, var(--success-color) 0%, var(--success-hover) 100%);
  color: white;
  flex: 2;
}

.modal-actions .buy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.modal-actions .buy-btn:disabled {
  background: #555;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.instant-win-notice {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid #ff6b6b;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
  text-align: center;
}

.instant-win-notice i {
  color: #feca57;
  margin-right: 0.5rem;
}

.instant-win-notice .title {
  color: #ff6b6b;
  font-weight: bold;
}

.instant-win-notice .description {
  font-size: 0.85rem;
  color: #bbb;
  margin-top: 0.5rem;
}

.balance-display {
  color: #bbb;
  margin: 1rem 0;
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

.balance-display .balance-amount {
  color: var(--primary-color);
  font-weight: bold;
}

/* Topic and Post List Styles in Modals */
.topics-list .topic-item {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-radius: 5px;
  margin-bottom: 5px;
}

.topics-list .topic-item:hover {
  background: rgba(139, 69, 19, 0.1);
}

.topics-list .topic-item:last-child {
  border-bottom: none;
}

.topic-content {
  max-height: 60vh;
  overflow-y: auto;
}

.posts-list .post-item {
  margin-bottom: 15px;
  padding: 15px;
  background: rgba(139, 69, 19, 0.05);
  border-radius: 8px;
  border-left: 3px solid var(--primary-color);
}

/* footer */
footer {
  background: linear-gradient(90deg, #171a21, #0f131b);
  box-shadow: 0 -2px 8px var(--shadow);
  padding: 3rem 1rem 2rem 1rem;
  margin-top: 3rem;
  width: 100%;
  position: relative; /* Ensure footer participates in stacking context */
  z-index: 2000; /* Raise above overlapping sections */
}

.footer-copyright {
  text-align: center;
  font-size: .85rem;
  color: var(--text-light);
  margin-top: 2rem;
  padding: 0 1rem;
}

.no-activity {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-style: italic;
}

/* Shop Styles */
.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.floating-text-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.floating-text {
    position: absolute;
    color: rgba(255, 255, 255, 0.1);
    font-size: 14px;
    font-weight: 600;
    animation: floatText 8s ease-in-out infinite;
    pointer-events: none;
}

.floating-text:nth-child(1) {
    top: 20%;
    left: 10%;
}

.floating-text:nth-child(2) {
    top: 60%;
    right: 15%;
}

.floating-text:nth-child(3) {
    top: 30%;
    left: 60%;
}

@keyframes floatText {
    0%, 100% {
        transform: translateY(0px);
        opacity: 0.1;
    }
    50% {
        transform: translateY(-10px);
        opacity: 0.3;
    }
}

.shop-header h1 {
    position: relative;
    z-index: 1;
}

.user-balance {
    display: flex;
    gap: 20px;
}

.balance-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: rgba(139, 69, 19, 0.1);
    border-radius: 20px;
    font-weight: 600;
}

.currency-icon {
    font-size: 16px;
}

.shop-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    padding: 10px;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.shop-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.shop-tab:hover {
    background: rgba(139, 69, 19, 0.1);
    border-color: var(--primary-color);
}

.shop-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.shop-section {
    display: none;
}

.shop-section.active {
    display: block;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.shop-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.shop-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.3);
    border-color: var(--primary-color);
}

.shop-item.premium {
    border: 2px solid #ffd700;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 215, 0, 0.1) 100%);
}

.shop-item.rare {
    border: 2px solid #9d4edd;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(157, 78, 221, 0.1) 100%);
}

.shop-item.legendary {
    border: 2px solid #ff6b35;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 107, 53, 0.1) 100%);
}

.premium-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffd700;
    color: #000;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.shop-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.item-info {
    padding: 20px;
}

.item-info h3 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 18px;
}

.item-description {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 14px;
}

.package-contents {
    margin: 15px 0;
}

.package-contents span {
    display: block;
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 5px;
    padding-left: 10px;
    position: relative;
}

.package-contents span:before {
    content: "✓";
    position: absolute;
    left: -5px;
    color: #4caf50;
    font-weight: bold;
}

.item-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.price {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.buy-btn {
    padding: 8px 16px;
    font-size: 14px;
}

.buy-btn.premium {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #000;
}

.buy-btn.premium:hover {
    background: linear-gradient(45deg, #ffed4e, #ffd700);
}



.auth-prompt {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.auth-prompt h2 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.auth-prompt p {
    margin-bottom: 25px;
    color: var(--text-muted);
    font-size: 16px;
}

.shop-action {
    text-align: center;
    margin-top: 30px;
}

/* Purchase Success Modal */
.purchase-success {
    text-align: center;
    padding: 20px;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.download-section,
.rewards-section {
    margin: 20px 0;
    padding: 15px;
    background: rgba(139, 69, 19, 0.1);
    border-radius: 8px;
}

.rewards-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.rewards-list li {
    padding: 5px 0;
    color: var(--text-color);
}

.rewards-list li:before {
    content: "🎁 ";
    margin-right: 5px;
}

.balance-update {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Giveaways Page Styles */
.giveaways-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    margin-bottom: 3rem;
}

.giveaways-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.giveaways-header .subtitle {
    margin: 0 0 1.5rem 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.giveaways-header .button {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.giveaways-header .button:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

.giveaways-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.filter-tab {
    background: none;
    border: none;
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-tab:hover {
    background: var(--primary-color);
    color: white;
}

.filter-tab.active {
    background: var(--primary-color);
    color: white;
}

/* Search and Filter Row */
.search-and-filter-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .search-and-filter-row {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Search Bar */
.search-bar {
    position: relative;
    flex: 2;
    min-width: 300px;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* Ensure search input text/placeholder is never visually clipped */
.search-and-filter-row .search-bar { flex: 1 1 360px; }
.search-and-filter-row .search-input {
  min-height: 44px;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  line-height: 1.2;
}


.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-clear {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-clear:hover {
    background: var(--error-color);
    color: white;
}

.search-clear.hidden {
    display: none;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.genre-filter {
    flex: 1;
    min-width: 200px;
    max-width: 250px;
}

.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-select option {
    background: var(--card-bg);
    color: var(--text-color);
}

/* Giveaway Genre Display */
.giveaway-meta .genre {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Navigation Social Features */
.nav-social {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0; /* Prevent social nav from shrinking */
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    background: rgba(76, 129, 255, 0.1);
    border: 1px solid rgba(76, 129, 255, 0.3);
    border-radius: 6px;
    color: var(--accent-blue);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.8rem;
}

.nav-dropdown-trigger:hover {
    background: rgba(76, 129, 255, 0.2);
    border-color: var(--accent-blue);
    transform: translateY(-1px);
}

/* Improved hover stability for dropdowns */
.nav-dropdown:hover .social-dropdown,
.social-dropdown:hover {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.social-dropdown {
    transition: all 0.2s ease;
    pointer-events: all;
}

.social-dropdown:before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 0;
    right: 0;
    height: 0.5rem;
    background: transparent;
}

.nav-dropdown-trigger .icon {
    font-size: 0.9rem;
}

.nav-dropdown-trigger .badge {
    background: #e53e3e;
    color: white;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: bold;
    margin-left: -0.3rem;
    margin-top: -0.3rem;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    max-height: 350px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
    overflow-y: auto;
}

.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

.dropdown-header {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-header h3 {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.dropdown-content {
    padding: 0.3rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.dropdown-item:hover {
    background: rgba(76, 129, 255, 0.1);
}

.dropdown-item.unread {
    background: rgba(76, 129, 255, 0.05);
    border-left: 3px solid var(--accent-blue);
}

.dropdown-subheader {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.friend-request {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.friend-name {
    font-weight: 500;
}

.friend-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    flex: 1;
}

.btn-accept {
    background: var(--success-color);
    color: white;
}

.btn-reject {
    background: var(--danger-color);
    color: white;
}

.friend-status {
    font-size: 0.8rem;
    margin-left: auto;
}

.friend-status.online {
    color: var(--success-color);
}

.friend-status.offline {
    color: var(--text-muted);
}

.notification-text {
    font-size: 0.9rem;
    line-height: 1.3;
}

.notification-time,
.message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.message-sender {
    font-weight: 500;
    font-size: 0.9rem;
}

.message-preview {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin-top: 0.25rem;
}

/* Pixelated Explosion Effect */
.pixel-explosion-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.pixel-explosion {
    position: absolute;
    width: 100px;
    height: 100px;
    pointer-events: none;
}

.explosion-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #66c0f4;
    box-shadow: 0 0 2px #66c0f4;
}

.explosion-particle.orange {
    background: #ff6b35;
    box-shadow: 0 0 2px #ff6b35;
}

.explosion-particle.yellow {
    background: #f7d794;
    box-shadow: 0 0 2px #f7d794;
}

.explosion-particle.white {
    background: #ffffff;
    box-shadow: 0 0 2px #ffffff;
}

.explosion-particle.red {
    background: #ff3838;
    box-shadow: 0 0 2px #ff3838;
}

/* Explosion animations */
@keyframes explodeOut {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes explodeUp {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(0, -60px) scale(0.5);
        opacity: 0;
    }
}

@keyframes explodeDown {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(0, 60px) scale(0.5);
        opacity: 0;
    }
}

@keyframes explodeLeft {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-60px, 0) scale(0.5);
        opacity: 0;
    }
}

@keyframes explodeRight {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(60px, 0) scale(0.5);
        opacity: 0;
    }
}

@keyframes explodeUpLeft {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-45px, -45px) scale(0.3);
        opacity: 0;
    }
}

@keyframes explodeUpRight {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(45px, -45px) scale(0.3);
        opacity: 0;
    }
}

@keyframes explodeDownLeft {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-45px, 45px) scale(0.3);
        opacity: 0;
    }
}

@keyframes explodeDownRight {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(45px, 45px) scale(0.3);
        opacity: 0;
    }
}

/* Forum User Stats in Hero Section */
.forum-user-stats {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(28, 39, 51, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(102, 192, 244, 0.3);
    backdrop-filter: blur(10px);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.stat-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-shadow: 0 0 10px rgba(102, 192, 244, 0.5);
    margin-bottom: 0.25rem;
    font-family: 'Inter', monospace;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    color: var(--text-secondary);
    font-size: 2rem;
    opacity: 0.5;
}

/* Responsive stats */
@media (max-width: 480px) {
    .forum-user-stats {
        margin-top: 1rem;
        padding: 1rem;
    }

    .stat-display {
        gap: 1rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .stat-divider {
        font-size: 1.5rem;
    }
}

/* Mobile Navigation Styles */
@media (min-width: 769px) {
  .mobile-nav-container {
    display: none !important;
  }
  .mobile-nav,
  .hamburger {
    display: none !important;
  }
  .desktop-nav {
    display: block !important;
  }
}
@media (max-width: 768px) {
  .desktop-nav {
    display: none !important;
  }
  .mobile-nav-container {
    display: block !important;
  }
  .hamburger {
    display: flex;
    position: fixed;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    z-index: 10001;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .hamburger-icon {
    width: 28px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    box-shadow: 0 8px 0 #333, 0 16px 0 #333;
    transition: background 0.2s;
  }
  .mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 70vw;
    max-width: 320px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 12px rgba(0,0,0,0.12);
    z-index: 10002;
    flex-direction: column;
    padding: 32px 24px;
  }
  .mobile-nav.open {
    display: flex;
  }
}

/* Giveaway-specific styles */
.giveaways-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Enhanced giveaway card with animations */
.giveaway-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(37, 99, 235, 0.05) 100%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  opacity: 0;
  transform: translateY(20px);
  animation: giveaway-card-enter 0.6s ease-out forwards;
}

/* Staggered animation for cards */
.giveaway-card:nth-child(1) { animation-delay: 0.1s; }
.giveaway-card:nth-child(2) { animation-delay: 0.2s; }
.giveaway-card:nth-child(3) { animation-delay: 0.3s; }
.giveaway-card:nth-child(4) { animation-delay: 0.4s; }
.giveaway-card:nth-child(5) { animation-delay: 0.5s; }
.giveaway-card:nth-child(6) { animation-delay: 0.6s; }
.giveaway-card:nth-child(7) { animation-delay: 0.7s; }
.giveaway-card:nth-child(8) { animation-delay: 0.8s; }
.giveaway-card:nth-child(9) { animation-delay: 0.9s; }

@keyframes giveaway-card-enter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.giveaway-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 20px 40px rgba(37, 99, 235, 0.15),
    0 0 0 1px rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.3);
}

/* Pixel explosion effect on hover */
.giveaway-card::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: transparent;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.giveaway-card:hover::before {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
  animation: pixel-explosion 0.6s ease-out;
}

@keyframes pixel-explosion {
  0% {
    width: 0;
    height: 0;
    opacity: 0;
  }
  50% {
    width: 120%;
    height: 120%;
    opacity: 0.8;
    box-shadow:
      0 0 0 4px rgba(37, 99, 235, 0.2),
      0 0 0 8px rgba(37, 99, 235, 0.1),
      0 0 0 12px rgba(37, 99, 235, 0.05);
  }
  100% {
    width: 100%;
    height: 100%;
    opacity: 0.1;
  }
}

/* Pixel particles effect */
.giveaway-card:hover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(37, 99, 235, 0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(52, 152, 219, 0.3), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(155, 89, 182, 0.3), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(46, 204, 113, 0.3), transparent),
    radial-gradient(2px 2px at 160px 30px, rgba(241, 196, 15, 0.3), transparent);
  background-repeat: no-repeat;
  background-size: 200px 100px;
  animation: pixel-float 2s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes pixel-float {
  0%, 100% {
    opacity: 0;
    transform: translateY(0px);
  }
  50% {
    opacity: 1;
    transform: translateY(-5px);
  }
}

/* Enhanced card structure */
.card-header {
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
  position: relative;
  z-index: 3;
}

.giveaway-title {
  margin: 0 0 0.75rem 0;
  font-size: 1.3rem;
  color: var(--primary-color);
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.giveaway-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.time-remaining {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.time-remaining.expired {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
  border-color: rgba(231, 76, 60, 0.2);
}

.card-content {
  padding: 1.25rem;
  position: relative;
  z-index: 3;
}

.giveaway-description {
  color: var(--text-color);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  opacity: 0.9;
}

.giveaway-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: linear-gradient(135deg, var(--background-secondary) 0%, rgba(37, 99, 235, 0.03) 100%);
  border-radius: 10px;
  border: 1px solid rgba(37, 99, 235, 0.1);
}

.stat {
  text-align: center;
  padding: 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.stat-value {
  display: block;
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.1rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.giveaway-creator {
  font-size: 0.85rem;
  color: var(--text-secondary);
  opacity: 0.8;
}

.card-actions {
  padding: 0 1.25rem 1.25rem;
  position: relative;
  z-index: 3;
}

/* Enhanced action buttons and messages */
.action-message {
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.action-message.entered {
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.15) 0%, rgba(39, 174, 96, 0.05) 100%);
  color: #27ae60;
  border-color: rgba(39, 174, 96, 0.2);
}

.action-message.expired {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.15) 0%, rgba(231, 76, 60, 0.05) 100%);
  color: #e74c3c;
  border-color: rgba(231, 76, 60, 0.2);
}

.action-message.level-req {
  background: linear-gradient(135deg, rgba(230, 126, 34, 0.15) 0%, rgba(230, 126, 34, 0.05) 100%);
  color: #e67e22;
  border-color: rgba(230, 126, 34, 0.2);
}

/* Enhanced giveaway-specific buttons */
.giveaway-card .button {
  width: 100%;
  padding: 0.75rem 1rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.giveaway-card .button::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: left 0.5s ease;
}

.giveaway-card .button:hover::before {
  left: 100%;
}

.giveaway-card .button.giveaway-highlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(70, 130, 180, 0.4);
}

/* Pixel burning effect that starts from Enter Giveaway button */
.giveaway-card:hover .button.giveaway-highlight::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(
    0deg,
    rgba(255, 100, 0, 0.6) 0%,
    rgba(255, 150, 0, 0.4) 40%,
    rgba(255, 200, 0, 0.2) 70%,
    transparent 100%
  );
  animation: button-burn-start 0.8s ease-out;
  z-index: -1;
}

/* Burning effect spreads from button to entire card */
.giveaway-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  background: linear-gradient(
    0deg,
    rgba(255, 100, 0, 0.4) 0%,
    rgba(255, 150, 0, 0.3) 30%,
    rgba(255, 200, 0, 0.2) 60%,
    rgba(255, 255, 100, 0.1) 80%,
    transparent 100%
  );
  transition: height 0.6s ease-out 0.2s;
  z-index: 0;
  pointer-events: none;
}

.giveaway-card:hover::after {
  height: 100%;
  background: linear-gradient(
    0deg,
    rgba(255, 100, 0, 0.5) 0%,
    rgba(255, 150, 0, 0.3) 20%,
    rgba(255, 200, 0, 0.2) 40%,
    rgba(255, 255, 100, 0.15) 70%,
    transparent 100%
  );
}

/* Pixel particles emanating from button */
.giveaway-card:hover .card-actions::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200%;
  background-image:
    radial-gradient(2px 2px at 15% 90%, rgba(255, 100, 0, 0.8), transparent),
    radial-gradient(2px 2px at 35% 95%, rgba(255, 150, 0, 0.6), transparent),
    radial-gradient(1px 1px at 55% 88%, rgba(255, 200, 0, 0.7), transparent),
    radial-gradient(1px 1px at 75% 92%, rgba(255, 255, 100, 0.5), transparent),
    radial-gradient(2px 2px at 25% 85%, rgba(255, 120, 0, 0.6), transparent),
    radial-gradient(1px 1px at 65% 90%, rgba(255, 180, 0, 0.8), transparent),
    radial-gradient(1px 1px at 85% 94%, rgba(255, 160, 0, 0.7), transparent),
    radial-gradient(2px 2px at 45% 87%, rgba(255, 220, 0, 0.6), transparent);
  background-size: 100% 100%;
  opacity: 0;
  animation: giveaway-pixel-float 2.5s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes button-burn-start {
  0% {
    height: 0;
    opacity: 0;
  }
  50% {
    height: 100%;
    opacity: 1;
  }
  100% {
    height: 100%;
    opacity: 0.8;
  }
}

@keyframes giveaway-pixel-float {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  30% {
    opacity: 1;
    transform: translateY(-20px);
  }
  70% {
    opacity: 0.8;
    transform: translateY(-60px);
  }
  100% {
    opacity: 0;
    transform: translateY(-120px);
  }
}

/* Ensure card content stays above burning effects */
.giveaway-card .card-header,
.giveaway-card .card-content,
.giveaway-card .card-actions {
  position: relative;
  z-index: 2;
}

.giveaway-card .button.danger {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border: none;
}

.giveaway-card .button.danger:hover {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(192, 57, 43, 0.4);
}

.no-results, .error-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(37, 99, 235, 0.02) 100%);
  border-radius: 12px;
  border: 1px dashed var(--border-color);
}

.error-state h3 {
  color: var(--text-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

/* Animation keyframes for enhanced effects */
@keyframes particle-float {
  0% {
    opacity: 0;
    transform: translateY(0px) scale(0);
  }
  20% {
    opacity: 1;
    transform: translateY(-10px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-30px) scale(0.5);
  }
}

@keyframes ripple-effect {
  0% {
    width: 20px;
    height: 20px;
    opacity: 0.8;
  }
  100% {
    width: 200px;
    height: 200px;
    opacity: 0;
  }
}

@keyframes button-burst {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

/* Container transition effects */
.giveaways-grid {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Notification styles for winners */
.winner-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(243, 156, 18, 0.3);
  z-index: 10001;
  animation: winner-notification-in 0.5s ease-out;
  max-width: 400px;
}

.winner-notification h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.winner-notification p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.winner-notification .steam-key {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.8rem;
  word-break: break-all;
}

@keyframes winner-notification-in {
  from {
    opacity: 0;
    transform: translateX(100%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes winner-notification-out {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(100%) scale(0.8);
  }
}

/* Form styles for giveaway creation */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--background);
  color: var(--text-color);
  font-size: 0.9rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: block;
}

/* Notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  max-width: 400px;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  background: #27ae60;
}

.notification.error {
  background: #e74c3c;
}

.notification.info {
  background: var(--primary-color);
}

.notification-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-close:hover {
  opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .giveaways-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

/* Navigation Icons */
.nav-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-right: 1rem;
}

.nav-icon {
  position: relative;
  color: var(--text-light);
  font-size: 1.2rem;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  text-decoration: none;
}

.nav-icon:hover {
  color: var(--accent-blue);
  background: rgba(102, 192, 244, 0.1);
}

.icon-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #e74c3c;
  color: white;
  border-radius: 50%;
  font-size: 0.7rem;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

@media (max-width: 768px) {
  .nav-icons {
    gap: 0.5rem;
  }

  .nav-icon {
    font-size: 1.1rem;
    padding: 0.4rem;
  }
}

/* Message popup alignment styles */
.message-item {
    display: flex;
    margin-bottom: 8px;
}
.message-item.mine {
    justify-content: flex-end;
}
.message-item.theirs {
    justify-content: flex-start;
}
.message-content {
    max-width: 60%;
    padding: 8px 12px;
    border-radius: 16px;
    background: #e2e8f0;
    color: #222;
}
.message-item.mine .message-content {
    background: #3182ce;
    color: #fff;
}

/* Cosmetics Wrapper */
.cosmetics-wrapper {
    width: 100%;
    display: block;
}

/* Override shop-grid when it contains cosmetics */
#cosmetics-container.shop-grid {
    display: block !important;
    grid-template-columns: none !important;
}

#cosmetics-container > .cosmetics-wrapper {
    display: block;
    width: 100%;
}

.cosmetic-tabs-container {
    display: flex !important;
    gap: 15px;
    margin-bottom: 30px;
    padding: 0;
    border-bottom: 2px solid var(--border-color);
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.cosmetic-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 35px;
    background: transparent;
    border: none;
    border-bottom: 4px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
    min-width: 120px;
}

.cosmetic-tab .tab-icon {
    font-size: 32px;
    transition: transform 0.3s ease;
    display: block;
}

.cosmetic-tab .tab-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    display: block;
}

.cosmetic-tab:hover {
    color: var(--primary-color);
}

.cosmetic-tab:hover .tab-icon {
    transform: scale(1.2);
}

.cosmetic-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(139, 69, 19, 0.1);
}

.cosmetic-tab.active .tab-icon {
    transform: scale(1.15);
}

.cosmetic-content {
    width: 100%;
}

.cosmetic-section {
    display: none;
    width: 100%;
}

.cosmetic-section.active {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    width: 100%;
}

.no-items {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.no-items i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-items p {
    font-size: 16px;
    margin: 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .cosmetic-section.active {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .cosmetic-section.active {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cosmetic-tabs-container {
        gap: 8px;
    }

    .cosmetic-tab {
        padding: 15px 20px;
        min-width: 100px;
    }

    .cosmetic-tab .tab-icon {
        font-size: 26px;
    }

    .cosmetic-tab .tab-label {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .cosmetic-tab {
        padding: 12px 15px;
        min-width: 80px;
    }

    .cosmetic-tab .tab-icon {
        font-size: 22px;
    }

    .cosmetic-tab .tab-label {
        font-size: 10px;
        letter-spacing: 0.5px;
    }
}

/* Cosmetic Card Styling */
.cosmetic-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.cosmetic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(139, 69, 19, 0.5);
    border-color: var(--primary-color);
}

.cosmetic-card.owned {
    border-color: #28a745;
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.4);
}

.owned-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 11px;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cosmetic-preview-visual {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.cosmetic-card .item-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cosmetic-card .item-info h4 {
    margin: 0 0 8px 0;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 700;
}

.cosmetic-card .item-description {
    font-size: 13px;
    color: #999;
    margin-bottom: 15px;
    flex: 1;
    line-height: 1.4;
}

.cosmetic-card .item-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.cosmetic-card .price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

.cosmetic-card .buy-btn {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.cosmetic-card .buy-btn.premium-btn {
    background: linear-gradient(135deg, var(--primary-color), #ff8c42);
    color: white;
    border: none;
}

.cosmetic-card .buy-btn.premium-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.4);
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-150px) scale(1);
        opacity: 0;
    }
}

@keyframes wave {
    0%, 100% {
        transform: scaleY(0.5);
        opacity: 0.3;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Old bubble effect styles - keeping for backwards compatibility */
.bubble-effect-item,
.cosmetic-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.bubble-effect-item:hover,
.cosmetic-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.3);
    border-color: var(--primary-color);
}

.bubble-effect-item.owned,
.cosmetic-item.owned {
    border-color: #28a745;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(40, 167, 69, 0.1) 100%);
}

.bubble-effect-preview,
.cosmetic-preview {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.1), rgba(139, 69, 19, 0.2));
    padding: 30px;
    text-align: center;
}

.effect-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.effect-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.alert {
  padding: 12px;
  margin-top: 10px;
  border-radius: 5px;
  font-weight: bold;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Auth modal polish */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 10000; animation: fadeIn 180ms ease-out; }
.modal-content { width: min(92vw, 440px); background: var(--card-bg, #1a1f26); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; box-shadow: 0 18px 60px rgba(0,0,0,0.55); overflow: hidden; transform: translateY(6px); animation: slideUp 220ms ease-out forwards; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.modal-header h2 { margin: 0; font-size: 1.15rem; }
.close-modal { background: transparent; border: none; color: #aaa; font-size: 1.4rem; cursor: pointer; }
.modal-body { padding: 16px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.auth-tab { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04); color: var(--text-primary, #e5e7eb); cursor: pointer; transition: all 0.18s ease; }
.auth-tab.active { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-color: transparent; color: #fff; box-shadow: 0 8px 24px rgba(102,126,234,0.28); }
#auth-form .form-group { margin-bottom: 12px; }
#auth-form input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04); color: #fff; transition: box-shadow 0.15s ease, border-color 0.15s ease; }
#auth-form input:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.18); }
#auth-submit { width: 100%; padding: 12px 14px; border-radius: 10px; border: none; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; font-weight: 700; cursor: pointer; transition: transform 0.12s ease, box-shadow 0.2s ease; }
#auth-submit:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(102,126,234,0.32); }
#auth-submit:active { transform: translateY(0); }
.error-message { color: #ff7b7b; font-weight: 600; margin-top: 8px; }

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideUp { to { transform: translateY(0) } }




/* Shop "Best Value" sticker */
.shop-item.has-best-value { overflow: visible !important; }
.best-value {
  position: absolute;
  top: -10px;
  right: -10px;
  background: linear-gradient(135deg, #fff06a, #ffd700);
  color: #2a2a2a;
  font-weight: 900;
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transform: rotate(6deg);
  letter-spacing: .5px;
  z-index: 5;
  border: 2px solid rgba(0,0,0,0.08);
}

/* ========== COMPREHENSIVE MOBILE IMPROVEMENTS ========== */

/* Extra small devices (320px - 480px) */
@media (max-width: 480px) {
  /* Prevent horizontal scroll */
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  /* Container adjustments */
  .container,
  .friends-container,
  .raffles-container,
  .forum-container {
    max-width: 100%;
    padding: 0 0.75rem;
    margin: 1rem auto;
  }

  /* Typography */
  h1 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1rem;
  }

  /* Grid adjustments */
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .giveaways-grid,
  .raffles-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Hero section */
  .hero {
    height: 40vh;
    min-height: 280px;
    padding: 2rem 1rem;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }

  .hero-btn {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  /* Stats grid */
  .home-stats-grid {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 0.75rem;
  }

  .stat-card {
    min-width: auto;
    max-width: 100%;
    padding: 0.75rem;
  }

  .stat-card h3 {
    font-size: 0.85rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  /* Forms */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  input,
  textarea,
  select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.75rem;
  }

  button {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  /* Cards */
  .card,
  .raffle-card,
  .giveaway-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  /* Forum */
  .forum-header {
    flex-direction: column;
    gap: 1rem;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .topic-card {
    flex-direction: column;
  }

  .topic-content {
    min-width: 100%;
  }

  /* Inventory */
  .inventory-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* Ensure all modals are mobile-friendly */
  .modal-content {
    max-width: 95vw !important;
    width: 95vw !important;
    max-height: 90vh !important;
  }

  .modal-content.large {
    max-width: 95vw !important;
    width: 95vw !important;
  }
}

/* Small devices (481px - 768px) */
@media (max-width: 768px) and (min-width: 481px) {
  .container,
  .friends-container,
  .raffles-container,
  .forum-container {
    max-width: 100%;
    padding: 0 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
  }

  .giveaways-grid,
  .raffles-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .hero {
    height: 50vh;
    min-height: 320px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-btn {
    width: 100%;
    max-width: 300px;
  }

  .home-stats-grid {
    flex-direction: column;
    gap: 1rem;
  }

  .stat-card {
    min-width: auto;
    max-width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .inventory-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .modal-content {
    max-width: 90vw !important;
    width: 90vw !important;
  }
}

/* Ensure touch targets are at least 44x44px on mobile */
@media (max-width: 768px) {
  button,
  a.button,
  .nav-link,
  .card-button,
  input[type="button"],
  input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
    padding: 0.75rem 1rem;
  }

  /* Prevent text selection issues on mobile */
  * {
    -webkit-user-select: text;
    -webkit-touch-callout: none;
  }

  /* Improve scrolling performance */
  .scrollable,
  .modal-content,
  .popup-content {
    -webkit-overflow-scrolling: touch;
  }

  /* Ensure proper viewport */
  html {
    font-size: 16px;
  }
}
