/* ================= RESET ================= */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  font-family:"Inter","Segoe UI",system-ui,sans-serif;
  background:linear-gradient(180deg,#447ab0,#5074a0);
  color:#0f172a;
  transition:background .4s,color .4s;
}

/* ================= HEADER ================= */
.app-header{
  text-align:center;
  padding:40px 20px 70px;
  background:linear-gradient(135deg,#1ca76d,#447ab0,#33af8e);
  border-radius:0 0 50px 50px;
  color:white;
}


.app-header img,
.app-logo{
  width:110px;
  background:#fff;
  padding:12px;
  border-radius:26px;
  box-shadow:0 15px 40px rgba(0,0,0,.35);
}

.app-header h1{
  margin:16px 0 6px;
  font-size:36px;
  font-weight:800;
}

.app-header p{
  opacity:.9;
  font-size:15px;
}

/* ================= TITLES ================= */
.section-title{
  margin:35px 22px 20px;
  font-size:22px;
  font-weight:700;
  color:#14beb0;
}

/* ================= SEARCH ================= */
.search-box{
  width:90%;
  margin:20px auto;
  display:block;
  padding:14px 18px;
  border-radius:30px;
  border:none;
  outline:none;
  font-size:16px;
  box-shadow:0 10px 25px rgba(0,0,0,.12);
}

/* ================= CARD CONTAINER ================= */
.card-container{
  display:flex;
  gap:20px;
  padding:30px 22px 120px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
}

.card-container::-webkit-scrollbar{
  display:none;
}

/* ================= CARD ================= */
.card{
  min-width:200px;
  background:white;
  border-radius:24px;
  padding:26px 16px;
  text-align:center;
  text-decoration:none;
  color:#020617;
  font-weight:700;
  position:relative;
  overflow:hidden;
  scroll-snap-align:center;
  box-shadow:0 18px 45px rgba(0,0,0,.12);
  transition:transform .3s ease, box-shadow .3s ease;
  animation:fadeUp .6s ease both;
}

.card span{
  font-size:38px;
  display:block;
  margin-bottom:10px;
  position:relative;
  z-index:1;
}

.card div{
  position:relative;
  z-index:1;
}

/* hover effect */
.card::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(135deg,#0f766e,#14b8a6);
  opacity:0;
  transition:.35s;
}

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


/* ================= BADGES ================= */
.badge{
  position:absolute;
  top:12px;
  left:12px;
  background:#f97316;
  color:white;
  padding:4px 10px;
  border-radius:20px;
  font-size:11px;
  z-index:2;
}

/* ================= RIPPLE ================= */
.subject-card{
  cursor:pointer;
  position:relative;
  overflow:hidden;
}

.ripple{
  position:absolute;
  width:20px;
  height:20px;
  background:rgba(255,255,255,.7);
  border-radius:50%;
  transform:scale(0);
  animation:ripple .6s ease-out;
  pointer-events:none;
}

@keyframes ripple{
  to{
    transform:scale(15);
    opacity:0;
  }
}

/* ================= CONTENT / ARTICLE ================= */
.content{
  max-width:900px;
  margin:60px auto;
  background:white;
  padding:40px 50px;
  border-radius:16px;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
}

.content h1{
  font-size:34px;
  margin-bottom:16px;
  color:#0f766e;
}

.content .intro{
  font-size:18px;
  line-height:1.7;
  color:#444;
}

.note{
  margin-top:30px;
  padding:15px 20px;
  background:#ecfeff;
  border-left:5px solid #0f766e;
  border-radius:6px;
}

/* ================= PROFILE ================= */
.profile-wrapper{
  text-align:center;
}

.stat-box{
  padding:20px;
}

/* ================= BUTTONS ================= */
.btn{
  display:inline-block;
  padding:8px 16px;
  margin:6px;
  font-size:13px;
  font-weight:600;
  background:#14b8a6;
  color:white;
  border-radius:20px;
  text-decoration:none;
  transition:.3s;
}

.btn:hover{
  background:#0f766e;
}

.btn.outline{
  background:transparent;
  color:#0f766e;
  border:2px solid #0f766e;
}

.btn.outline:hover{
  background:#0f766e;
  color:white;
}

/* ================= BOTTOM NAV ================= */
.bottom-nav{
  position:fixed;
  bottom:0;
  width:100%;
  background:rgb(70, 122, 99);
  display:flex;
  justify-content:space-around;
  padding:14px 0 10px;
  box-shadow:0 -10px 40px rgba(0,0,0,.15);
  z-index:99;
}

.bottom-nav a{
  text-decoration:none;
  color:#020617;
  font-size:12px;
  font-weight:600;
  text-align:center;
  transition:.2s;
}

.bottom-nav a span{
  display:block;
  font-size:22px;
}

.bottom-nav a:active{
  transform:scale(.9);
}

.bottom-nav a.active{
  color:#14b8a6;
}

/* ================= FAB ================= */
.theme-toggle{
  position:fixed;
  top:18px;
  right:18px;
  width:48px;
  height:48px;
  border-radius:50%;
  border:none;
  background:rgba(255,255,255,.15);
  backdrop-filter:blur(10px);
  color:white;
  font-size:22px;
  cursor:pointer;
  box-shadow:0 10px 25px rgba(0,0,0,.3);
  z-index:999;
}

/* ================= ANIMATIONS ================= */
@keyframes fadeUp{
  from{opacity:0; transform:translateY(20px)}
  to{opacity:1; transform:none}
}

.hero{
  animation:fadeUp 1s ease;
}

/* ================= DARK MODE ================= */

body.dark .app-header{
  background:linear-gradient(135deg,#020617,#020617,#0f766e);
}

body.dark .card,
body.dark .content,
body.dark .stat-box{
  background:#020617;
  color:#e5e7eb;
  box-shadow:0 15px 40px rgba(0,0,0,.6);
}

body.dark .card::before{
  background:linear-gradient(135deg,#14b8a6,#0f766e);
}

body.dark .bottom-nav{
  background:#020617;
}

body.dark .bottom-nav a{
  color:#e5e7eb;
}

body.dark .section-title{
  color:#5eead4;
}

/* ===== NEXT LEVEL HOME ===== */

.study-greeting{
  margin: 30px 22px 10px;
}

.study-greeting h2{
  margin:0;
  font-size:24px;
}

.study-greeting p{
  margin-top:6px;
  color:#64748b;
  font-weight:500;
}

.continue-box{
  margin: 20px;
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(135deg,#0f766e,#14b8a6);
  color:white;
  box-shadow:0 15px 35px rgba(0,0,0,.15);
}

.continue-box span{
  font-size:13px;
  opacity:.9;
}

.continue-box h3{
  margin-top:6px;
  font-size:18px;
}

.focus-box{
  margin: 0 20px 20px;
  padding: 14px 18px;
  background:#ecfeff;
  color:#0f766e;
  border-radius:14px;
  font-weight:600;
}

/* DARK MODE */
body.dark .focus-box{
  background:rgba(20,184,166,.15);
  color:#5eead4;
}
/* ===== PROFILE PAGE ===== */
.profile-wrapper{
  margin-top:-30px;
}

.profile-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:15px;
  margin-bottom:30px;
}

.stat-box{
  background:#ecfeff;
  padding:18px;
  border-radius:16px;
  text-align:center;
  font-weight:700;
}

.stat-box h2{
  margin:0;
  color:#0f766e;
}

.progress-list .progress-item{
  margin-bottom:16px;
}

.progress-item span{
  font-weight:600;
}

.bar{
  height:10px;
  background:#e5e7eb;
  border-radius:10px;
  overflow:hidden;
  margin-top:6px;
}

.badge-grid{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

/* ===== ARTICLES ===== */
.article-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:26px;
  padding:0 22px 100px;
}

.article-card{
  background:white;
  border-radius:20px;
  overflow:hidden;
  text-decoration:none;
  color:#020617;
  box-shadow:0 18px 40px rgba(0,0,0,.12);
  transition:.4s;
}

.article-card img{
  width:100%;
  height:180px;
  object-fit:cover;
}

.article-card:hover{
  transform:translateY(-10px);
  box-shadow:0 30px 60px rgba(0,0,0,.2);
}

.article-body{
  padding:18px 20px 22px;
}

.article-body h3{
  font-size:18px;
  margin:10px 0 6px;
}

.article-body p{
  font-size:14px;
  opacity:.8;
}

.article-cover{
  width:100%;
  border-radius:14px;
  margin:20px 0;
}

.content h2{
  margin-top:28px;
  color:#0f766e;
}

.content p, .content li{
  font-size:17px;
  line-height:1.8;
}
/* ==========================
   PREMIUM TOPIC CONTENT
========================== */

.premium-content{
  max-width: 980px;
  margin: 30px auto 120px;
  padding: 35px 30px;
  border-radius: 18px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
}

.content-title{
  font-size: 28px;
  margin: 15px 0 15px;
  color: #0f766e;
  font-weight: 900;
}

.content-top{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom: 15px;
}

.tag{
  background:#14b8a6;
  color:white;
  padding:6px 14px;
  border-radius:999px;
  font-size:13px;
  font-weight:700;
}

.tag.light{
  background:#ecfeff;
  color:#0f766e;
  border:1px solid rgba(15,118,110,.25);
}

.page-actions{
  display:flex;
  justify-content:center;
  gap:12px;
  padding-bottom: 110px;
  flex-wrap:wrap;
}

/* DARK MODE SUPPORT */
body.dark .premium-content{
  background: rgba(2,6,23,0.9);
  color:#e5e7eb;
}

body.dark .content-title{
  color:#5eead4;
}

body.dark .tag.light{
  background: rgba(15,118,110,0.25);
  color:#5eead4;
}
/* EXAM SECTION FIX */

.exam-section{
  margin-top:15px;
  animation:fadeIn .4s ease;
}

@keyframes fadeIn{
  from{opacity:0; transform:translateY(10px)}
  to{opacity:1; transform:none}
}


/* HERO / HEADER */
body.dark .app-header,
body.dark .heroBox,
body.dark .pyq-hero{
  background:linear-gradient(135deg,#020617,#020617,#0f766e);
}


/* ALL CARDS */
body.dark .card,
body.dark .subCard,
body.dark .year-card,
body.dark .article-card,
body.dark .content,
body.dark .stat-box{
  background:#020617;
  color:#e5e7eb;
  box-shadow:0 15px 40px rgba(0,0,0,.6);
}


/* HOVER OVERLAY */
body.dark .card::before,
body.dark .subCard::before,
body.dark .year-card::before{
  background:linear-gradient(135deg,#14b8a6,#0f766e);
}


/* SEARCH / INPUT */
body.dark input,
body.dark .search-box{
  background:#020617;
  color:white;
  border:1px solid rgba(255,255,255,.15);
}


/* BOTTOM NAV */
body.dark .bottom-nav{
  background:#020617;
  box-shadow:0 -6px 25px rgba(0,0,0,.7);
}

body.dark .bottom-nav a{
  color:#e5e7eb;
}


/* TITLES */
body.dark .section-title,
body.dark h1,
body.dark h2,
body.dark h3{
  color:#5eead4;
}


/* TAGS / PILLS */
body.dark .tag,
body.dark .pill{
  background:rgba(255,255,255,.1);
  color:#5eead4;
  border:1px solid rgba(255,255,255,.15);
}


/* BUTTONS */
body.dark .btn,
body.dark .btnX,
body.dark .qa-btn{
  background:rgba(20,184,166,.18);
  color:#5eead4;
  border:1px solid rgba(94,234,212,.3);
}

body.dark .btn:hover,
body.dark .btnX:hover{
  background:rgba(20,184,166,.28);
}


/* SUBJECT ICON BG */
body.dark .icon{
  background:rgba(255,255,255,.12);
  color:#5eead4;
}
.site-logo{
  width:50px;
  height:auto;
  display:block;
  margin:auto;
}

/* Header Glass Effect */
.header {
  backdrop-filter: blur(12px);
  background: linear-gradient(135deg,#0f766e,#14b8a6);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Logo Animation */
.header img {
  transition: 0.4s;
}

.header img:hover {
  transform: rotate(5deg) scale(1.05);
}

.subject-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 40px rgba(0,0,0,0.15);
}

/* Search Bar */
.search-bar input {
  border-radius: 50px;
  border: none;
  padding: 14px 22px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.search-bar input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #14b8a6;
}


.bar div{
  height:100%;
  background:linear-gradient(90deg,#0f766e,#14b8a6);
  border-radius:20px;
  transition:0.5s;
}

/* Button Effects */
button {
  transition: 0.3s;
}

button:hover {
  transform: scale(1.05);
}
/* EDIT PROFILE POPUP */

.edit-box{
  position:fixed;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  background:white;
  padding:25px;
  border-radius:15px;
  width:280px;
  z-index:9999;
  box-shadow:0 0 30px rgba(0,0,0,.3);
  text-align:center;
}

.edit-box input{
  width:100%;
  margin:8px 0;
  padding:10px;
  border-radius:8px;
  border:1px solid #ccc;
}

.edit-box button{
  margin:8px;
  padding:8px 14px;
  border:none;
  border-radius:8px;
  background:#14b8a6;
  color:white;
  font-weight:600;
  cursor:pointer;
}
.footer-links{
  text-align:center;
  padding:15px 0 25px;
  font-size:14px;
  background:#fff;
}

.footer-links a{
  color:#0fa;
  text-decoration:none;
  margin:0 5px;
}

.footer-links a:hover{
  text-decoration:underline;
}
/* ===== MENU BUTTON ===== */

.menu-btn{
  font-size:26px;
  cursor:pointer;
  position:fixed;
  top:15px;
  left:15px;
  z-index:9999;
  color:white;
  background:#009688;
  padding:6px 12px;
  border-radius:6px;
}

/* ===== SIDE MENU ===== */

.side-menu{
  height:100%;
  width:260px;
  background:#fff;
  position:fixed;
  top:0;
  left:-260px;
  padding:20px;
  transition:0.3s;
  z-index:9998;
  box-shadow:2px 0 10px rgba(0,0,0,0.3);
}

.side-menu h3{
  color:#009688;
  margin-bottom:20px;
  text-align:center;
}

/* Links */

.side-menu a{
  display:block;
  padding:12px 0;
  color:#333;
  text-decoration:none;
  font-size:16px;
  border-bottom:1px solid #eee;
}

.side-menu a:hover{
  color:#009688;
}

/* Close */

.close-btn{
  font-size:28px;
  position:absolute;
  top:10px;
  right:15px;
  cursor:pointer;
}

/* ===== DARK MODE SWITCH ===== */

.dark-box{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:25px;
  padding-top:15px;
  border-top:1px solid #ddd;
  font-size:15px;
}

/* Toggle Switch */

.switch{
  position:relative;
  width:45px;
  height:22px;
}

.switch input{
  display:none;
}

.slider{
  position:absolute;
  cursor:pointer;
  background:#ccc;
  border-radius:20px;
  top:0; left:0; right:0; bottom:0;
  transition:0.3s;
}

.slider:before{
  content:"";
  position:absolute;
  width:18px;
  height:18px;
  left:2px;
  bottom:2px;
  background:white;
  border-radius:50%;
  transition:0.3s;
}

input:checked + .slider{
  background:#009688;
}

input:checked + .slider:before{
  transform:translateX(22px);
}
/* ===== DARK MODE ===== */

body.dark{
  background:#111;
  color:white;
}

body.dark .container{
  background:#1a1a1a;
}

body.dark .word-card{
  background:#222;
}

body.dark .side-menu{
  background:#111;
}

body.dark .side-menu a{
  color:white;
  border-color:#333;
}

body.dark .close-btn{
  color:white;
}

.header{
  background: linear-gradient(270deg,#0f766e,#14b8a6,#06b6d4);
  background-size:400% 400%;
  animation: gradient 10s ease infinite;
}

@keyframes gradient{
  0%{background-position:0% 50%}
  50%{background-position:100% 50%}
  100%{background-position:0% 50%}
}

.logo{
  animation: float 3s ease-in-out infinite;
}

@keyframes float{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-10px)}
}
.stats{
  display:flex;
  justify-content:space-around;
  background:white;
  padding:15px;
  border-radius:15px;
  margin:20px;
  box-shadow:0 4px 15px rgba(0,0,0,.1);
}
.card{
  backdrop-filter:blur(10px);
  transition:.3s;
}

.card:hover{
  transform:translateY(-8px) scale(1.03);
  box-shadow:0 15px 30px rgba(0,0,0,.2);
}
/* ===== STATS BAR ===== */

.stats-bar{
  display:flex;
  gap:20px;
  justify-content:space-between;
  margin:25px 0;
}

.stat-card{
  flex:1;
  background:white;
  border-radius:18px;
  padding:18px;
  text-align:center;
  box-shadow:0 6px 18px rgba(0,0,0,0.1);
  transition:0.3s;
  font-size:20px;
  font-weight:600;
}

.stat-card p{
  font-size:14px;
  color:#64748b;
  margin-top:5px;
}

.stat-card:hover{
  transform:translateY(-5px);
  box-shadow:0 12px 25px rgba(0,0,0,0.15);
}

/* ===== LAST STUDY CARD ===== */

.last-study-card{
  max-width:400px;
  background:white;
  border-radius:20px;
  padding:22px;
  box-shadow:0 10px 25px rgba(0,0,0,0.12);
  margin:20px 0;
}

.last-study-card h3{
  color:#0f766e;
  margin-bottom:15px;
  border-bottom:2px solid #ecfeff;
  padding-bottom:6px;
}

.ls-row{
  display:flex;
  justify-content:space-between;
  margin:8px 0;
  font-size:15px;
}

.ls-row span{
  color:#64748b;
}

.last-study-card button{
  width:100%;
  margin-top:15px;
  background:linear-gradient(135deg,#0ea5a4,#14b8a6);
  color:white;
  border:none;
  padding:10px;
  border-radius:10px;
  font-size:15px;
  cursor:pointer;
  transition:0.3s;
}

.last-study-card button:hover{
  opacity:0.9;
  transform:scale(1.02);
}
