/* PREMIUM LAYER — loaded after the theme. Works with every theme (old and new).
   Adds: app-style home, Google button, ad slots, subscription cards, animations. */

body { animation: pageIn .35s ease both; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Scroll reveal + 3D tilt ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.2,.8,.2,1), transform .6s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.tilt { transform-style: preserve-3d; transition: transform .18s ease-out, box-shadow .25s ease; will-change: transform; }

/* ---------- Google button (classic blue "Sign in with Google") ---------- */
.google-btn {
  display: flex; align-items: stretch; width: 100%; padding: 0; overflow: hidden;
  background: #4285F4; color: #fff; border: 1px solid #4285F4; border-radius: 6px;
  font-family: 'Roboto', Arial, sans-serif; font-size: 15px; font-weight: 500; text-decoration: none;
  cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: box-shadow .2s ease, background .2s ease;
}
.google-btn:hover { background: #3B78DC; box-shadow: 0 2px 8px rgba(66,133,244,.45); }
.google-btn:active { background: #3367C4; }
.google-btn .g-logo { background: #fff; width: 46px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin: 1px; border-radius: 5px 0 0 5px; }
.google-btn .g-logo svg { width: 20px; height: 20px; display: block; }
.google-btn .g-text { flex: 1; text-align: center; padding: 12px 14px; color: #fff; }

.or-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--text-dim); font-size: 12px; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--card-border); }

/* ---------- Ads ---------- */
.ad-slot { max-width: 560px; margin: 10px auto; padding: 0 14px; display: grid; gap: 10px; }
.ad-slot .ad-item { position: relative; display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--card-border); background: var(--card-bg); text-decoration: none; }
.ad-slot .ad-item img { width: 100%; display: block; }
.ad-slot .ad-label { position: absolute; top: 6px; right: 8px; font-size: 9px; letter-spacing: .5px; text-transform: uppercase; background: rgba(0,0,0,.45); color: #fff; padding: 2px 6px; border-radius: 6px; }
.ad-slot .ad-code { padding: 8px; text-align: center; }

/* ---------- Subscription cards ---------- */
.sub-card { text-align: center; }
.sub-card img { width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 12px; object-fit: cover; }

/* ---------- App-style home ---------- */
.app-home { max-width: 560px; margin: 0 auto; padding: 14px 14px 96px; }
.app-home .section-title { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 4px 10px; font-size: 15px; font-weight: 800; }
.app-home .section-title a { font-size: 12px; font-weight: 600; color: var(--text-dim); text-decoration: none; }
.app-welcome { padding: 18px; display: flex; align-items: center; gap: 14px; }
.app-welcome .app-logo { width: 52px; height: 52px; border-radius: 15px; object-fit: cover; flex-shrink: 0; background: var(--accent); color: var(--accent-text); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; }
.app-brand-name { font-size: 22px; font-weight: 800; line-height: 1.1; }
.app-welcome .app-tagline { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.app-auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 4px; }
.app-auth-row .pill-btn { text-align: center; padding: 14px; font-size: 15px; }

.chip-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; -ms-overflow-style: none; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; padding: 12px 16px; min-width: 112px; text-align: center; scroll-snap-align: start; }
.chip .num { font-size: 19px; font-weight: 800; }
.chip .lbl { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .4px; margin-top: 2px; }

.tile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile { text-decoration: none; color: var(--text); text-align: center; padding: 12px 4px; border-radius: 18px; background: var(--card-bg); border: 1px solid var(--card-border); transition: transform .18s ease, box-shadow .2s ease; display: block; }
.tile:active { transform: scale(.94); }
.tile .tile-ico { width: 44px; height: 44px; margin: 0 auto 6px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--stat-bg); overflow: hidden; }
.tile .tile-ico img { width: 100%; height: 100%; object-fit: cover; }
.tile .tile-name { font-size: 10.5px; font-weight: 700; line-height: 1.2; word-break: break-word; }

.snap-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 10px; scrollbar-width: none; }
.snap-row::-webkit-scrollbar { display: none; }
.snap-row > div { flex: 0 0 74%; scroll-snap-align: start; }
.snap-row .feature-card { height: 100%; text-align: left; }

.step-list { display: grid; gap: 10px; }
.step-item { display: flex; gap: 14px; align-items: center; padding: 14px 16px; }
.step-item .step-num { flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px; background: var(--accent); color: var(--accent-text); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.step-item b { display: block; font-size: 14px; }
.step-item span { font-size: 12px; color: var(--text-dim); }

.app-foot { text-align: center; font-size: 11px; color: var(--text-dim); margin-top: 26px; }

.bottom-tabs { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.bottom-tabs a { transition: transform .15s ease; }
.bottom-tabs a:active { transform: scale(.9); }

/* Desktop: keep the app feel — centered phone-width column with a soft frame */
@media (min-width: 900px) {
  .app-home { padding-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
