* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #6c63ff;
  --primary-dark: #4a42d1;
  --bg: #f0f2ff;
  --card: #ffffff;
  --text: #2d2d2d;
  --muted: #888;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(108,99,255,0.12);
}

body { font-family: 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); }

.container { max-width: 900px; margin: 0 auto; padding: 0 1rem; }

/* HEADER */
.header { background: var(--primary); color: #fff; padding: 1rem 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.15); }
.header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.3rem; display: flex; align-items: center; gap: 0.5rem; }
.logo i { font-size: 1.5rem; }
nav a { color: #fff; text-decoration: none; margin-left: 1rem; font-size: 0.9rem; opacity: 0.9; }
nav a:hover { opacity: 1; }

/* HERO */
.hero { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; padding: 3rem 0 4rem; text-align: center; }
.hero h1 { font-size: clamp(1.5rem, 4vw, 2.5rem); margin-bottom: 0.5rem; }
.hero p { opacity: 0.85; margin-bottom: 2rem; }

/* EMAIL BOX */
.email-box { background: #fff; border-radius: var(--radius); padding: 1.5rem; max-width: 600px; margin: 0 auto 1rem; box-shadow: var(--shadow); }
.email-display { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
#emailAddr { font-size: clamp(0.9rem, 3vw, 1.1rem); font-weight: 600; color: var(--primary); word-break: break-all; }
.actions button { background: none; border: 2px solid var(--primary); color: var(--primary); border-radius: 8px; padding: 0.4rem 0.7rem; cursor: pointer; margin-left: 0.3rem; transition: all 0.2s; }
.actions button:hover { background: var(--primary); color: #fff; }
.custom-email { display: flex; gap: 0.5rem; margin-top: 1rem; }
.custom-email input { flex: 1; padding: 0.6rem 1rem; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 0.9rem; outline: none; }
.custom-email input:focus { border-color: var(--primary); }
.custom-email button { padding: 0.6rem 1.2rem; background: var(--primary); color: #fff; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; }
.custom-email button:hover { background: var(--primary-dark); }

/* COUNTDOWN */
.countdown { color: rgba(255,255,255,0.9); font-size: 0.95rem; }
#timer { font-weight: 700; font-size: 1.1rem; }

/* INBOX */
.inbox-section { margin: 2rem auto; }
.inbox-header { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; }
.inbox-header h2 { font-size: 1.3rem; }
.badge { background: var(--primary); color: #fff; border-radius: 50px; padding: 0.2rem 0.7rem; font-size: 0.8rem; font-weight: 700; }
.loader { text-align: center; color: var(--muted); padding: 2rem; }
.inbox-list { display: flex; flex-direction: column; gap: 0.7rem; }
.inbox-item { background: var(--card); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow); cursor: pointer; border-left: 4px solid var(--primary); transition: transform 0.15s; }
.inbox-item:hover { transform: translateX(4px); }
.inbox-item h4 { font-size: 1rem; margin-bottom: 0.3rem; }
.inbox-item p { color: var(--muted); font-size: 0.85rem; }
.inbox-item .from { font-weight: 600; color: var(--primary); }

/* EMAIL DETAIL */
.email-detail { background: var(--card); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.email-detail button { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 1rem; margin-bottom: 1rem; }
.email-detail h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 1rem; }
#detailBody { line-height: 1.7; font-size: 0.95rem; }

/* FEATURES */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.2rem; margin: 2rem auto 3rem; }
.feature-card { background: var(--card); border-radius: var(--radius); padding: 1.5rem; text-align: center; box-shadow: var(--shadow); }
.feature-card i { font-size: 2rem; color: var(--primary); margin-bottom: 0.7rem; }
.feature-card h3 { margin-bottom: 0.4rem; }
.feature-card p { color: var(--muted); font-size: 0.85rem; }

/* FOOTER */
footer { background: var(--primary-dark); color: rgba(255,255,255,0.8); text-align: center; padding: 1.5rem; font-size: 0.9rem; }

/* TOAST */
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 0.8rem 1.5rem; border-radius: 50px; font-size: 0.9rem; opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 9999; }
.toast.show { opacity: 1; }

@media (max-width: 500px) {
  .email-display { flex-direction: column; align-items: flex-start; }
  .custom-email { flex-direction: column; }
}
/* AD SLOT */
.ad-slot { margin: 1.5rem auto; min-height: 0; text-align: center; overflow: hidden; }
.ad-slot:empty { display: none; }

/* BLOG */
.blog-hero { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; padding: 2.5rem 0; text-align: center; }
.blog-hero h1 { font-size: clamp(1.4rem, 4vw, 2.2rem); margin-bottom: 0.4rem; }
.blog-hero p { opacity: 0.85; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.3rem; margin: 2rem auto 3rem; }
.blog-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: transform 0.15s; display: flex; flex-direction: column; }
.blog-card:hover { transform: translateY(-3px); }
.blog-card img { width: 100%; height: 160px; object-fit: cover; background: var(--bg); }
.blog-card .blog-card-body { padding: 1.1rem; flex: 1; display: flex; flex-direction: column; }
.blog-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.blog-card p { color: var(--muted); font-size: 0.85rem; flex: 1; }
.blog-card .blog-meta { color: var(--primary); font-size: 0.75rem; font-weight: 600; margin-top: 0.6rem; }
.blog-empty { text-align: center; color: var(--muted); padding: 3rem 1rem; }
.blog-post { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.8rem; margin: 2rem auto 3rem; max-width: 760px; }
.blog-post img.cover { width: 100%; max-height: 340px; object-fit: cover; border-radius: 8px; margin-bottom: 1.2rem; }
.blog-post h1 { font-size: clamp(1.3rem, 3.5vw, 1.9rem); margin-bottom: 0.5rem; }
.blog-post .blog-post-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.2rem; }
.blog-post .blog-post-content { line-height: 1.8; font-size: 1rem; }
.blog-post .blog-post-content p { margin-bottom: 1rem; }
.blog-post .back-link { display: inline-block; margin-bottom: 1.2rem; color: var(--primary); text-decoration: none; font-weight: 600; }
