/* Color Palette Variables */
:root {
  --bg-dark: #15171e;
  --bg-card: #1f222d;
  --text-main: #f0f4f8;
  --text-muted: #8b92a5;
  --brand-cyan: #21e6a6;
  --brand-purple: #6a4cff;
  --brand-gradient: linear-gradient(135deg, var(--brand-cyan) 0%, var(--brand-purple) 100%);
}

body { 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
  margin: 0; 
  background-color: var(--bg-dark); 
  color: var(--text-main); 
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Navigation */
nav { 
  display: flex; justify-content: space-between; align-items: center; 
  padding: 1.5rem 5%; background: var(--bg-dark); 
  border-bottom: 1px solid rgba(255,255,255,0.05); 
  width: 100%; box-sizing: border-box;
}
.brand-link { 
  display: flex; align-items: center; gap: 0.5rem; text-decoration: none;
}
.brand-text { 
  font-size: 1.5rem; font-weight: 800; background: var(--brand-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.brand-logo {
  height: 32px; width: auto;
}
.nav-btn, .nav-dropdown-btn { 
  background: rgba(255,255,255,0.05); color: var(--text-main);
  border: 1px solid rgba(255,255,255,0.1); padding: 8px 16px; 
  border-radius: 6px; cursor: pointer; font-size: 1rem; transition: all 0.2s; 
}
.nav-btn:hover, .nav-dropdown-btn:hover { background: rgba(255,255,255,0.1); }
.nav-user { display: flex; align-items: center; gap: 1rem; }
.nav-user-info { display: flex; align-items: center; gap: 0.6rem; }
.nav-avatar { width: 36px; height: 36px; border-radius: 50%; background: #333; object-fit: cover; border: 1px solid rgba(255,255,255,0.1); }
.nav-name { font-weight: 600; font-size: 0.95rem; color: var(--text-main); }

/* Profile Dropdown */
.nav-dropdown-container { position: relative; display: inline-block; cursor: pointer; padding: 0.5rem 0; }
.nav-dropdown { display: none; position: absolute; right: 0; top: 100%; background-color: var(--bg-card); min-width: 160px; box-shadow: 0 8px 24px rgba(0,0,0,0.5); border-radius: 8px; z-index: 10; border: 1px solid rgba(255,255,255,0.05); overflow: hidden; }
.nav-dropdown-container:hover .nav-dropdown { display: block; }
.nav-dropdown-btn { display: block; width: 100%; text-align: left; border: none; border-radius: 0; }

/* Hero Section */
.hero { 
  text-align: center; padding: 5rem 2rem; 
  background: radial-gradient(circle at top, rgba(106, 76, 255, 0.15) 0%, var(--bg-dark) 60%);
  flex-grow: 1;
}
.hero h1 { font-size: 3.5rem; margin-bottom: 1rem; color: #fff; letter-spacing: -0.03em; }
.hero p { font-size: 1.25rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 2.5rem auto; line-height: 1.6; }

/* Buttons */
.btn-primary, button { 
  background: var(--brand-gradient); color: var(--bg-dark); 
  border: none; padding: 14px 28px; border-radius: 8px; 
  font-size: 1.1rem; font-weight: 700; cursor: pointer; 
  transition: transform 0.1s, box-shadow 0.2s; 
  box-shadow: 0 4px 15px rgba(33, 230, 166, 0.2); 
}
.btn-primary:hover, button:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 6px 20px rgba(106, 76, 255, 0.4); 
}
button:disabled { background: #333 !important; color: #666 !important; cursor: not-allowed !important; transform: none !important; box-shadow: none !important; }

/* Cards & Containers */
.card, .container, .checkout-box { 
  background: var(--bg-card); padding: 2rem; border-radius: 16px; 
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); 
}
.container { max-width: 400px; margin: auto; text-align: center; }

/* Typography & Forms */
h1, h2 { color: #fff; margin-top: 0; }
h2 { margin-bottom: 1.5rem; font-size: 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 0.75rem; }
p { color: var(--text-muted); line-height: 1.5; }
label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; color: var(--text-muted); }
input { width: 100%; padding: 0.75rem; margin-bottom: 1.5rem; background: var(--bg-dark); border: 1px solid rgba(255,255,255,0.1); color: var(--text-main); border-radius: 6px; box-sizing: border-box; font-size: 1rem; }
input:focus { outline: none; border-color: var(--brand-cyan); }

/* Visual Examples Grid */
.examples-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; padding: 3rem 5%; max-width: 1200px; margin: 0 auto; }
.comment-card { background: var(--bg-card); padding: 1.5rem; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); width: 300px; text-align: left; border-top: 4px solid var(--brand-purple); border-left: 1px solid rgba(255,255,255,0.05); border-right: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05); transition: transform 0.2s; }
.comment-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6); }
.comment-header { display: flex; align-items: center; margin-bottom: 1rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.05); display: flex; justify-content: center; align-items: center; font-size: 1.2rem; margin-right: 12px; border: 1px solid rgba(255,255,255,0.1); }
.persona-name { font-weight: 700; font-size: 1.1rem; color: #fff; }
.persona-type { font-size: 0.85rem; color: var(--text-muted); }
.comment-text { font-size: 1rem; color: var(--text-main); line-height: 1.5; font-style: italic; }

/* Dashboard Pokemon Cards */
.card-grid { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center; margin-bottom: 3rem; }
.pokemon-card { 
  background: var(--bg-card); border-radius: 16px; padding: 1.5rem; width: 220px; 
  text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
  transition: transform 0.2s, border 0.2s; border: 2px solid rgba(255,255,255,0.05); 
  cursor: pointer; position: relative; color: var(--text-main);
}
.pokemon-card.active { border-color: var(--brand-cyan); }
.pokemon-card.active::after { 
  content: '✓ Active'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); 
  background: var(--brand-cyan); color: var(--bg-dark); padding: 4px 12px; 
  border-radius: 12px; font-size: 0.8rem; font-weight: bold; 
}
.pokemon-card.active:hover { border-color: #ff4c4c; background-color: rgba(255, 76, 76, 0.05); }
.pokemon-card.active:hover::after { content: '− Remove'; background: #ff4c4c; color: #fff; }
.pokemon-card.selected { border-color: var(--brand-purple); transform: translateY(-5px); }
.pokemon-card.selected::after { 
  content: '+ New'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); 
  background: var(--brand-purple); color: #fff; padding: 4px 12px; 
  border-radius: 12px; font-size: 0.8rem; font-weight: bold; 
}
.pokemon-card:hover:not(.active) { border-color: var(--brand-purple); }
.card-name { font-weight: 800; font-size: 1.1rem; margin-bottom: 0.5rem; color: #fff; }
.card-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.4; }
.card-avatar { font-size: 4rem; margin-bottom: 1rem; }

/* Floating Cart */
.floating-cart { 
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(31, 34, 45, 0.95); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.1); color: var(--text-main);
  padding: 1rem 5%; box-shadow: 0 -4px 20px rgba(0,0,0,0.5); 
  display: flex; justify-content: space-between; align-items: center; z-index: 100;
}
.pricing-note { background: rgba(106, 76, 255, 0.15); color: #a390ff; padding: 6px 12px; border-radius: 6px; font-weight: 600; font-size: 0.9rem; display: inline-block; border: 1px solid rgba(106, 76, 255, 0.3); }

/* Admin Dashboard Elements */
.dashboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; max-width: 1200px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.header { margin-bottom: 2rem; padding-top: 2rem; max-width: 1200px; margin: 0 auto 2rem auto; }
.result { margin-top: 1.5rem; padding: 1rem; border-radius: 6px; display: none; font-size: 0.95rem; }
.success { background: rgba(33, 230, 166, 0.1); color: var(--brand-cyan); border: 1px solid rgba(33, 230, 166, 0.3); }
.error { background: rgba(255, 76, 76, 0.1); color: #ff4c4c; border: 1px solid rgba(255, 76, 76, 0.3); }
.stat-value { font-size: 3.5rem; font-weight: 800; color: var(--brand-cyan); margin: 1rem 0; text-align: center; }
.stat-label { text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.quota-bar { height: 8px; background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden; margin-top: 1rem; }
.quota-fill { height: 100%; background: var(--brand-cyan); transition: width 0.3s; }
.quota-fill.warning { background: #f4b400; }
.quota-fill.danger { background: #ff4c4c; }
.suggestion-box { display: none; background: rgba(255,255,255,0.02); padding: 1rem; border-radius: 6px; margin-bottom: 1.5rem; border: 1px dashed rgba(255,255,255,0.1); font-size: 0.9rem; }
.suggestion-box p { margin: 0 0 0.5rem 0; color: var(--text-main); }
.copy-text { font-family: monospace; background: rgba(255,255,255,0.05); padding: 2px 6px; border-radius: 4px; color: var(--brand-purple); font-weight: bold; }
.helper-text { margin: 0.5rem 0 0 0; color: var(--text-muted); font-size: 0.8rem; font-style: italic; }
.hidden { display: none !important; }

/* Modal Styles */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1000; display: flex; justify-content: center; align-items: center; }
.modal-backdrop { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); }
.modal-content { position: relative; background: var(--bg-card); padding: 2rem; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7); max-width: 400px; width: 90%; text-align: center; z-index: 1001; }
.modal-content p { color: var(--text-main); font-size: 1.05rem; margin-bottom: 2rem; line-height: 1.5; }
.modal-content button { width: 100%; }

/* Loading Spinner */
.loading-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(21, 23, 30, 0.8); backdrop-filter: blur(4px); z-index: 2000; display: flex; flex-direction: column; justify-content: center; align-items: center; color: var(--text-main); }
.spinner { width: 50px; height: 50px; border: 4px solid rgba(255,255,255,0.1); border-left-color: var(--brand-cyan); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 1.5rem; }
@keyframes spin { to { transform: rotate(360deg); } }