/* ============================================================
   EARN PLATFORM - Main Stylesheet
   ============================================================ */

:root {
  --primary:    #6c3ff5;
  --primary-d:  #5429d4;
  --primary-l:  #ede9fe;
  --accent:     #f97316;
  --accent-d:   #ea6c0a;
  --green:      #10b981;
  --green-l:    #d1fae5;
  --red:        #ef4444;
  --yellow:     #f59e0b;
  --bg:         #f8f7ff;
  --surface:    #ffffff;
  --border:     #e5e7eb;
  --gray-50:    #f9fafb;
  --gray-100:   #f3f4f6;
  --gray-200:   #e5e7eb;
  --gray-400:   #9ca3af;
  --gray-500:   #6b7280;
  --gray-600:   #4b5563;
  --gray-700:   #374151;
  --gray-800:   #1f2937;
  --gray-900:   #111827;
  --radius:     12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --shadow:     0 2px 12px rgba(0,0,0,.08);
  --shadow-md:  0 4px 20px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.16);
  --transition: .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--gray-800); line-height: 1.6; font-size: 15px; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,h2,h3,h4,h5 { line-height: 1.25; font-weight: 700; color: var(--gray-900); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section-sm { padding: 32px 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 10px; font-size: .875rem; font-weight: 600;
  border: none; cursor: pointer; transition: all var(--transition);
  white-space: nowrap; text-decoration: none;
}
.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(108,63,245,.4); }
.btn-accent    { background: var(--accent); color: #fff; }
.btn-accent:hover  { background: var(--accent-d); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(249,115,22,.4); }
.btn-outline   { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-l); }
.btn-ghost     { background: var(--gray-100); color: var(--gray-700); border: 1.5px solid var(--gray-200); }
.btn-ghost:hover   { background: var(--gray-200); }
.btn-green     { background: var(--green); color: #fff; }
.btn-green:hover   { background: #059669; transform: translateY(-1px); }
.btn-lg        { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius); }
.btn-sm        { padding: 6px 14px; font-size: .78rem; }
.btn-full      { width: 100%; }
.btn-icon      { width: 38px; height: 38px; padding: 0; border-radius: 8px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: rgba(255,255,255,.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 20px;
}
.header-logo {
  font-size: 1.4rem; font-weight: 900; color: var(--primary); display: flex; align-items: center; gap: 8px;
}
.header-logo img { height: 36px; width: auto; }
.header-logo span { color: var(--accent); }
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a {
  padding: 7px 14px; border-radius: 8px; font-size: .875rem; font-weight: 500;
  color: var(--gray-600); transition: all var(--transition);
}
.header-nav a:hover, .header-nav a.active { background: var(--primary-l); color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.search-toggle  { background: var(--gray-100); border: 1.5px solid var(--gray-200); color: var(--gray-600); }
.search-toggle:hover { border-color: var(--primary); color: var(--primary); }
.menu-toggle { display: none; background: none; border: none; flex-direction: column; gap: 5px; padding: 6px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--gray-700); border-radius: 2px; transition: all var(--transition); }

/* Mobile Sidebar */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 600; }
.sidebar-overlay.open { display: block; }
.mobile-sidebar {
  position: fixed; top: 0; left: -280px; width: 280px; height: 100vh;
  background: #fff; z-index: 700; transition: left .3s ease;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
}
.mobile-sidebar.open { left: 0; }
.sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; font-size: .9rem; font-weight: 500; color: var(--gray-700);
  transition: all var(--transition);
}
.sidebar-nav a:hover { background: var(--primary-l); color: var(--primary); }
.sidebar-close { background: none; border: none; font-size: 1.1rem; color: var(--gray-500); }

/* Search bar overlay */
.search-bar {
  display: none; position: absolute; top: 64px; left: 0; right: 0;
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 12px 20px; box-shadow: var(--shadow);
}
.search-bar.open { display: block; }
.search-input-wrap {
  max-width: 600px; margin: 0 auto;
  display: flex; align-items: center; gap: 0;
  border: 2px solid var(--primary); border-radius: 10px; overflow: hidden;
}
.search-input-wrap input {
  flex: 1; padding: 10px 16px; border: none; outline: none;
  font-size: .9rem; color: var(--gray-800);
}
.search-input-wrap button { background: var(--primary); color: #fff; border: none; padding: 10px 16px; font-size: 1rem; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #1a0a4f 0%, #3d1b8e 50%, #6c3ff5 100%);
  padding: 72px 0 60px; text-align: center; position: relative; overflow: hidden;
}
.hero::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%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.2); border-radius: 20px;
  padding: 5px 14px; font-size: .78rem; font-weight: 600; margin-bottom: 20px;
  backdrop-filter: blur(8px);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; color: #fff;
  margin-bottom: 16px; line-height: 1.15;
}
.hero h1 span { color: var(--yellow); }
.hero p {
  font-size: 1.05rem; color: rgba(255,255,255,.8);
  max-width: 540px; margin: 0 auto 32px;
}
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 32px; justify-content: center; flex-wrap: wrap;
  margin-top: 48px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.12);
}
.hero-stat { text-align: center; }
.hero-stat-num { font-size: 1.6rem; font-weight: 900; color: #fff; }
.hero-stat-label { font-size: .75rem; color: rgba(255,255,255,.6); margin-top: 2px; }

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.sec-title { font-size: 1.5rem; font-weight: 800; position: relative; padding-left: 14px; }
.sec-title::before { content:''; position:absolute; left:0; top:0; bottom:0; width:4px; background:var(--primary); border-radius:2px; }
.sec-subtitle { font-size: .85rem; color: var(--gray-500); margin-top: 4px; font-weight: 400; }
.sec-link { font-size: .85rem; font-weight: 600; color: var(--primary); white-space: nowrap; display: flex; align-items: center; gap: 4px; }

/* ============================================================
   APP / GAME CARDS
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}
.app-card {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all var(--transition); position: relative;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }

.card-thumb {
  display: block; position: relative; aspect-ratio: 16/10; background: var(--gray-100);
  overflow: hidden;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.app-card:hover .card-thumb img { transform: scale(1.04); }
.card-thumb .no-img {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; background: linear-gradient(135deg, var(--primary-l), #ede9fe);
}
.card-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--primary); color: #fff;
  font-size: .62rem; font-weight: 800; padding: 3px 9px;
  border-radius: 20px; letter-spacing: .03em;
}
.card-badge.hot   { background: var(--red); }
.card-badge.new   { background: var(--green); }
.card-badge.top   { background: var(--yellow); color: var(--gray-900); }
.card-tag {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,.6); color: #fff;
  font-size: .6rem; font-weight: 700; padding: 2px 8px;
  border-radius: 12px; backdrop-filter: blur(4px);
}
.card-discount {
  position: absolute; top: 10px; right: 10px;
  background: var(--red); color: #fff;
  font-size: .65rem; font-weight: 800; padding: 3px 7px; border-radius: 8px;
}

.card-icon {
  position: absolute; bottom: -22px; left: 12px;
  width: 46px; height: 46px; border-radius: 12px;
  border: 3px solid #fff; overflow: hidden;
  background: var(--gray-200); box-shadow: var(--shadow);
  z-index: 2;
}
.card-icon img { width: 100%; height: 100%; object-fit: cover; }
.card-icon .icon-placeholder { width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:1.4rem;background:linear-gradient(135deg,var(--primary),var(--accent)); }

.card-body { padding: 34px 14px 16px; }
.card-cat  { font-size: .68rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.card-name { font-size: .92rem; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; line-height: 1.3;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-earn {
  font-size: .75rem; font-weight: 700; color: var(--green);
  background: var(--green-l); border-radius: 6px;
  padding: 3px 8px; display: inline-block; margin-bottom: 8px;
}
.card-stars { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.card-stars .stars i { font-size: .65rem; color: var(--yellow); }
.card-stars span { font-size: .72rem; color: var(--gray-500); }
.card-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.card-chip {
  font-size: .64rem; font-weight: 600; color: var(--gray-600);
  background: var(--gray-100); border-radius: 6px; padding: 2px 7px;
  display: flex; align-items: center; gap: 3px;
}
.card-price { margin-bottom: 10px; }
.card-price .sell { font-size: .95rem; font-weight: 800; color: var(--gray-900); }
.card-price .was  { font-size: .75rem; color: var(--gray-400); text-decoration: line-through; margin-left: 4px; }
.card-cta .btn { font-size: .8rem; padding: 9px 14px; width: 100%; }

/* ============================================================
   PLATFORM BADGES
   ============================================================ */
.platform-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.platform-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .63rem; font-weight: 600; color: var(--gray-600);
  border: 1px solid var(--gray-200); border-radius: 6px; padding: 2px 7px;
}
.platform-badge i { font-size: .65rem; }

/* ============================================================
   CATEGORY PILLS (filter bar)
   ============================================================ */
.filter-bar {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 16px 20px;
  margin-bottom: 24px; display: flex; flex-direction: column; gap: 14px;
}
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-label { font-size: .75rem; font-weight: 700; color: var(--gray-500); white-space: nowrap; min-width: 60px; }
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.fpill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 14px; border-radius: 20px; font-size: .78rem; font-weight: 600;
  color: var(--gray-600); background: var(--gray-100); border: 1.5px solid var(--gray-200);
  text-decoration: none; transition: all var(--transition); cursor: pointer;
}
.fpill:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-l); }
.fpill.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.fpill i { font-size: .7rem; }

/* Sort select */
.sort-select {
  padding: 7px 12px; border: 1.5px solid var(--gray-200); border-radius: 8px;
  font-size: .82rem; color: var(--gray-700); background: #fff; cursor: pointer;
  outline: none;
}
.sort-select:focus { border-color: var(--primary); }

/* ============================================================
   PAGE HERO (listings)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  padding: 48px 0 36px; color: #fff;
}
.page-hero h1  { font-size: clamp(1.5rem, 4vw, 2.2rem); color: #fff; margin-bottom: 8px; }
.page-hero p   { color: rgba(255,255,255,.75); font-size: .9rem; margin: 0; }
.page-hero-meta { display: flex; align-items: center; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.hero-meta-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.9); font-size: .75rem; font-weight: 600;
  padding: 4px 12px; border-radius: 20px;
}

/* ============================================================
   APP DETAIL PAGE
   ============================================================ */
.detail-grid {
  display: grid; grid-template-columns: 1fr 400px; gap: 40px;
  align-items: start; padding-top: 36px;
}
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; gap: 24px; } }

.detail-gallery .main-img {
  border-radius: var(--radius-xl); overflow: hidden; cursor: zoom-in;
  background: var(--gray-100); aspect-ratio: 16/10; position: relative;
}
.detail-gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.detail-gallery .thumb {
  width: 72px; height: 52px; border-radius: 8px; overflow: hidden;
  cursor: pointer; border: 2px solid transparent; transition: border-color var(--transition);
}
.detail-gallery .thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-gallery .thumb.active, .detail-gallery .thumb:hover { border-color: var(--primary); }

/* Info panel */
.detail-panel {}
.detail-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.detail-icon { width: 72px; height: 72px; border-radius: 18px; overflow: hidden; flex-shrink: 0; box-shadow: var(--shadow-md); background: var(--gray-100); }
.detail-icon img { width: 100%; height: 100%; object-fit: cover; }
.detail-icon .icon-placeholder { width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:2rem;background:linear-gradient(135deg,var(--primary),var(--accent)); }
.detail-title  { font-size: 1.6rem; font-weight: 900; margin-bottom: 4px; line-height: 1.2; }
.detail-cat-badge {
  display: inline-flex; align-items: center; gap: 5px; margin-bottom: 6px;
  font-size: .72rem; font-weight: 700; color: var(--primary);
  background: var(--primary-l); padding: 3px 10px; border-radius: 20px;
}
.detail-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.detail-rating .stars i { color: var(--yellow); }
.rating-num  { font-size: 1rem; font-weight: 800; color: var(--gray-900); }
.rating-cnt  { font-size: .78rem; color: var(--gray-500); }

/* Earn badge */
.earn-badge {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border: 1.5px solid #34d399; border-radius: var(--radius);
  padding: 14px 18px; margin: 14px 0;
}
.earn-badge i { font-size: 1.8rem; color: #059669; }
.earn-badge-label { font-size: .7rem; font-weight: 700; color: #065f46; text-transform: uppercase; letter-spacing: .06em; }
.earn-badge-value { font-size: 1.2rem; font-weight: 900; color: #065f46; }

/* Specs grid */
.specs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px,1fr));
  gap: 10px; margin: 14px 0;
}
.spec-box {
  background: var(--gray-50); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px;
}
.spec-box-label { font-size: .65rem; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.spec-box-val   { font-size: .85rem; font-weight: 700; color: var(--gray-800); }

/* Price block */
.price-block { margin: 14px 0; }
.price-sell { font-size: 1.6rem; font-weight: 900; color: var(--gray-900); }
.price-was  { font-size: 1rem; color: var(--gray-400); text-decoration: line-through; margin-left: 8px; }
.price-off  { background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 8px; margin-left: 6px; }
.price-save { font-size: .82rem; color: var(--green); font-weight: 600; margin-top: 4px; }

/* Countdown */
.countdown-wrap { margin: 12px 0; }
.countdown-title { font-size: .78rem; font-weight: 700; color: var(--red); margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
.countdown-timer { display: flex; gap: 8px; }
.cd-unit { text-align: center; }
.cd-num  { display: block; background: var(--gray-900); color: #fff; font-size: 1.5rem; font-weight: 900; min-width: 48px; padding: 6px 4px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.cd-word { font-size: .58rem; color: var(--gray-500); font-weight: 700; text-transform: uppercase; margin-top: 4px; }

/* CTA actions */
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.detail-actions .btn-cta { flex: 1; min-width: 180px; font-size: .95rem; padding: 14px 20px; }
.detail-actions .btn-share { padding: 14px 20px; }

/* Iframe preference */
.iframe-pref {
  display: flex; align-items: center; gap: 10px;
  font-size: .82rem; color: var(--gray-600); margin-bottom: 10px; cursor: pointer;
  user-select: none;
}
.iframe-pref input { display: none; }
.toggle-track {
  width: 38px; height: 22px; background: var(--gray-300);
  border-radius: 11px; position: relative; flex-shrink: 0; transition: background .2s;
}
.iframe-pref input:checked + .toggle-track { background: var(--primary); }
.toggle-track::after {
  content:''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; background: #fff; border-radius: 50%;
  transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.iframe-pref input:checked + .toggle-track::after { left: 19px; }

/* Short description */
.short-desc { font-size: .88rem; color: var(--gray-600); line-height: 1.75; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 8px; }

/* ============================================================
   CONTENT SECTIONS (detail page)
   ============================================================ */
.content-card {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 28px 32px; margin-bottom: 24px;
}
@media (max-width: 600px) { .content-card { padding: 20px 16px; } }
.content-card-title {
  font-size: 1.1rem; font-weight: 800; color: var(--gray-900);
  margin-bottom: 20px; display: flex; align-items: center; gap: 8px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.full-desc { font-size: .9rem; line-height: 1.85; color: var(--gray-700); }
.full-desc h2,.full-desc h3 { margin: 20px 0 10px; }
.full-desc p { margin-bottom: 12px; }
.full-desc ul,.full-desc ol { padding-left: 20px; margin-bottom: 12px; }
.full-desc li { margin-bottom: 6px; }

/* ============================================================
   COUPONS
   ============================================================ */
.coupons-list { display: flex; flex-direction: column; gap: 12px; }
.coupon-card {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  border: 2px dashed var(--primary); border-radius: var(--radius);
  padding: 14px 18px; background: linear-gradient(135deg,#f5f3ff,#ede9fe);
}
.coupon-left { flex: 1; min-width: 180px; }
.coupon-label { font-size: .65rem; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 3px; }
.coupon-title { font-size: .92rem; font-weight: 700; color: var(--gray-900); margin-bottom: 3px; }
.coupon-desc  { font-size: .78rem; color: var(--gray-500); }
.coupon-expiry{ font-size: .72rem; color: var(--red); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.coupon-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.coupon-benefit { font-size: 1rem; font-weight: 900; color: var(--primary); }
.code-wrap {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.8); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 5px 10px;
}
.code-text { font-family: 'Courier New', monospace; font-size: .88rem; font-weight: 900; letter-spacing: .1em; color: var(--gray-900); }
.btn-copy { background: none; border: none; color: var(--primary); font-size: .85rem; padding: 2px 4px; transition: transform .15s; }
.btn-copy:hover { transform: scale(1.2); }
.copy-ok { display: none; font-size: .72rem; font-weight: 700; color: var(--green); }

/* ============================================================
   REVIEWS
   ============================================================ */
.rating-summary-box {
  display: grid; grid-template-columns: auto 1fr; gap: 24px;
  background: var(--gray-50); border-radius: var(--radius); padding: 20px;
  margin-bottom: 24px; align-items: center;
}
@media (max-width: 480px) { .rating-summary-box { grid-template-columns: 1fr; } }
.rating-big-num { font-size: 3.8rem; font-weight: 900; color: var(--gray-900); line-height: 1; text-align: center; }
.rating-big-stars { justify-content: center; margin: 4px 0; }
.rating-big-stars .stars i { font-size: .9rem; color: var(--yellow); }
.rating-big-cnt  { font-size: .75rem; color: var(--gray-500); text-align: center; }
.rating-bars { display: flex; flex-direction: column; gap: 6px; }
.bar-row { display: flex; align-items: center; gap: 8px; font-size: .76rem; color: var(--gray-600); }
.bar-track { flex: 1; height: 7px; background: var(--gray-200); border-radius: 4px; overflow: hidden; }
.bar-fill  { height: 100%; background: var(--yellow); border-radius: 4px; transition: width .6s ease; }

.reviews-list { display: flex; flex-direction: column; gap: 16px; }
.review-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px;
  transition: box-shadow var(--transition);
}
.review-card:hover { box-shadow: var(--shadow); }
.review-head { display: flex; gap: 12px; margin-bottom: 10px; }
.review-avatar {
  width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1rem;
}
.review-avatar img { width: 100%; height: 100%; object-fit: cover; }
.review-name   { font-weight: 700; font-size: .9rem; color: var(--gray-900); display: flex; align-items: center; gap: 6px; }
.verified-chip { font-size: .65rem; font-weight: 700; color: var(--green); display: inline-flex; align-items: center; gap: 2px; }
.review-city   { font-size: .72rem; color: var(--gray-400); }
.review-date   { font-size: .72rem; color: var(--gray-400); }
.review-title  { font-weight: 700; font-size: .88rem; margin-bottom: 5px; color: var(--gray-800); }
.review-body   { font-size: .85rem; color: var(--gray-600); line-height: 1.65; }
.review-pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.pros-box,.cons-box { font-size: .78rem; padding: 8px 12px; border-radius: 8px; }
.pros-box { background: var(--green-l); color: #065f46; }
.cons-box { background: #fef2f2; color: #991b1b; }
.pros-box strong,.cons-box strong { display: block; margin-bottom: 2px; }

/* ============================================================
   IFRAME OVERLAY
   ============================================================ */
.iframe-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: #000; flex-direction: column;
}
.iframe-overlay.open { display: flex; }
.iframe-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: #1a1a2e; color: #fff; padding: 0 20px; height: 52px; flex-shrink: 0;
}
.iframe-bar-title { font-size: .9rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.iframe-bar-actions { display: flex; gap: 6px; }
.iframe-action {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; background: rgba(255,255,255,.1);
  border: none; color: #fff; border-radius: 8px; font-size: .85rem; cursor: pointer;
  text-decoration: none; transition: background var(--transition);
}
.iframe-action:hover { background: rgba(255,255,255,.2); }
.iframe-overlay iframe { flex: 1; border: none; width: 100%; }

/* Lightbox */
.lightbox { display:none; position:fixed;inset:0;background:rgba(0,0,0,.92);z-index:3000;align-items:center;justify-content:center; }
.lightbox.open { display:flex; }
.lightbox img { max-width:90vw;max-height:90vh;border-radius:12px;object-fit:contain; }
.lb-close { position:absolute;top:20px;right:24px;background:rgba(255,255,255,.15);border:none;color:#fff;width:40px;height:40px;border-radius:50%;cursor:pointer;font-size:1.1rem;transition:background var(--transition); }
.lb-close:hover { background:rgba(255,255,255,.3); }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: .8rem; color: var(--gray-500); margin-bottom: 20px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }

/* ============================================================
   BANNERS (hero slider)
   ============================================================ */
.banner-section { background: var(--gray-100); padding: 0; overflow: hidden; }
.banner-slider { position: relative; }
.banner-slide {
  display: none; min-height: 280px; align-items: center;
  background: linear-gradient(135deg, var(--primary-d), var(--primary));
  padding: 40px 0; color: #fff;
}
.banner-slide.active { display: flex; }
.banner-slide img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .25; }
.banner-content { position: relative; z-index: 1; }
.banner-title    { font-size: 1.8rem; font-weight: 900; color: #fff; margin-bottom: 8px; }
.banner-subtitle { color: rgba(255,255,255,.8); margin-bottom: 20px; }
.banner-dots { display: flex; gap: 6px; justify-content: center; padding: 12px 0; background: var(--gray-100); }
.banner-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gray-300); border: none; cursor: pointer; transition: background var(--transition); }
.banner-dot.active { background: var(--primary); width: 20px; border-radius: 4px; }

/* ============================================================
   TAGS
   ============================================================ */
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.tag {
  font-size: .7rem; font-weight: 600; padding: 3px 10px; border-radius: 20px;
  background: var(--primary-l); color: var(--primary); border: 1px solid #d4c5fc;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 32px 0 8px; flex-wrap: wrap; }
.page-btn {
  min-width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: .85rem; font-weight: 600;
  color: var(--gray-700); background: var(--surface); border: 1.5px solid var(--border);
  text-decoration: none; transition: all var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--gray-900); color: #fff; padding: 56px 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px;
}
.footer-brand-name { font-size: 1.3rem; font-weight: 900; color: #fff; margin-bottom: 10px; }
.footer-brand-name span { color: var(--accent); }
.footer-brand-desc { font-size: .85rem; color: rgba(255,255,255,.5); line-height: 1.7; margin-bottom: 16px; }
.footer-social { display: flex; gap: 8px; }
.social-icon {
  width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.6); font-size: .85rem;
  transition: all var(--transition); text-decoration: none;
}
.social-icon:hover { background: var(--primary); color: #fff; }
.footer-heading { font-size: .8rem; font-weight: 800; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: .85rem; color: rgba(255,255,255,.55); transition: color var(--transition); }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.footer-bottom p { font-size: .8rem; color: rgba(255,255,255,.4); }

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash { padding: 12px 16px; border-radius: 10px; margin: 16px 0; font-size: .88rem; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.flash-success { background: var(--green-l); color: #065f46; border: 1px solid #34d399; }
.flash-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state-icon { font-size: 4rem; margin-bottom: 16px; }
.empty-state h2  { font-size: 1.3rem; margin-bottom: 8px; }
.empty-state p   { color: var(--gray-500); margin-bottom: 24px; }

/* ============================================================
   QUICK SEARCH (homepage)
   ============================================================ */
.home-search {
  max-width: 560px; margin: 24px auto 0;
  display: flex; border: none; border-radius: 12px; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.home-search input {
  flex: 1; padding: 14px 20px; border: none; outline: none;
  font-size: .95rem; color: var(--gray-800);
}
.home-search button {
  padding: 14px 24px; background: var(--accent); color: #fff;
  border: none; font-size: 1rem; font-weight: 700;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cards-grid  { grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); }
}
@media (max-width: 768px) {
  .header-nav { display: none; }
  .menu-toggle { display: flex; }
  .section { padding: 40px 0; }
  .hero { padding: 52px 0 40px; }
  .detail-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .cards-grid  { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats  { gap: 20px; }
  .cards-grid  { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-body   { padding: 34px 10px 12px; }
  .detail-actions { flex-direction: column; }
  .detail-actions .btn-cta { min-width: unset; }
}

/* ============================================================
   GALLERY: CONTAINED COVER + VIDEO THUMBS  (added)
   ============================================================ */
.detail-gallery .main-img.is-contain {
  background: linear-gradient(135deg, var(--gray-200), var(--gray-200));
  cursor: zoom-in;
}
.detail-gallery .main-img.is-contain img { object-fit: contain; padding: 10px; }

.detail-gallery .thumb-video { position: relative; background: #0f172a; }
.detail-gallery .thumb-video img { opacity: .8; }
.detail-gallery .thumb-video .vthumb-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.85); font-size: 1.1rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.detail-gallery .thumb-video .thumb-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .8rem; text-shadow: 0 1px 4px rgba(0,0,0,.6); pointer-events: none;
}
.detail-gallery .thumb-video .thumb-play i {
  background: rgba(0,0,0,.45); width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(2px);
}

/* ============================================================
   VIDEO LIGHTBOX  (added)
   ============================================================ */
.video-lightbox { align-items: center; justify-content: center; }
.video-lightbox-inner { width: min(960px, 94vw); }
.video-frame { position: relative; width: 100%; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ============================================================
   FAQ ACCORDION  (added)
   ============================================================ */
.faq-accordion { display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); transition: box-shadow var(--transition); }
.faq-item.open { box-shadow: var(--shadow); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; background: none; border: none; text-align: left;
  font-size: .92rem; font-weight: 700; color: var(--gray-800); cursor: pointer;
}
.faq-q i { transition: transform var(--transition); color: var(--primary); flex-shrink: 0; }
.faq-item.open .faq-q i { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-item.open .faq-a { max-height: 600px; }
.faq-a-inner { padding: 0 18px 16px; font-size: .88rem; line-height: 1.7; color: var(--gray-600); }

/* ============================================================
   SCROLL REVEAL ANIMATIONS  (added)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; will-change: opacity, transform; }
  .reveal.revealed { opacity: 1; transform: none; }
}
.app-card { transition: transform var(--transition), box-shadow var(--transition); }
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
@keyframes ep-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.detail-grid { animation: ep-fade-in .45s ease both; }
