/* === Daily Slice — Shared Styles === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #F8F6F3; --bg-alt: #EDE8E3; --text: #2D3436; --text-light: #636E72;
  --purple: #6C5CE7; --green: #00B894; --coral: #E17055; --blue: #0984E3;
  --card: #FFFFFF; --border: #DFE6E9;
  --shadow: rgba(45,52,54,.08); --radius: 16px; --transition: .3s cubic-bezier(.4,0,.2,1);
  --max-w: 1200px; --header-h: 64px;
  --font-d: 'Playfair Display', Georgia, serif;
  --font-b: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-b); color: var(--text); background: var(--bg); line-height: 1.7; overflow-x: hidden; }
a { color: var(--purple); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green); }
h1,h2,h3,h4 { font-family: var(--font-d); line-height: 1.3; font-weight: 700; }
h1 { font-size: clamp(2rem,5vw,3.5rem); } h2 { font-size: clamp(1.5rem,3.5vw,2.5rem); } h3 { font-size: clamp(1.2rem,2.5vw,1.8rem); }
img { max-width: 100%; height: auto; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* Touch and scroll optimizations */
html { -webkit-tap-highlight-color: transparent; }
* { -webkit-touch-callout: none; }
input, textarea, button, select { font-size: 16px; } /* Prevent iOS zoom on focus */
@media(max-width:768px) {
  body { -webkit-overflow-scrolling: touch; }
  .quiz-option, .btn-primary, .btn-share, .filter-btn { touch-action: manipulation; }
}

/* --- Header --- */
.site-header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); background: rgba(248,246,243,.88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid rgba(223,230,233,.5); z-index: 1000; transition: all var(--transition); }
.site-header.scrolled { box-shadow: 0 4px 20px var(--shadow); }
.header-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-d); font-size: 1.3rem; font-weight: 700; color: var(--text); text-decoration: none; }
.logo-icon { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--purple), var(--green)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: .85rem; font-weight: 800; font-family: var(--font-b); }
.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav a { font-size: .95rem; font-weight: 500; color: var(--text-light); text-decoration: none; position: relative; padding: 4px 0; transition: color var(--transition); }
.site-nav a:hover, .site-nav a.active { color: var(--purple); }
.site-nav a.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--purple); border-radius: 1px; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; font-size: 1.5rem; color: var(--text); }
@media(max-width:768px){
  .menu-toggle { display: block; }
  .site-nav { position: fixed; top: var(--header-h); left: 0; right: 0; background: rgba(248,246,243,.98); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); flex-direction: column; padding: 24px; gap: 16px; transform: translateY(-120%); transition: transform var(--transition); border-bottom: 1px solid var(--border); box-shadow: 0 8px 30px rgba(0,0,0,.1); max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .site-nav.open { transform: translateY(0); }
  .site-nav a { font-size: 1.05rem; padding: 8px 0; }
  .header-inner { padding: 0 16px; }
}

/* --- Footer --- */
.site-footer { background: var(--text); color: #B2BEC3; padding: 48px 0 24px; }
.footer-grid { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p { margin-top: 12px; font-size: .9rem; line-height: 1.6; color: #95A5A6; }
.site-footer h4 { color: #fff; font-family: var(--font-b); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 16px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: #95A5A6; font-size: .9rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--green); }
.footer-bottom { max-width: var(--max-w); margin: 0 auto; padding: 24px 24px 0; margin-top: 40px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: .8rem; color: #636E72; }
.footer-disclaimer { font-size: .78rem; color: #636E72; margin-top: 16px; line-height: 1.5; }
@media(max-width:768px){
  .site-footer { padding: 32px 0 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding: 0 16px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; text-align: center; padding: 20px 16px 0; gap: 8px; }
  .site-footer h4 { margin-bottom: 12px; }
  .footer-links { gap: 8px; }
}

/* --- Animations --- */
@keyframes fadeInUp { from{opacity:0;transform:translateY(30px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
@keyframes sliceRotate { from{transform:rotate(0)} to{transform:rotate(360deg)} }
@keyframes gradientShift { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
.anim-fadeUp { animation: fadeInUp .6s ease forwards; }
.anim-fade { animation: fadeIn .4s ease forwards; }
.anim-float { animation: float 3s ease-in-out infinite; }

/* --- Buttons --- */
.btn-primary { display: inline-flex; align-items: center; gap: 10px; padding: 16px 40px; background: linear-gradient(135deg, var(--purple), #5A4BD1); color: #fff; border: none; border-radius: 50px; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: all var(--transition); position: relative; overflow: hidden; text-decoration: none; box-shadow: 0 8px 30px rgba(108,92,231,.3); font-family: var(--font-b); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(108,92,231,.4); color: #fff; }
.btn-primary::before { content:''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent); transition: left .5s; }
.btn-primary:hover::before { left: 100%; }
.btn-share { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 50px; font-size: .95rem; font-weight: 600; cursor: pointer; transition: all var(--transition); border: none; text-decoration: none; font-family: var(--font-b); }
.btn-facebook { background: #1877F2; color: #fff; } .btn-facebook:hover { background: #1565C0; color: #fff; transform: translateY(-2px); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); } .btn-secondary:hover { border-color: var(--purple); color: var(--purple); transform: translateY(-2px); }

/* --- Ad Slot --- */
.ad-slot { background: var(--bg-alt); border: 1px dashed var(--border); border-radius: 8px; padding: 20px; text-align: center; margin: 32px 0; font-size: .82rem; color: var(--text-light); }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: var(--bg); } ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* --- Static Page --- */
.static-page { padding: calc(var(--header-h) + 40px) 24px 80px; }
.static-page .container { max-width: 780px; }
.static-page h1 { margin-bottom: 24px; }
.static-page h2 { margin: 36px 0 16px; }
.static-page p { margin-bottom: 16px; line-height: 1.8; color: #3D3D3D; }
.static-page ul, .static-page ol { margin: 16px 0; padding-left: 24px; }
.static-page li { margin-bottom: 8px; line-height: 1.7; }

/* === Mobile Global Optimizations === */
@media(max-width:768px) {
  /* Viewport fixes */
  body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  
  /* Container padding */
  .container { padding: 0 16px; }
  
  /* Button full-width on mobile */
  .btn-primary { width: 100%; justify-content: center; }
  
  /* Ad slots */
  .ad-slot { margin: 20px 0; padding: 16px; font-size: .75rem; }
}

/* Extra small screens */
@media(max-width:480px) {
  :root { --header-h: 56px; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.1rem; }
  
  /* Touch targets minimum 44px */
  button, a, .btn-primary, .btn-share { min-height: 44px; }
  
  /* Safe area for modern phones */
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}
