/* nicekin.css — RatePigs.com Design System (Pinterest-inspired) */

/* =========================================================
   CSS CUSTOM PROPERTIES
   ========================================================= */
:root {
  /* Brand */
  --primary:         #E60023;
  --primary-hover:   #AD081B;
  --primary-light:   #FFEEF0;
  --primary-glow:    rgba(230, 0, 35, 0.15);

  /* Neutrals (Pinterest palette) */
  --bg:              #EFEFEF;
  --surface:         #FFFFFF;
  --surface-2:       #F8F8F8;
  --border:          #E0E0E0;
  --text-primary:    #111111;
  --text-secondary:  #767676;
  --text-muted:      #AAAAAA;

  /* Semantic */
  --gold:            #FFD700;
  --success:         #0a9928;
  --warning:         #f59e0b;

  /* Shape */
  --radius-xs:  4px;
  --radius-sm:  8px;
  --radius:     16px;
  --radius-lg:  24px;
  --radius-full:9999px;

  /* Shadow */
  --shadow-xs:  0 1px 3px  rgba(0,0,0,.08);
  --shadow-sm:  0 2px 8px  rgba(0,0,0,.10);
  --shadow:     0 6px 20px rgba(0,0,0,.13);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.18);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t:    all 0.2s var(--ease);

  /* Typography */
  --font: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  padding-bottom: 80px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; }
h1,h2,h3,h4,h5,h6 { font-weight: 800; line-height: 1.2; letter-spacing: -.3px; }

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
  background: var(--surface) !important;
  box-shadow: 0 1px 0 var(--border) !important;
  padding: .55rem 0 !important;
  position: sticky !important;
  top: 0;
  z-index: 1030;
}
.navbar-brand {
  font-size: 1.75rem !important;
  font-weight: 900 !important;
  color: var(--primary) !important;
  letter-spacing: -1.5px;
}
.navbar-brand:hover { color: var(--primary-hover) !important; }

/* Search */
.navbar-search { flex: 1; max-width: 520px; margin: 0 1rem; }
.search-wrap {
  background: var(--bg);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  display: flex; align-items: center;
  padding: 0 1rem;
  transition: var(--t);
}
.search-wrap:focus-within {
  background: white;
  border-color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}
.search-icon { color: var(--text-secondary); margin-right: 8px; font-size: .95rem; }
.search-wrap input {
  background: transparent; border: none; outline: none;
  padding: .5rem 0; font-size: .88rem; font-weight: 600;
  font-family: var(--font); color: var(--text-primary); width: 100%;
}
.search-wrap input::placeholder { color: var(--text-secondary); }

/* Nav buttons */
.nav-icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: none; cursor: pointer;
  color: var(--text-primary); font-size: 1.1rem;
  transition: background .15s;
  text-decoration: none;
  position: relative;
}
.nav-icon-btn:hover { background: var(--border); color: var(--text-primary); }

/* =========================================================
   CATEGORY PILLS
   ========================================================= */
.category-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: 58px;
  z-index: 100;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav-inner {
  display: flex; gap: 8px; padding: 0 16px;
  white-space: nowrap;
  align-items: center;
}
.cat-pill {
  background: var(--bg);
  border-radius: var(--radius-full);
  padding: 7px 16px;
  font-size: .82rem; font-weight: 700;
  color: var(--text-primary);
  transition: var(--t);
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
}
.cat-pill:hover, .cat-pill.active {
  background: var(--text-primary);
  color: white;
}
.cat-pill.active { background: var(--primary); }

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero-section {
  background: linear-gradient(135deg, #1a0005 0%, #3d000f 40%, #E60023 100%);
  color: white;
  padding: 64px 0 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: .75rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.4);
}
.hero-title .brand { color: #FFD700; display: block; }
.hero-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  margin-bottom: 2rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}
.hero-stats {
  display: flex; gap: 32px; justify-content: center;
  margin-bottom: 2rem; flex-wrap: wrap;
}
.hero-stat-val {
  display: block;
  font-size: 2rem; font-weight: 900;
  color: #FFD700;
  line-height: 1;
}
.hero-stat-label {
  font-size: .75rem; font-weight: 700;
  color: rgba(255,255,255,.7);
  text-transform: uppercase; letter-spacing: 1px;
}
.signup-card {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
}
.signup-card .card-header {
  background: var(--primary);
  color: white;
  padding: 14px 20px;
  font-weight: 800;
  font-size: 1rem;
}
.signup-card .card-body { padding: 22px; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: white !important;
  font-weight: 800 !important;
  border-radius: var(--radius-full) !important;
  transition: var(--t) !important;
}
.btn-primary:hover {
  background: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(230,0,35,.4) !important;
}
.btn-dark-rp {
  background: #111;
  color: white;
  border: none;
  border-radius: var(--radius-full);
  padding: 10px 22px;
  font-weight: 800;
  font-size: .9rem;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: var(--t);
  text-decoration: none;
}
.btn-dark-rp:hover {
  background: #333;
  color: white;
  transform: translateY(-1px);
}
.btn-gold {
  background: linear-gradient(135deg, #FFD700, #FF8C00);
  color: #111;
  border: none;
  border-radius: var(--radius-full);
  padding: 10px 22px;
  font-weight: 900;
  font-size: .9rem;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: var(--t);
  text-decoration: none;
}
.btn-gold:hover {
  opacity: .9; transform: translateY(-1px);
  color: #111;
  box-shadow: 0 4px 14px rgba(255,215,0,.5);
}

/* =========================================================
   PIG CARDS (masonry grid — like pinfame pin cards)
   ========================================================= */
.pig-container {
  columns: 5 220px;
  column-gap: 16px;
  padding: 0 4px;
}
@media (max-width: 600px) { .pig-container { columns: 2 160px; column-gap: 10px; } }

.pig-item {
  break-inside: avoid;
  margin-bottom: 16px;
}
.pig-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: var(--t);
  cursor: pointer;
}
.pig-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.pig-img-wrapper {
  position: relative;
  overflow: hidden;
}
.pig-img-wrapper img {
  width: 100%; display: block;
  object-fit: cover;
  transition: transform .3s var(--ease);
}
.pig-card:hover .pig-img-wrapper img { transform: scale(1.03); }

/* Hover overlay */
.pig-hover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.55));
  opacity: 0;
  transition: opacity .2s;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 12px;
}
.pig-card:hover .pig-hover-overlay { opacity: 1; }

/* Info below card */
.pig-info { padding: 8px 10px 10px; }
.pig-title {
  font-weight: 800; font-size: .85rem;
  color: var(--text-primary);
  margin: 0 0 5px;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.pig-author {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 5px;
}
.pig-author-avatar {
  width: 24px; height: 24px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border);
}
.pig-author-name {
  font-size: .73rem; font-weight: 700;
  color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pig-author-name:hover { color: var(--primary); }

/* =========================================================
   SCORE BADGES
   ========================================================= */
.score-badge {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: .72rem; font-weight: 800;
  color: white;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.tier-champion { background: linear-gradient(135deg,#FFD700,#FF8C00) !important; color: #111 !important; text-shadow: none !important; }
.tier-worthy   { background: linear-gradient(135deg,#059669,#10b981) !important; }
.tier-marginal { background: linear-gradient(135deg,#f59e0b,#fbbf24) !important; color: #111 !important; text-shadow: none !important; }
.tier-pathetic { background: linear-gradient(135deg,#E60023,#ff4562) !important; }

/* =========================================================
   SCORE METER (3-part bar)
   ========================================================= */
.score-meter { display: flex; gap: 3px; height: 8px; border-radius: 4px; overflow: hidden; }
.score-meter-seg { flex: 1; border-radius: 4px; }
.score-meter-seg.filled-profile { background: #7c3aed; }
.score-meter-seg.filled-offer   { background: #E60023; }
.score-meter-seg.filled-energy  { background: #f59e0b; }
.score-meter-seg.empty          { background: #e5e5e5; }

/* =========================================================
   LEADERBOARD TABLE
   ========================================================= */
.lb-table {
  width: 100%; border-collapse: separate; border-spacing: 0 6px;
}
.lb-table thead th {
  font-size: .72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .7px; color: var(--text-secondary);
  padding: 0 12px 4px; border: none;
}
.lb-table tbody tr {
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  transition: var(--t);
}
.lb-table tbody tr:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.lb-table td {
  padding: 10px 12px;
  vertical-align: middle;
}
.lb-table td:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.lb-table td:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.lb-rank {
  font-size: 1.1rem; font-weight: 900; width: 40px;
  text-align: center;
}
.lb-rank-1 { color: #FFD700; }
.lb-rank-2 { color: #aaa; }
.lb-rank-3 { color: #CD7F32; }

/* =========================================================
   HOW IT WORKS STEPS
   ========================================================= */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.step-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-xs);
  border-top: 4px solid var(--primary);
  transition: var(--t);
}
.step-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.step-icon {
  width: 60px; height: 60px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-size: 1.6rem;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: .75rem; font-weight: 900;
  margin-bottom: 10px;
}
.step-title { font-size: 1rem; font-weight: 800; margin-bottom: 6px; }
.step-desc  { font-size: .82rem; color: var(--text-secondary); font-weight: 600; }

/* =========================================================
   SECTION HEADERS
   ========================================================= */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 8px;
}
.section-title {
  font-size: 1.3rem; font-weight: 900;
  color: var(--text-primary);
  margin: 0;
}

/* =========================================================
   CARD (generic white surface)
   ========================================================= */
.rp-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.rp-card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 800;
  display: flex; align-items: center; gap: 8px;
}
.rp-card-body { padding: 18px; }

/* =========================================================
   RATING SLIDERS
   ========================================================= */
.rating-slider-wrap { margin-bottom: 20px; }
.rating-slider-label {
  display: flex; justify-content: space-between;
  font-size: .82rem; font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.rating-slider-label span { color: var(--primary); font-size: .95rem; }
input[type=range].rp-slider {
  width: 100%; height: 6px;
  accent-color: var(--primary);
  cursor: pointer;
  border-radius: 4px;
}

/* =========================================================
   REFERRAL LINK BOX
   ========================================================= */
.ref-link-box {
  background: var(--primary-light);
  border: 2px dashed var(--primary);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; gap: 10px; align-items: center;
  flex-wrap: wrap;
}
.ref-link-input {
  flex: 1; min-width: 200px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-weight: 700; font-size: .88rem;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
}

/* =========================================================
   VIRALITY SHARE ROW
   ========================================================= */
.share-row {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.share-btn {
  border-radius: var(--radius-full);
  padding: 7px 16px;
  font-size: .78rem; font-weight: 800;
  border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  transition: var(--t);
  text-decoration: none;
}
.share-btn:hover { opacity: .85; transform: translateY(-1px); }
.share-btn-twitter  { background: #000; color: white; }
.share-btn-telegram { background: #0088cc; color: white; }
.share-btn-copy     { background: var(--primary); color: white; }

/* =========================================================
   FIXED FOOTER NAV
   ========================================================= */
.fixed-footer-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: white;
  border-top: 1px solid var(--border);
  z-index: 1000;
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
}
.footer-nav-container {
  display: flex; justify-content: space-around; align-items: center;
  max-width: 600px; margin: 0 auto;
}
.footer-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: .65rem; font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 12px;
  transition: var(--t);
}
.footer-nav-item i { font-size: 1.2rem; }
.footer-nav-item.active, .footer-nav-item:hover { color: var(--primary); }

/* =========================================================
   LOADING DOTS
   ========================================================= */
.loading-dots {
  display: flex; justify-content: center; gap: 8px; padding: 24px;
}
.loading-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary); opacity: .3;
  animation: dotPulse 1.2s ease-in-out infinite;
}
.loading-dot:nth-child(2) { animation-delay: .2s; }
.loading-dot:nth-child(3) { animation-delay: .4s; }
@keyframes dotPulse { 0%,80%,100% { opacity:.3; transform:scale(.8); } 40% { opacity:1; transform:scale(1.1); } }

/* =========================================================
   NOTIFICATION BADGE
   ========================================================= */
.notification-count {
  position: absolute; top: 1px; right: 1px;
  min-width: 16px; height: 16px;
  background: var(--primary); color: white;
  border-radius: var(--radius-full);
  font-size: .6rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  border: 2px solid white;
}

/* =========================================================
   FORM STYLES
   ========================================================= */
.form-label { font-weight: 700; font-size: .85rem; margin-bottom: 5px; color: var(--text-primary); }
.form-control, .form-select {
  border-radius: var(--radius-sm) !important;
  border: 2px solid var(--border) !important;
  font-family: var(--font) !important;
  font-size: .88rem !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  transition: var(--t) !important;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

/* =========================================================
   ALERTS
   ========================================================= */
.alert-rp {
  border-radius: var(--radius);
  padding: 14px 18px;
  font-weight: 700; font-size: .88rem;
  border-left: 4px solid;
}
.alert-rp.success { background: #d1fae5; border-color: #059669; color: #065f46; }
.alert-rp.danger  { background: #fee2e2; border-color: #E60023; color: #7f1d1d; }
.alert-rp.warning { background: #fef3c7; border-color: #f59e0b; color: #78350f; }
.alert-rp.info    { background: #dbeafe; border-color: #3b82f6; color: #1e3a8a; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: #f8f8f8;
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 12px 16px;
  font-size: .8rem; color: #999;
  margin-bottom: 70px;
}
.site-footer a { color: var(--primary); font-weight: 600; }
.site-footer a:hover { text-decoration: underline; }

/* =========================================================
   ANNOUNCEMENT BAR
   ========================================================= */
.announce-bar {
  background: linear-gradient(90deg, #1a0005, #E60023);
  color: white;
  text-align: center;
  padding: 7px 40px;
  font-size: .82rem; font-weight: 700;
  position: relative;
}
.announce-bar a { color: #FFD700; font-weight: 900; }
.announce-bar .close-btn {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,.7);
  font-size: 1.1rem; cursor: pointer; padding: 0; line-height: 1;
}

/* =========================================================
   PROFILE THUMBNAIL
   ========================================================= */
.nav-profile-thumb {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

/* =========================================================
   DASHBOARD STAT TILES
   ========================================================= */
.stat-tile {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  text-align: center;
  border-top: 3px solid var(--primary);
}
.stat-tile-val   { font-size: 2rem; font-weight: 900; color: var(--primary); line-height: 1; }
.stat-tile-label { font-size: .75rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .7px; margin-top: 4px; }

/* =========================================================
   UTILITIES
   ========================================================= */
.mx-auto  { margin-left: auto; margin-right: auto; }
.text-red { color: var(--primary); }
.text-gold{ color: #FFD700; }
.fw-900   { font-weight: 900; }
.gap-2    { gap: 8px; }
.d-flex   { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .hero-stats { gap: 20px; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .pig-container { columns: 2 150px; }
}
@media (max-width: 480px) {
  .steps-grid { grid-template-columns: 1fr; }
}
