/* ===================================
   Bubu Browser — Premium Design System
   =================================== */

/* --- CSS Variables --- */
:root {
  --primary-start: #E64A19;
  --primary-mid: #F85A2A;
  --primary-end: #E91E63;
  --gradient: linear-gradient(135deg, var(--primary-start) 0%, var(--primary-mid) 40%, #FF758F 70%, var(--primary-end) 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(230,74,25,0.06) 0%, rgba(233,30,99,0.06) 100%);

  --bg: #f5f6fa;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --bg-code: #f0f2f5;

  --text-primary: #1a1a2e;
  --text-body: #3a3a4a;
  --text-muted: #6b7280;
  --text-white: #ffffff;

  --border: #e5e7eb;
  --border-light: #f0f1f3;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-glow: 0 4px 24px rgba(230,74,25,0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --font-sans: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary-start);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-end);
}

img {
  max-width: 100%;
  height: auto;
}

/* --- Layout --- */
.container {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px;
}


/* =====================
   LANDING PAGE (index)
   ===================== */

/* --- Header / Navbar --- */
header {
  background: var(--gradient);
  color: var(--text-white);
  padding: 60px 24px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.08) 0%, transparent 50%);
  pointer-events: none;
}

header h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  position: relative;
}

header p {
  font-size: 1.05rem;
  opacity: 0.92;
  font-weight: 400;
  letter-spacing: 1.5px;
  position: relative;
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding-top: 64px;
  padding-bottom: 64px;
}

.hero h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.08rem;
  color: var(--text-body);
  max-width: 640px;
  margin: 0 auto 28px;
}

/* --- Button --- */
.button {
  display: inline-block;
  background: var(--gradient);
  color: var(--text-white);
  padding: 15px 36px;
  border-radius: var(--radius-xl);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: var(--shadow-glow);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition);
  border-radius: inherit;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(230,74,25,0.25);
  color: var(--text-white);
}

.button:hover::after {
  background: rgba(255,255,255,0.1);
}

.button:active {
  transform: translateY(0);
}

/* --- Features --- */
.features {
  padding-top: 48px;
  padding-bottom: 64px;
}

.features h2 {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 32px;
}

.feature-card {
  background: var(--bg-card);
  padding: 32px 28px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* --- Legal Section (Landing) --- */
.legal {
  text-align: center;
  padding-top: 32px;
  padding-bottom: 48px;
}

.legal h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.legal-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.legal-links a {
  display: inline-block;
  padding: 12px 28px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.legal-links a:hover {
  border-color: var(--primary-start);
  color: var(--primary-start);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* --- Footer --- */
footer {
  background: var(--text-primary);
  color: var(--text-white);
  text-align: center;
  padding: 36px 24px;
  margin-top: 0;
}

footer p {
  font-size: 0.9rem;
  opacity: 0.8;
  letter-spacing: 0.3px;
}


/* ===============================
   POLICY / LEGAL PAGES
   (privacy-policy, terms-of-service)
   =============================== */

/* --- Policy Header Bar --- */
.policy-header {
  background: var(--gradient);
  color: var(--text-white);
  padding: 40px 24px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.policy-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.07) 0%, transparent 50%);
  pointer-events: none;
}

.policy-header h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  position: relative;
}

.policy-header .meta {
  font-size: 0.95rem;
  opacity: 0.9;
  position: relative;
}

.policy-header .meta strong {
  font-weight: 600;
}

.policy-back {
  position: absolute;
  top: 20px;
  left: 24px;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
  z-index: 2;
}

.policy-back:hover {
  color: #fff;
}

/* --- Policy Content Card --- */
.policy-content {
  max-width: 800px;
  margin: -24px auto 48px;
  padding: 48px 48px 56px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.policy-content .developer-info {
  background: var(--gradient-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 32px;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text-body);
}

.policy-content .developer-info strong {
  color: var(--text-primary);
}

/* --- Section Headings --- */
.policy-content h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 40px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-light);
  position: relative;
}

.policy-content h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--gradient);
  border-radius: 1px;
}

.policy-content h3 {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 28px;
  margin-bottom: 10px;
}

/* --- Paragraphs & Lists --- */
.policy-content p {
  margin-bottom: 14px;
  color: var(--text-body);
  font-size: 0.96rem;
  line-height: 1.8;
}

.policy-content ul {
  margin: 8px 0 18px 0;
  padding-left: 0;
  list-style: none;
}

.policy-content ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  line-height: 1.75;
}

.policy-content ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gradient);
}

.policy-content ul li strong {
  color: var(--text-primary);
}

/* --- Note / Callout Box --- */
.policy-content .note {
  background: var(--gradient-subtle);
  border-left: 4px solid var(--primary-start);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 20px;
  margin: 16px 0 20px;
  font-size: 0.93rem;
}

/* --- Links inside policy --- */
.policy-content a {
  color: var(--primary-start);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(230,74,25,0.3);
  text-underline-offset: 3px;
  transition: all var(--transition);
}

.policy-content a:hover {
  color: var(--primary-end);
  text-decoration-color: var(--primary-end);
}

/* --- Policy Footer --- */
.policy-footer {
  background: var(--text-primary);
  color: var(--text-white);
  text-align: center;
  padding: 32px 24px;
}

.policy-footer p {
  font-size: 0.88rem;
  opacity: 0.75;
}

.policy-footer a {
  color: rgba(255,255,255,0.85);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.3);
}

.policy-footer a:hover {
  color: #fff;
}


/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 768px) {
  header {
    padding: 44px 20px 36px;
  }

  header h1 {
    font-size: 2.2rem;
  }

  .hero {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .hero h2 {
    font-size: 1.6rem;
  }

  .features h2,
  .legal h2 {
    font-size: 1.5rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .policy-header h1 {
    font-size: 1.65rem;
  }

  .policy-content {
    margin: -16px 12px 36px;
    padding: 28px 22px 36px;
    border-radius: var(--radius-md);
  }

  .policy-content h2 {
    font-size: 1.2rem;
    margin-top: 32px;
  }

  .policy-content h3 {
    font-size: 1.05rem;
  }

  .policy-back {
    position: relative;
    top: auto;
    left: auto;
    display: inline-block;
    margin-bottom: 16px;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.8rem;
  }

  header p {
    font-size: 0.9rem;
    letter-spacing: 1px;
  }

  .button {
    width: 100%;
    text-align: center;
    padding: 16px 24px;
  }

  .legal-links {
    flex-direction: column;
    align-items: center;
  }

  .legal-links a {
    width: 100%;
    max-width: 260px;
    text-align: center;
  }

  .policy-content {
    padding: 24px 18px 32px;
  }
}
