/* ============================================================
   RoastMyProfile - Main Stylesheet
   Dark theme with fire/orange branding
   ============================================================ */

:root {
  --fire: #ff6b00;
  --fire-light: #ff8c38;
  --fire-dark: #cc5500;
  --gold: #ffd700;
  --bg-dark: #0d0d0d;
  --bg-card: #1a1a1a;
  --bg-card2: #222222;
  --text: #f0f0f0;
  --text-muted: #999;
  --border: #333;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(255,107,0,0.15);
  --transition: all 0.3s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--fire); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--fire-light); }

img { max-width: 100%; display: block; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--fire); border-radius: 3px; }

/* ---- NAVBAR ---- */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(13,13,13,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,107,0,0.2);
  padding: 0 5%;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.navbar-brand {
  font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(90deg, var(--fire), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  display: flex; align-items: center; gap: 8px;
}
.navbar-brand .emoji { -webkit-text-fill-color: initial; font-size: 1.4rem; }
.navbar-links { display: flex; gap: 24px; align-items: center; }
.navbar-links a { color: var(--text-muted); font-weight: 500; font-size: 0.9rem; }
.navbar-links a:hover, .navbar-links a.active { color: var(--fire); }
.nav-btn {
  background: var(--fire); color: #fff !important;
  padding: 8px 20px; border-radius: 50px;
  font-weight: 600; font-size: 0.85rem;
}
.nav-btn:hover { background: var(--fire-light); }
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }
.mobile-menu {
  display: none; position: fixed; top: 64px; left: 0; right: 0;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  padding: 16px; flex-direction: column; gap: 12px; z-index: 999;
}
.mobile-menu a { color: var(--text); padding: 10px 0; border-bottom: 1px solid var(--border); }

/* ---- HERO ---- */
.hero {
  text-align: center; padding: 80px 5% 60px;
  background: radial-gradient(ellipse at top, rgba(255,107,0,0.12) 0%, transparent 70%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,107,0,0.1); border: 1px solid rgba(255,107,0,0.3);
  color: var(--fire); padding: 6px 16px; border-radius: 50px;
  font-size: 0.8rem; font-weight: 600; margin-bottom: 24px; letter-spacing: 0.05em;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4.5rem); font-weight: 900; line-height: 1.1;
  margin-bottom: 20px;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--fire), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 1.1rem; color: var(--text-muted); max-width: 560px; margin: 0 auto 36px; }
.hero-stats { display: flex; justify-content: center; gap: 40px; margin-top: 48px; }
.hero-stat { text-align: center; }
.hero-stat-num { font-size: 1.8rem; font-weight: 800; color: var(--fire); }
.hero-stat-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: 50px; font-weight: 700; font-size: 0.95rem;
  cursor: pointer; border: none; transition: var(--transition); white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--fire), var(--fire-dark));
  color: #fff; box-shadow: 0 4px 20px rgba(255,107,0,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,107,0,0.5); color: #fff; }
.btn-outline {
  background: transparent; border: 2px solid var(--fire); color: var(--fire);
}
.btn-outline:hover { background: var(--fire); color: #fff; }
.btn-ghost { background: rgba(255,255,255,0.05); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-success { background: var(--success); color: #fff; }
.btn-lg { padding: 16px 40px; font-size: 1.1rem; }
.btn-sm { padding: 8px 18px; font-size: 0.82rem; }
.btn-block { width: 100%; border-radius: var(--radius); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---- CARDS ---- */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; transition: var(--transition);
}
.card:hover { border-color: rgba(255,107,0,0.3); }

/* ---- FORM ELEMENTS ---- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-muted); }
.form-control {
  width: 100%; padding: 12px 16px;
  background: var(--bg-card2); border: 1.5px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 0.95rem;
  transition: var(--transition); outline: none; font-family: inherit;
}
.form-control:focus { border-color: var(--fire); box-shadow: 0 0 0 3px rgba(255,107,0,0.15); }
.form-control::placeholder { color: #555; }
textarea.form-control { resize: vertical; min-height: 120px; }

/* ---- TABS ---- */
.tabs { display: flex; background: var(--bg-card2); border-radius: 50px; padding: 4px; gap: 4px; }
.tab-btn {
  flex: 1; padding: 10px 16px; background: transparent; border: none;
  color: var(--text-muted); border-radius: 50px; cursor: pointer;
  font-weight: 600; font-size: 0.85rem; transition: var(--transition);
}
.tab-btn.active { background: var(--fire); color: #fff; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---- ROAST STYLE CARDS ---- */
.style-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.style-card {
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 20px; cursor: pointer;
  transition: var(--transition); text-align: center; position: relative;
}
.style-card:hover { border-color: var(--fire); transform: translateY(-4px); }
.style-card.selected { border-color: var(--fire); background: rgba(255,107,0,0.08); }
.style-card .emoji { font-size: 2.2rem; margin-bottom: 10px; }
.style-card h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 6px; }
.style-card p { font-size: 0.75rem; color: var(--text-muted); }
.style-badge {
  position: absolute; top: -10px; right: -10px;
  background: linear-gradient(135deg, var(--gold), #ff9d00);
  color: #000; font-size: 0.65rem; font-weight: 800;
  padding: 3px 8px; border-radius: 50px; text-transform: uppercase;
}
.style-badge.free { background: var(--success); color: #fff; }

/* ---- ROAST RESULT ---- */
.result-card {
  background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
  border: 2px solid rgba(255,107,0,0.3); border-radius: var(--radius-lg);
  padding: 32px; position: relative; overflow: hidden;
}
.result-card::before {
  content: '🔥'; position: absolute; top: -20px; right: -20px;
  font-size: 8rem; opacity: 0.05; transform: rotate(-20deg);
}
.result-headline {
  font-size: 1.4rem; font-weight: 800; color: var(--gold);
  margin-bottom: 20px; line-height: 1.3;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.roast-body { font-size: 0.95rem; color: var(--text); line-height: 1.8; }
.roast-body p { margin-bottom: 14px; }
.scores-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
  margin: 24px 0;
}
.score-block {
  background: var(--bg-card2); border-radius: var(--radius); padding: 16px;
  border-left: 3px solid var(--fire);
}
.score-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 4px; }
.score-value { font-size: 1.5rem; font-weight: 800; color: var(--fire); margin-bottom: 4px; }
.score-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }
.verdict-box {
  background: rgba(255,107,0,0.08); border: 1px solid rgba(255,107,0,0.3);
  border-radius: var(--radius); padding: 20px; margin-top: 16px;
  font-style: italic; color: var(--fire-light); font-size: 1rem; font-weight: 600;
  text-align: center;
}

/* ---- SHARE ACTIONS ---- */
.share-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1ebe57; color: #fff; }
.btn-copy { background: var(--bg-card2); color: var(--text); border: 1px solid var(--border); }

/* ---- HOW IT WORKS ---- */
.section { padding: 80px 5%; }
.section-title { text-align: center; font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--text-muted); margin-bottom: 48px; font-size: 0.95rem; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.step { text-align: center; padding: 32px 20px; }
.step-num {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,107,0,0.1); border: 2px solid rgba(255,107,0,0.3);
  color: var(--fire); font-size: 1.2rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.step h3 { font-size: 1rem; margin-bottom: 8px; }
.step p { font-size: 0.85rem; color: var(--text-muted); }

/* ---- PRICING ---- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 700px; margin: 0 auto; }
.pricing-card {
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; text-align: center;
}
.pricing-card.featured {
  border-color: var(--fire);
  background: linear-gradient(135deg, rgba(255,107,0,0.08), var(--bg-card));
}
.pricing-price { font-size: 3rem; font-weight: 900; color: var(--fire); }
.pricing-price sup { font-size: 1.2rem; vertical-align: super; }
.pricing-period { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 20px; }
.pricing-features { list-style: none; text-align: left; margin-bottom: 24px; }
.pricing-features li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.pricing-features li::before { content: '✅ '; }

/* ---- FAQ ---- */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%; text-align: left; background: none; border: none;
  color: var(--text); padding: 20px 0; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  transition: var(--transition);
}
.faq-question:hover { color: var(--fire); }
.faq-question .arrow { transition: var(--transition); font-size: 0.75rem; }
.faq-question.open .arrow { transform: rotate(180deg); }
.faq-answer { padding: 0 0 20px; color: var(--text-muted); font-size: 0.88rem; line-height: 1.7; display: none; }
.faq-answer.open { display: block; }

/* ---- FOOTER ---- */
.footer {
  border-top: 1px solid var(--border); padding: 48px 5% 24px;
  text-align: center; color: var(--text-muted); font-size: 0.82rem;
}
.footer-logo {
  font-size: 1.3rem; font-weight: 800;
  background: linear-gradient(90deg, var(--fire), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-size: 0.85rem; }
.footer-links a:hover { color: var(--fire); }

/* ---- AUTH PAGES ---- */
.auth-wrapper {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at center, rgba(255,107,0,0.08) 0%, transparent 70%);
}
.auth-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 420px;
}
.auth-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; }
.auth-sub { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 28px; }
.phone-input-wrap { display: flex; gap: 0; }
.phone-prefix {
  background: var(--bg-card2); border: 1.5px solid var(--border);
  border-right: none; border-radius: var(--radius) 0 0 var(--radius);
  padding: 12px 14px; color: var(--text-muted); font-size: 0.95rem;
  display: flex; align-items: center;
}
.phone-input-wrap .form-control { border-radius: 0 var(--radius) var(--radius) 0; }
.otp-input-wrap { display: flex; gap: 10px; justify-content: center; }
.otp-digit {
  width: 52px; height: 58px; text-align: center; font-size: 1.5rem; font-weight: 700;
  background: var(--bg-card2); border: 2px solid var(--border);
  border-radius: var(--radius); color: var(--text); outline: none;
  transition: var(--transition);
}
.otp-digit:focus { border-color: var(--fire); box-shadow: 0 0 0 3px rgba(255,107,0,0.15); }
.resend-timer { font-size: 0.82rem; color: var(--text-muted); text-align: center; margin-top: 16px; }

/* ---- DASHBOARD ---- */
.dashboard-wrap { max-width: 1000px; margin: 0 auto; padding: 40px 5%; }
.dashboard-header { margin-bottom: 32px; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--fire); }
.stat-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
.roast-history { margin-top: 16px; }
.roast-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 12px;
  display: flex; gap: 16px; align-items: flex-start;
}
.roast-item-icon { font-size: 1.8rem; flex-shrink: 0; }
.roast-item-info { flex: 1; min-width: 0; }
.roast-item-style { font-size: 0.75rem; font-weight: 700; color: var(--fire); text-transform: uppercase; letter-spacing: 0.05em; }
.roast-item-preview { font-size: 0.88rem; color: var(--text-muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roast-item-date { font-size: 0.75rem; color: #555; margin-top: 6px; }
.roast-item-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---- PAYMENT ---- */
.payment-wrap { max-width: 480px; margin: 60px auto; padding: 0 20px; }
.payment-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px; text-align: center;
}
.payment-amount { font-size: 3.5rem; font-weight: 900; color: var(--fire); margin: 16px 0; }
.payment-features { list-style: none; text-align: left; margin: 24px 0; }
.payment-features li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; display: flex; align-items: center; gap: 10px; }
.payment-secure { font-size: 0.78rem; color: var(--text-muted); margin-top: 16px; }

/* ---- ADMIN ---- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; background: var(--bg-card); border-right: 1px solid var(--border);
  padding: 24px 0; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-logo {
  padding: 0 20px 24px; border-bottom: 1px solid var(--border); margin-bottom: 16px;
  font-size: 1.1rem; font-weight: 800;
  background: linear-gradient(90deg, var(--fire), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.admin-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; color: var(--text-muted); font-size: 0.88rem; font-weight: 500;
  transition: var(--transition);
}
.admin-nav a:hover, .admin-nav a.active { color: var(--fire); background: rgba(255,107,0,0.08); }
.admin-content { flex: 1; padding: 32px; overflow-x: auto; }
.admin-content h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 24px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th {
  background: var(--bg-card); padding: 12px 16px; text-align: left;
  color: var(--text-muted); font-weight: 600; border-bottom: 2px solid var(--border);
  text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em;
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.data-table tr:hover td { background: rgba(255,107,0,0.03); }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: 0.72rem; font-weight: 700;
}
.badge-success { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-pending { background: rgba(255,107,0,0.15); color: var(--fire); }
.badge-danger { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-premium { background: rgba(255,215,0,0.15); color: var(--gold); }
.badge-free { background: rgba(255,255,255,0.1); color: var(--text-muted); }

/* ---- SHARE PAGE ---- */
.share-wrap { max-width: 640px; margin: 60px auto; padding: 0 20px; }
.roast-canvas-wrap { position: relative; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px; }
#roastCanvas { width: 100%; border-radius: var(--radius-lg); display: block; }

/* ---- ALERTS ---- */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.88rem; }
.alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: var(--success); }
.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: var(--danger); }
.alert-info { background: rgba(255,107,0,0.1); border: 1px solid rgba(255,107,0,0.3); color: var(--fire); }

/* ---- SPINNER ---- */
.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid rgba(255,107,0,0.2); border-top-color: var(--fire);
  animation: spin 0.8s linear infinite; margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 9999; display: none;
}
.loading-overlay.active { display: flex; }
.loading-text { color: var(--text); margin-top: 16px; font-size: 0.95rem; }

/* ---- CONTAINER ---- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 5%; }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000; display: none; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; max-width: 440px; width: 100%;
  animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.modal-close {
  position: absolute; right: 20px; top: 20px; background: none; border: none;
  color: var(--text-muted); font-size: 1.2rem; cursor: pointer; padding: 4px;
}
.modal { position: relative; }

/* ---- ANIMATIONS ---- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.5s ease forwards; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.pulse { animation: pulse 2s infinite; }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 10px rgba(255,107,0,0.3); }
  50% { box-shadow: 0 0 30px rgba(255,107,0,0.6); }
}
.glow { animation: glow 2s infinite; }

/* ---- FIRE DIVIDER ---- */
.fire-divider {
  text-align: center; padding: 12px; font-size: 1.5rem;
  background: linear-gradient(90deg, transparent, rgba(255,107,0,0.1), transparent);
}

/* ---- SAMPLE ROAST ---- */
.sample-section { background: rgba(255,107,0,0.03); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .navbar-links { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 60px 5% 40px; }
  .hero-stats { gap: 24px; }
  .section { padding: 60px 5%; }
  .steps-grid { grid-template-columns: 1fr; }
  .scores-grid { grid-template-columns: 1fr; }
  .style-grid { grid-template-columns: repeat(2, 1fr); }
  .share-actions { flex-direction: column; }
  .admin-sidebar { width: 60px; }
  .admin-logo, .admin-nav a span { display: none; }
  .admin-content { padding: 16px; }
}
@media (max-width: 480px) {
  .otp-digit { width: 44px; height: 52px; font-size: 1.2rem; }
  .style-grid { grid-template-columns: 1fr; }
  .tabs { flex-direction: column; }
  .roast-item { flex-direction: column; }
}
