/*
 Theme Name:   Raiai Penny Child
 Theme URI:    https://raiai.pro
 Description:  Astra Child Theme for Raiai Penny Auction
 Author:       Raiai
 Author URI:   https://raiai.pro
 Template:     astra
 Version:      2.0.0
*/

:root {
  --primary: #6C5CE7;
  --primary-dark: #5A4BD1;
  --primary-light: #A29BFE;
  --secondary: #00CEC9;
  --secondary-dark: #00B5B0;
  --accent: #FD79A8;
  --accent-dark: #E84393;
  --success: #00B894;
  --warning: #FDCB6E;
  --danger: #FF6B6B;
  --dark: #2D3436;
  --dark-2: #353B48;
  --dark-3: #2F3542;
  --light: #F8F9FA;
  --light-2: #E9ECEF;
  --glass: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.12);
  --shadow: 0 8px 32px rgba(0,0,0,0.15);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.2);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === BACKGROUND GRADIENT === */
body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 50%, #16213e 100%);
  color: var(--light);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
}

/* === ANIMATED BACKGROUND === */
.hero-particles {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.hero-particles span {
  position: absolute;
  width: 4px; height: 4px;
  background: var(--primary-light);
  border-radius: 50%;
  animation: float 15s infinite;
  opacity: 0.3;
}
.hero-particles span:nth-child(1) { left: 10%; animation-delay: 0s; }
.hero-particles span:nth-child(2) { left: 20%; animation-delay: 2s; width: 6px; height: 6px; background: var(--secondary); }
.hero-particles span:nth-child(3) { left: 35%; animation-delay: 4s; }
.hero-particles span:nth-child(4) { left: 50%; animation-delay: 1s; width: 8px; height: 8px; background: var(--accent); }
.hero-particles span:nth-child(5) { left: 65%; animation-delay: 3s; }
.hero-particles span:nth-child(6) { left: 75%; animation-delay: 5s; width: 5px; height: 5px; background: var(--secondary); }
.hero-particles span:nth-child(7) { left: 85%; animation-delay: 2.5s; }
.hero-particles span:nth-child(8) { left: 45%; animation-delay: 1.5s; width: 3px; height: 3px; background: var(--accent); }
@keyframes float {
  0%, 100% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* === GLOW EFFECTS === */
.glow {
  box-shadow: 0 0 20px var(--primary), 0 0 40px rgba(108,92,231,0.3);
}
.glow-secondary {
  box-shadow: 0 0 20px var(--secondary), 0 0 40px rgba(0,206,201,0.3);
}

/* === GLASS CARD === */
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}
.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

/* === HEADER === */
.site-header {
  background: linear-gradient(135deg, rgba(108,92,231,0.95), rgba(0,206,201,0.9)) !important;
  backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(255,255,255,0.1) !important;
  padding: 12px 0 !important;
}
.main-header-menu a {
  color: white !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: var(--transition) !important;
}
.main-header-menu a:hover {
  color: var(--warning) !important;
  transform: scale(1.05);
}

/* === HERO SECTION === */
.hero-section {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 100px 20px 80px;
  background: linear-gradient(135deg, rgba(108,92,231,0.1), rgba(0,206,201,0.1));
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 20px;
  animation: fadeInUp 1s ease;
}
.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: rgba(255,255,255,0.8);
  max-width: 700px;
  margin-bottom: 40px;
  animation: fadeInUp 1s ease 0.2s both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 15px rgba(108,92,231,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(108,92,231,0.6);
  color: white;
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
}
.btn-success {
  background: linear-gradient(135deg, var(--success), var(--secondary));
  color: white;
}
.btn-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
}
.btn-outline:hover {
  border-color: var(--primary);
  background: rgba(108,92,231,0.1);
  color: white;
}
.btn-lg { padding: 18px 48px; font-size: 18px; }

/* === FEATURES === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}
.feature-card {
  text-align: center;
  padding: 40px 30px;
}
.feature-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

/* === AUCTIONS GRID === */
.auctions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  padding: 40px 0;
}
.auction-card {
  position: relative;
  overflow: hidden;
}
.auction-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}
.auction-timer {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 6px;
}
.auction-timer.urgent { color: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.auction-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--secondary);
}
.auction-retail {
  text-decoration: line-through;
  color: rgba(255,255,255,0.4);
  font-size: 14px;
}
.auction-bidder {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}
.bid-btn {
  width: 100%;
  justify-content: center;
}

/* === LEADERBOARD === */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  overflow: hidden;
}
.leaderboard-table th {
  background: rgba(108,92,231,0.3);
  color: white;
  padding: 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.leaderboard-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
  color: rgba(255,255,255,0.85);
}
.leaderboard-table tr:hover td {
  background: rgba(108,92,231,0.1);
}
.medal { font-size: 24px; }
.rank-1 { background: linear-gradient(90deg, rgba(255,215,0,0.15), transparent) !important; }
.rank-2 { background: linear-gradient(90deg, rgba(192,192,192,0.1), transparent) !important; }
.rank-3 { background: linear-gradient(90deg, rgba(205,127,50,0.1), transparent) !important; }

/* === CREDITS SHOP === */
.credit-card {
  text-align: center;
  padding: 40px 24px;
}
.credit-card.featured {
  border: 2px solid var(--primary);
  transform: scale(1.05);
  position: relative;
}
.credit-card.featured::before {
  content: "⭐ MIGLIORE";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 4px 20px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}
.credit-amount {
  font-size: 48px;
  font-weight: 700;
  color: var(--secondary);
}
.credit-price {
  font-size: 24px;
  color: white;
  margin: 16px 0;
}
.credit-savings {
  font-size: 13px;
  color: var(--success);
  font-weight: 600;
}

/* === STATS SECTION === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 20px;
}
.stat-card { text-align: center; }
.stat-number {
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  margin-top: 8px;
}

/* === HOW IT WORKS === */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}
.step-card {
  text-align: center;
  padding: 40px 24px;
  position: relative;
}
.step-number {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  margin: 0 auto 16px;
}

/* === FILTERS === */
.auction-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 10px 24px;
  border-radius: 50px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}
.filter-btn:hover, .filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-color: transparent;
}

/* === FOOTER === */
.site-footer {
  background: var(--dark-3) !important;
  border-top: 1px solid var(--glass-border) !important;
  padding: 40px 0 !important;
  margin-top: 80px !important;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.footer-grid h4 {
  color: var(--primary-light);
  font-size: 18px;
  margin-bottom: 16px;
}
.footer-grid a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
  transition: var(--transition);
}
.footer-grid a:hover { color: var(--secondary); }
.footer-bottom {
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid var(--glass-border);
  color: rgba(255,255,255,0.4);
  font-size: 13px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero-section { padding: 80px 16px 60px; min-height: auto; }
  .auctions-grid { grid-template-columns: 1fr; }
  .credit-card.featured { transform: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* === MISC === */
.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  text-align: center;
  margin-bottom: 16px;
  background: linear-gradient(135deg, white, var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-subtitle {
  text-align: center;
  color: rgba(255,255,255,0.6);
  max-width: 600px;
  margin: 0 auto 40px;
  font-size: 16px;
}
.section-padding {
  padding: 80px 20px;
}
.container-wide {
  max-width: 1200px;
  margin: 0 auto;
}
.text-gradient {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* === NOTIFICATIONS === */
.notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--dark-2);
  border: 1px solid var(--glass-border);
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(12px);
  z-index: 9999;
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 4s forwards;
  max-width: 350px;
}
@keyframes slideIn {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateX(100px); }
}

/* WooCommerce compat */
.woocommerce .products .product { background: var(--glass) !important; border: 1px solid var(--glass-border) !important; border-radius: var(--radius) !important; padding: 20px !important; }
.woocommerce .price { color: var(--secondary) !important; }
.woocommerce .button { background: linear-gradient(135deg, var(--primary), var(--secondary)) !important; color: white !important; border-radius: 50px !important; }
