/* assets/style.css - unified theme and controls */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&family=Playfair+Display:wght@400;700&display=swap');

:root{
  --bg-deep:#001f3f; --bg-mid:#003399; --gold:#d4af37; --accent:#60a5fa;
  --muted:#c1c1c1; --panel:rgba(255,255,255,0.06); --card-shadow: rgba(0,0,0,0.45);
}

/* Reset */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body.gradient-bg{
  font-family:'Poppins',sans-serif;color:#fff;
  background: linear-gradient(120deg,var(--bg-deep),var(--bg-mid),var(--gold),#000);
  background-size:400% 400%; animation:bgFlow 16s ease infinite;
  -webkit-font-smoothing:antialiased; min-height:100vh; display:flex; flex-direction:column;
  text-shadow:0 1px 1px rgba(0,0,0,0.6);
}
@keyframes bgFlow{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}}

/* Navbar */
.navbar{display:flex;justify-content:space-between;align-items:center;padding:12px 24px;background:linear-gradient(180deg, rgba(0,0,0,0.22), rgba(0,0,0,0.36));border-bottom:1px solid rgba(212,175,55,0.12)}
.brand{font-family:'Playfair Display',serif;font-size:1.45rem;color:var(--gold)}
.brand .tag{font-size:.9rem;color:var(--muted);margin-left:.6rem}
.nav-links a{color:#fff;text-decoration:none;margin-left:12px;padding:8px 12px;border-radius:8px}
.nav-links a.active{background:rgba(255,255,255,0.03);box-shadow:0 6px 14px rgba(0,0,0,0.35)}

/* Main container */
main.content{flex:1;max-width:1100px;margin:28px auto;padding:0 18px}
.center{text-align:center}
.lead{color:var(--muted);margin-bottom:18px}

/* Cards & Landing */
.landing-card{background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.03));padding:34px;border-radius:12px;box-shadow:0 10px 40px var(--card-shadow);max-width:900px;margin:0 auto}
.btn{display:inline-block;padding:10px 16px;border-radius:10px;margin-right:10px;text-decoration:none;color:#fff;background:rgba(255,255,255,0.04)}
.btn.primary{background:linear-gradient(90deg,var(--accent),var(--gold));color:#000;font-weight:700}

/* Auth Containers */
.login-container, .auth-card{
  width:520px; max-width:95%;
  background: linear-gradient(180deg, rgba(0,0,0,0.34), rgba(0,0,0,0.2));
  padding:40px;border-radius:18px;margin:5% auto;box-shadow:0 18px 60px rgba(0,0,0,0.5);
  text-align:center;
}
.login-container h2, .auth-card h2{font-family:'Playfair Display',serif;font-size:2rem;margin-bottom:18px}

/* Inputs */
input[type="text"], input[type="email"], input[type="password"], textarea{
  width:100%; padding:12px 14px; border-radius:10px; border:1px solid rgba(255,255,255,0.06); background:rgba(0,0,0,0.35); color:#fff; margin-bottom:12px;
}
input:focus, textarea:focus{outline:1px solid rgba(96,165,250,0.6)}

/* password toggle */
.password-container{position:relative}
.show-btn{position:absolute; right:10px; top:9px; background:none;border:none;color:var(--gold); cursor:pointer; font-weight:700}

/* Google button */
.google-btn{
  display:flex; align-items:center; justify-content:center; gap:12px;
  width:100%; padding:12px 16px; border-radius:28px; background:#fff; color:#222; font-weight:600; margin-bottom:14px; border:none; cursor:pointer;
  box-shadow:0 6px 18px rgba(0,0,0,0.25);
}
.google-btn img{width:20px;height:20px}

/* Buttons */
.action-btn{
  width:100%; padding:14px; border-radius:30px; border:none; font-weight:800; font-size:1.05rem;
  background: linear-gradient(90deg,var(--accent),var(--gold)); color:#000; cursor:pointer; box-shadow:0 8px 24px rgba(0,0,0,0.35)
}
.action-btn.secondary{background:rgba(255,255,255,0.06); color:#fff; box-shadow:none}

/* Small link */
.link{color:var(--muted); text-decoration:underline; display:inline-block; margin-top:12px}

/* Profile Cards */
.profile-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px;align-items:start;margin-top:18px}
.profile-card{background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.03));padding:18px;border-radius:12px;box-shadow:0 8px 30px rgba(0,0,0,0.45)}
.avatar{width:96px;height:96px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 12px;font-weight:700;background:linear-gradient(135deg,var(--accent),var(--gold));color:#000;font-size:1.6rem}

/* Product Slider */
.product-slider{display:flex;align-items:center;gap:12px;max-width:860px;margin:12px auto}
.product-slide{background:rgba(255,255,255,0.03);padding:18px;border-radius:12px;min-width:320px;box-shadow:0 10px 30px rgba(0,0,0,0.45);text-align:center}
.product-slide img{width:100%;height:280px;object-fit:cover;border-radius:10px;margin-bottom:12px}
.arrow{background:rgba(255,255,255,0.06);border:none;padding:10px 12px;border-radius:8px;cursor:pointer}

/* Buttons group */
.product-actions{display:flex;gap:12px;justify-content:center;margin-top:14px}
.small-btn{padding:10px 14px;border-radius:10px;border:none;cursor:pointer}
.small-btn.buy{background:linear-gradient(90deg,var(--gold),#ffd66a);color:#000;font-weight:700}
.small-btn.cart{background:rgba(255,255,255,0.06);color:#fff}

/* Quiz */
.quiz-card{max-width:860px;margin:18px auto;padding:18px;border-radius:12px;background:rgba(0,0,0,0.28);box-shadow:0 12px 40px rgba(0,0,0,0.45)}
.optBtn{display:block;margin:8px 0;padding:12px;border-radius:10px;background:rgba(255,255,255,0.04);border:none;color:#fff;cursor:pointer;transition:0.3s}
.optBtn:hover{background:rgba(255,255,255,0.15)}
.optBtn.correct{background:green!important}
.optBtn.wrong{background:red!important}
.timer{font-weight:700;color:var(--gold)}

/* Certificate */
.cert-preview{width:100%;max-width:420px;border-radius:8px;box-shadow:0 10px 30px rgba(0,0,0,0.45);display:block;margin:10px auto}

/* Footer */
footer{padding:12px;text-align:center;background:rgba(0,0,0,0.45);border-top:1px solid rgba(212,175,55,0.12);margin-top:auto}
.muted{color:var(--muted)}

/* Responsive */
@media (max-width:600px){
  .login-container, .auth-card{padding:24px}
  .product-slide{min-width:100%}
  iframe{height:450px!important}
}
/* ================= QUIZ STYLES ================= */
.quiz-container {
  max-width: 600px;
  background: rgba(20, 20, 20, 0.6);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  text-align: center;
  color: #fff;
}

.quiz-intro p {
  margin-bottom: 1rem;
  color: #ccc;
}

.question-area h3 {
  margin-bottom: 10px;
  color: var(--gold);
}

.question-area p {
  margin: 8px 0;
}

.optBtn {
  display: block;
  width: 100%;
  margin: 8px 0;
  padding: 0.75rem;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: 0.3s;
  font-size: 1rem;
}

.optBtn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.correct {
  background-color: #2ecc71 !important;
  color: #fff;
}

.wrong {
  background-color: #e74c3c !important;
  color: #fff;
}

.quiz-result {
  margin-top: 1rem;
  padding: 1.2rem;
  border-radius: 12px;
}

.quiz-result.passed {
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid #2ecc71;
}

.quiz-result.failed {
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid #e74c3c;
}

.quiz-result h3 {
  margin-bottom: 0.5rem;
}

.quiz-result p {
  color: #eee;
  margin-bottom: 0.5rem;
}

.quiz-controls {
  margin-top: 1rem;
}

/* Timer text */
.muted {
  color: #bbb;
  font-size: 0.9rem;
}
/* ===== PROFILE CONTAINER FIXES ===== */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  align-items: stretch;
  margin-top: 24px;
}

/* Each card balanced & equal height */
.profile-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.06));
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 10px 35px rgba(0,0,0,0.45);
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 320px;
  overflow: hidden;
  transition: 0.3s ease;
}

.profile-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
}

/* Profile info text spacing */
#profileInfo h3,
#profileInfo p {
  margin: 8px 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.5;
}

/* Certificate container */
#certificatesArea {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
}

/* Certificate preview sizing */
.cert-preview {
  width: 100%;
  height: 240px;
  border-radius: 10px;
  margin: 14px 0;
  box-shadow: 0 10px 25px rgba(0,0,0,0.45);
  object-fit: contain;
}

/* Buttons inside cards */
.profile-card .btn {
  margin-top: 10px;
}

/* Responsive balance */
@media (max-width: 700px) {
  .profile-card {
    min-height: auto;
    padding: 20px;
  }
  .cert-preview {
    height: 200px;
  }
}
/* ===== FIX: CERTIFICATE VISIBILITY & CONTAINER ===== */
#certificatesArea {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  min-height: 280px;
  padding: 10px;
  color: #fff;
  overflow: hidden;
}

#certificatesArea p {
  margin-bottom: 10px;
  color: var(--muted);
}

/* Make sure the embed container always fits properly */
#certificatesArea embed,
#certificatesArea iframe,
.cert-preview {
  display: block;
  width: 100%;
  max-width: 420px;
  height: 240px;
  border-radius: 10px;
  margin: 10px auto;
  box-shadow: 0 10px 25px rgba(0,0,0,0.45);
  object-fit: contain;
}

/* Buttons inside the certificate card */
#certificatesArea .btn {
  display: inline-block;
  margin-top: 10px;
}

/* Profile grid height balance */
.profile-grid {
  align-items: stretch;
}

.profile-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Responsive fix for small screens */
@media (max-width: 700px) {
  #certificatesArea embed,
  #certificatesArea iframe,
  .cert-preview {
    height: 200px;
  }
}
.small-btn.removeItem {
  background: rgba(255, 0, 0, 0.3);
  color: #fff;
  font-weight: 700;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
}
.small-btn.removeItem:hover {
  background: rgba(255, 0, 0, 0.6);
}
/* === INDEX GOOGLE BUTTON LAYOUT FIX === */
.google-btn {
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
}
.google-btn img {
  width: 18px;
  height: 18px;
  margin-right: 6px;
}

/* === QUIZ CONTAINER IMPROVEMENTS === */
.quiz-container {
  max-width: 650px;
  margin: 4rem auto;
  background: rgba(0, 0, 0, 0.4);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  text-align: center;
  color: #fff;
}
.quiz-card {
  background: rgba(0,0,0,0.3);
  border-radius: 16px;
  padding: 1.5rem;
}
.quiz-result button {
  margin-top: 1rem;
}
/* ---------- Responsive: Burger menu & mobile nav ---------- */
.burger {
  display: none;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  margin-right: 10px;
}

/* Default desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
}

/* Mobile behavior */
@media (max-width: 800px) {
  .nav-links {
    position: fixed;
    top: 56px;
    right: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.85), rgba(0,0,0,0.95));
    width: 220px;
    height: calc(100% - 56px);
    transform: translateX(100%);
    transition: transform 220ms ease;
    flex-direction: column;
    padding: 18px;
    gap: 12px;
    z-index: 9999;
    border-left: 1px solid rgba(255,255,255,0.04);
  }
  .nav-links.active {
    transform: translateX(0%);
  }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    margin-left: 0;
  }
  .burger { display: block; }
}
/* PRODUCT CAROUSEL: make slides comfortable and responsive */
.product-track { width:100%; display:flex; align-items:stretch; justify-content:center; }
.product-slide {
  width: 520px;
  min-width: 520px;
  background: rgba(255,255,255,0.03);
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  text-align: center;
  margin: 0 auto;
}

/* on small screens make the slide narrower to fit */
@media (max-width: 760px) {
  .product-slide {
    width: 92%;
    min-width: 92%;
    padding: 16px;
  }
  .product-actions { flex-direction: column; gap:10px; display:flex; justify-content:center; align-items:center; }
  .arrow { display:none; } /* hide arrows on smaller screens; user can swipe using touch */
  .product-slide img { max-height:160px; }
}

/* Arrow adjustments */
.arrow { background: rgba(255,255,255,0.06); border:none; padding:10px 12px; border-radius:8px; cursor:pointer; font-weight:700; }
