 :root {
      --blue: #0073e6;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: Inter, system-ui, sans-serif;
      background: #071322;
      color: #e6eef8;
    }

    body.light {
      background: #ffffff;
      color: #0b1220;
    }

    a { 
        text-decoration: none; color: inherit; 
    }

    body.light .hero-pill {
        background: rgba(11,102,255,0.08);
        border-color: rgba(11,102,255,0.35);
        color: #0b66ff;
    }
    .hero-pill {
        display: inline-block;
        padding: 12px 28px;
        margin: 0 auto 18px;
        border-radius: 999px;
        font-size: 13px;
        font-weight: 600;
        color: #29a8ff;
        background: rgba(41,168,255,0.08);
        text-align: center;
    }

    .hero-pill {
        display: table;
    }

    /* HEADER */
    header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 24px 56px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    body.light header {
      border-bottom: 1px solid rgba(0,0,0,0.1);
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 10px;
      font-weight: 700;
      font-size: 16px;
    }

    .logo-icon {
      width: 34px;
      height: 34px;
      border-radius: 8px;
      background: linear-gradient(180deg,#0b3b61,#0a2636);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #8FD0FF;
    }

    body.light .logo-icon {
      background: linear-gradient(180deg,#0095ff,#007ad4);
      color: #fff;
    }

    .mode-toggle {
      cursor: pointer;
      font-size: 18px;
      opacity: 0.8;
    }

    /* HERO */
    .hero {
      padding: 120px 24px 80px;
      max-width: 1000px;
      margin: auto;
      text-align: center;
    }

    .hero h1 {
      font-size: 72px;
      font-weight: 800;
      line-height: 1.05;
      margin-bottom: 24px;
    }

.hero h1 span {
  display: block;
  background: linear-gradient(90deg, #0095ff, #6dd5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200%;
  animation: glow 3s linear infinite;
}

@keyframes glow {
  from { background-position: 0% }
  to { background-position: 200% }
}


    .hero p {
      max-width: 720px;
      margin: 0 auto 40px;
      font-size: 18px;
      color: #8a9bb5;
    }

    body.light .hero p {
      color: #555;
    }

    .hero-buttons {
      display: flex;
      justify-content: center;
      gap: 20px;
    }

    .btn {
      padding: 16px 28px;
      border-radius: 12px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 12px;
      cursor: pointer;
      font-size: 15px;
      transition: transform 0.15s ease;
    }

    .btn:active {
  transform: scale(0.97);
}
    .btn-primary {
      background: var(--blue);
      color: #fff;
      transition: background-color 0.2s ease;
    }

    .btn-primary:hover {
      background: #007ad4;
    }

    .btn-secondary {
        border: 1px solid rgba(255,255,255,0.18);
        color: #e6eef8;
        background: transparent;
    }
    .btn-secondary:hover {
      background: rgba(255,255,255,0.05);
      border-color: var(--blue);
    }

    body.light .btn-secondary:hover {
      background: rgba(0,0,0,0.05);
    }

    body.light .btn-secondary {
      border: 1px solid rgba(0,0,0,0.2);
      color: #0b1220;
    }

    /* SECTION */
    section {
      padding: 100px 24px;
      max-width: 1200px;
      margin: auto;
      text-align: center;
    }

    .section-title {
      font-size: 42px;
      font-weight: 700;
      margin-bottom: 14px;
    }

    .section-sub {
      max-width: 760px;
      margin: 0 auto 60px;
      color: #8a9bb5;
    }

    body.light .section-sub {
      color: #666;
    }

    /* FEATURES */
    .features-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 24px;
    }

    .feature-card {
      background: #0b1622;
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 14px;
      padding: 26px;
      display: flex;
      gap: 16px;
      text-align: left;
      transition: transform 0.25s ease, box-shadow 0.25s ease;
      cursor: pointer;
    }
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,149,255,0.15);
}
    body.light .feature-card {
      background: #f9f9fb;
      border: 1px solid rgba(0,0,0,0.08);
    }

    .feature-icon {
      font-size: 20px;
      color: var(--blue);
      margin-top: 4px;
    }

    .feature-card h4 {
      margin: 0 0 6px;
      font-size: 16px;
    }

    .feature-card p {
      margin: 0;
      font-size: 14px;
      color: #8a9bb5;
    }

    body.light .feature-card p {
      color: #555;
    }

    /* HOW IT WORKS */
    .steps {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 40px;
      max-width: 900px;
      margin: 0 auto;
    }

    .step-circle {
      width: 58px;
      height: 58px;
      border-radius: 50%;
      background: var(--blue);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 20px;
      margin: 0 auto 18px;
      transition: background-color 0.2s ease, box-shadow 0.2s ease;
    }
    .step {
      transition: transform 0.2s ease;
      cursor: pointer;
    }

    .step:hover {
      transform: translateY(-4px);
    }
    .step:hover .step-circle {
      background: #007ad4;
      box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    }

    .step h4 {
      margin-bottom: 6px;
    }

    .step p {
      font-size: 14px;
      color: #8a9bb5;
    }

    body.light .step p {
      color: #666;
    }

/* ================= FOOTER ================= */

.site-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 24px 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  font-size: 14px;
  color: #8a9bb5;
}

.footer-left {
  grid-column: 2;
  text-align: center;
}

.footer-links {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-links a {
  color: #8a9bb5;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
  color: var(--blue);
  transform: translateY(-2px);
}

.footer-links i {
  font-size: 16px;
}

body.light .site-footer {
  border-top: 1px solid rgba(0,0,0,0.1);
  color: #666;
}

body.light .footer-links a {
  color: #666;
}

@media (max-width: 600px) {
  .site-footer {
    grid-template-columns: 1fr;
    gap: 12px;
    text-align: center;
  }

  .footer-left,
  .footer-links {
    grid-column: auto;
    justify-self: center;
  }
}

    body.light footer {
      border-top: 1px solid rgba(0,0,0,0.1);
      color: #666;
    }
/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

    
    @media (max-width: 768px) {
      .hero h1 { font-size: 48px; }
      .steps { grid-template-columns: 1fr; }
    }
    /* === TEST CARDS LAYOUT === */
.test-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.test-card.small {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 14px;
  min-height: 140px;
}

/* header row */
.test-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.test-card-header h4 {
  font-size: 15px;
  margin: 0;
}

/* right side meta */
.test-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 12px;
}

.test-meta .time {
  opacity: 0.7;
}

/* content */
.test-card .questions {
  font-size: 13px;
  margin: 10px 0 6px;
}

.test-card .score {
  font-size: 12px;
  color: #22c55e;
  margin-bottom: 8px;
}

/* button */
.test-card .btn {
  font-size: 13px;
  padding: 6px 12px;
  margin-top: 6px;
  width: fit-content;
}

/* level colors */
.level.beginner { background:#22c55e22; color:#22c55e; }
.level.intermediate { background:#facc1522; color:#facc15; }
.level.advanced { background:#ef444422; color:#ef4444; }


/* ================= LOGIN ================= */

.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 19, 34, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.login-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.login-modal {
  background: #0b1622;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 32px;
  width: 420px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  position: relative;

  transform: scale(0.92) translateY(10px);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.login-overlay.active .login-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.login-modal h2 {
  margin: 16px 0 6px;
  font-size: 22px;
}

.login-modal p {
  font-size: 14px;
  color: #8a9bb5;
  margin-bottom: 26px;
}

.modal-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto;
  border-radius: 12px;
  background: linear-gradient(180deg,#0b3b61,#0a2636);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8fd0ff;
  font-size: 22px;
}

.google-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: #071322;
  color: #e6eef8;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.google-btn:hover {
  background: rgba(255,255,255,0.06);
}

.google-btn:active {
  transform: scale(0.97);
}

.login-modal small {
  display: block;
  margin-top: 18px;
  font-size: 12px;
  color: #8a9bb5;
}

.login-modal a {
  color: var(--blue);
}

.close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: #8a9bb5;
  font-size: 22px;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.close-btn:hover {
  color: #ffffff;
  transform: scale(1.1);
}

.extension-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 19, 34, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.extension-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.extension-modal {
  background: #0b1622;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 32px;
  width: 450px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  position: relative;
  transform: scale(0.92) translateY(10px);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.extension-overlay.active .extension-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.extension-modal h2 {
  margin: 16px 0 6px;
  font-size: 22px;
}

.extension-modal p {
  font-size: 14px;
  color: #8a9bb5;
  margin-bottom: 26px;
}

.extension-modal .modal-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 12px;
  background: linear-gradient(180deg,#0b3b61,#0a2636);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8fd0ff;
  font-size: 22px;
}

.extension-steps {
  text-align: left;
  font-size: 14px;
  color: #8a9bb5;
  padding-left: 20px;
}

.extension-steps li {
  margin-bottom: 8px;
}

.extension-steps a {
  color: var(--blue);
  text-decoration: underline;
}

.extension-steps code {
  background: rgba(255,255,255,0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.extension-modal .close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: #8a9bb5;
  font-size: 22px;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.extension-modal .close-btn:hover {
  color: #ffffff;
  transform: scale(1.1);
}

/* ====Courses==== */
/* PREMIUM CARD */
.premium-card.roadmap-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  
}

/* Icon */
.roadmap-card .fa-map-signs {
  font-size: 28px;
}

.premium-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--orange);
  color: white;
  display: flex;
  align-items: center;
  gap: 4px;
padding:6px 14px;
  border-radius:999px;
  font-size:13px;
  font-weight:600;
  border:1px solid var(--border);
  animation:popIn .4s ease forwards;
  background: #f5d20b1f;
  color: var(--yellow);
}

.btn-explore {
  background: transparent;
  color: var(--blue-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--blue-2);
  width: fit-content; /* only wraps the text */
  transition: background 0.2s, color 0.2s;
  margin-top: 5px;
}

.btn-explore:hover {
  background: var(--blue-2);
  color: white;
}

.premium-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.premium-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
    .Courses{
        --bg:#0b0f14;
        --panel:#121821;
        --panel-2:#0f141c;
        --border:#1f2937;
        --text:#e5e7eb;
        --muted:#9ca3af;
        --blue:#22d3ee;
        --blue-2:#0ea5e9;
        --yellow:#facc15;
        --green:#22c55e;
        --orange:#f59e0b;
    }

    body.light.Courses{
        --bg:#f8fafc;
        --panel:#ffffff;
        --panel-2:#f1f5f9;
        --border:#e5e7eb;
        --text:#0f172a;
        --muted:#64748b;
    }
    .Courses{
        background:var(--bg);
        color:var(--text);
        display:flex;
        min-height:100vh;
        font-family:'Inter',sans-serif;
    }

    .Courses *{
        box-sizing:border-box;
    }

    /* SIDEBAR */
     .sidebar{
        width:260px;
        background:var(--panel-2);
        border-right:1px solid var(--border);
        padding:24px 18px;
        display:flex;
        flex-direction:column;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
    }

     .sidebar h3{
        font-size:13px;
        letter-spacing:.1em;
        color:var(--muted);
        margin-bottom:14px;
    }

     .nav-item{
        display:flex;
        align-items:center;
        gap:12px;
        padding:10px 14px;
        border-radius:10px;
        color:var(--muted);
        cursor:pointer;
    }

     .nav-item.active{
    background:#0ea5e91a;
    color:var(--blue);
    }

     .nav-item:hover{
        color:white;
    }

.nav-disabled {
  opacity: 0.4;
  cursor: default;
  position: relative; 
  display: inline-block;
}

/* Tooltip  */
.tooltip .tooltiptext {
  visibility: hidden;
  width: 80px;
  background-color: rgb(90, 89, 89);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  z-index: 1;
   bottom: 20%;  
  left: 75%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 10px;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%; 
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: black transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

     .back-home{
        margin-top:auto;
        border-top:1px solid var(--border);
        padding-top:14px;
    }

     .main{
        flex:1;
        padding:28px 34px;
        margin-left: 260px;

    }
    
    /* HEADER */
    .Courses .section-header{
        display:flex;
        justify-content:space-between;
        align-items:center;
        margin-bottom:26px;
    }

    .Courses .section-title{
        font-size:28px;
        font-weight:800;
        margin-bottom:4px;
    }

    /* STATUS */
    .Courses .course-stats{
        display:flex;
        gap:10px;
    }

    .Courses .stat-pill{
        padding:6px 14px;
        border-radius:999px;
        font-size:13px;
        font-weight:600;
        border:1px solid var(--border);
        animation:popIn .4s ease forwards;
    }

       .Challenges .stat-pill{
        padding:6px 14px;
        border-radius:999px;
        font-size:13px;
        font-weight:600;
        border:1px solid var(--border);
        animation:popIn .4s ease forwards;
    }
    .Courses .stat-completed{
        background:#0ea5e91a;
        color:var(--blue-2);
        border-color:#0ea5e933;
    }

    .Courses .stat-progress{
        background:transparent;
        color:var(--text);
    }

.Challenges .streak-fire{
        background:#511a1a;
        color:var(--blue-2);
        border-color:#f87171;
    }
    .streak-fire i {
    color: #f87171; 
    animation: flicker 5s infinite;
}
@keyframes flicker {
    0%, 100% { color: #f87171; transform: scale(1); }
    25% { color: #fca5a5; transform: scale(1.1); }
    50% { color: #f87171; transform: scale(0.95); }
    75% { color: #fca5a5; transform: scale(1.05); }
}
    @keyframes popIn{
        from{transform:scale(.85);opacity:0}
        to{transform:scale(1);opacity:1}
    }

    /* COURSE GRIDS*/
    .Courses .recommended{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:18px;
    }

    .Courses .all-courses{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:18px;
    }

    /* COURSE CARD*/
    .Courses .card{
        background:var(--panel);
        border:1px solid var(--border);
        border-radius:16px;
        padding:20px;
        position:relative;
    }

    .Courses .card-header{
        display:flex;
        justify-content:space-between;
        align-items:center;
    }

    .Courses .card h4{
        font-size:16px;
        font-weight:600;
        margin:12px 0 6px;
    }

    .Courses .Description,
    .Courses .meta{
        font-size:13px;
        color:var(--muted);
        display:flex;
        gap:14px;
        margin-bottom:8px;
        }

    .Courses .rating i{
        color:var(--yellow);
    }
    /* LEVEL + HOURS*/
    .Courses .course-meta-row{
        display:flex;
        justify-content:space-between;
        align-items:center;
        margin-top:10px;
    }

    .Courses .course-hours{
        font-size:12px;
        color:var(--muted);
        display:flex;
        gap:6px;
        align-items:center;
    }

    .Courses .level {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 10px;
    }

    .Courses .level.beginner {
    background: #22c55e1f;
    color: var(--green);
    }

    .Courses .level.medium {
    background: #f59e0b1f;
    color: var(--orange);
    }

    .Courses .level.hard {
    background: #dd2d0e1f;
    color: var(--red, #ef4444);
    }

    /* BUTTONS*/
    .Courses .card-footer{
        margin-top:22px;
    }

    .Courses .btn{
        background:var(--blue-2);
        border:none;
        padding:10px 16px;
        border-radius:10px;
        color:white;
        font-size:13px;
        font-weight:600;
        cursor:pointer;
        display:inline-flex;
        align-items:center;
        gap:8px;
    }

    .Courses .btn.alt{
        background:var(--panel-2);
        border:1px solid var(--border);
        color:var(--text);
    }

    /*PROGRESS BAR*/
    .Courses .progress{
        background:var(--border);
        height:6px;
        border-radius:6px;
        overflow:hidden;
        margin:10px 0 6px;
    }

    .Courses .progress span{
        display:block;
        height:100%;
        background:var(--blue-2);
    }

    .Courses .progress-text{
        font-size:12px;
        color:var(--muted);
        margin-bottom:14px;
    }

    .Courses .completed-badge{
    width:26px;
    height:26px;
    border-radius:50%;
    background:var(--green);
    display:flex;
    align-items:center;
    justify-content:center;
    color:white;
    font-size:12px;
    position:absolute;
    top:12px;
    right:12px;
    } 
    .btn.completed {
    background:#e5e7eb;
    color:#374151;
    cursor: default;
    }

/* ====CHALLENGES==== */
        .Challenges{
        --bg:#0b0f14;
        --panel:#121821;
        --panel-2:#0f141c;
        --border:#1f2937;
        --text:#e5e7eb;
        --muted:#9ca3af;
        --blue:#0ea5e9;
        --green:#22c55e;
        --yellow:#facc15;
        --orange:#f59e0b;
        --red:#ef4444;

        background:var(--bg);
        color:var(--text);
        display:flex;
        min-height:100vh;
    }

    /* LIGHT MODE */
    body.light.Challenges{
        --bg:#f8fafc;
        --panel:#ffffff;
        --panel-2:#f1f5f9;
        --border:#e5e7eb;
        --text:#0f172a;
        --muted:#64748b;
    }

    /* MAIN */
    .Challenges .main{
        flex:1;
        padding:30px 36px;
    }

    /* HEADER */
    .Challenges .section-header{
        display:flex;
        justify-content:space-between;
        align-items:center;
        margin-bottom:28px;
    }

    .Challenges .section-title{
        font-size:28px;
        font-weight:700;
    }

     .subtext{
        font-size:14px;
        color:var(--muted);
    }

    /* STATS */
    .Challenges .stats{
        display:grid;
        grid-template-columns:repeat(4,1fr);
        gap:16px;
        margin-bottom:30px;
    }

    .Challenges .stat-card{
        background:var(--panel);
        border:1px solid var(--border);
        border-radius:16px;
        padding:20px;
        display:flex;
        align-items:flex-start;
        gap:14px;
    }

    .Challenges .stat-icon{
        font-size:22px;
        color:var(--blue);
    }

    .Challenges .stat-title{
        font-size:13px;
        color:var(--muted);
    }

    .Challenges .stat-value{
        font-size:22px;
        font-weight:700;
    }

    /* FILTERS */
    .Challenges .filters{
        display:flex;
        gap:12px;
        margin-bottom:22px;
        margin-top: 25px;
    }

    .Challenges .filter{
        padding:8px 14px;
        border-radius:999px;
        border:1px solid var(--border);
        background:var(--panel-2);
        font-size:13px;
        cursor:pointer;
    }

    .Challenges .filter.active{
        background:#0ea5e91a;
        color:var(--blue);
    }

    /* CHALLENGES GRID */
        .Challenges .challenges{
        display:grid;
        grid-template-columns:repeat(3,1fr);
        gap:18px;
    }

    /* CHALLENGE CARD */
    .Challenges .challenge{
        background:var(--panel);
        border:1px solid var(--border);
        border-radius:16px;
        padding:20px;
        position:relative;
    }

    .Challenges .challenge h4{
        font-size:16px;
        margin-bottom:8px;
    }

    .Challenges .challenge p{
        font-size:13px;
        color:var(--muted);
        margin-bottom:14px;
    }

    .Challenges .challenge-meta{
        display:flex;
        justify-content:space-between;
        align-items:center;
        margin-bottom:16px;
    }

    /* DIFFICULTY */
    .Challenges .diff{
        padding:4px 10px;
        border-radius:999px;
        font-size:11px;
        font-weight:600;
    }

    .Challenges .easy{background:#22c55e1f;color:var(--green);}
    .Challenges .medium{background:#f59e0b1f;color:var(--orange);}
    .Challenges .hard{background:#ef44441f;color:var(--red);}

    /* LANGUAGES */
    .Challenges .langs{
        font-size:12px;
        color:var(--muted);
    }

    /* BUTTON */
    .Challenges .solve-btn{
        width:100%;
        padding:10px;
        border-radius:10px;
        border:none;
        background:var(--blue);
        color:white;
        font-size:14px;
        cursor:pointer;
    }

    .Challenges .solve-btn i{
        margin-right:6px;
    }

    /* COMPLETED BADGE */
    .Challenges .completed{
        position:absolute;
        top:14px;
        right:14px;
        width:26px;
        height:26px;
        border-radius:50%;
        background:var(--green);
        display:flex;
        align-items:center;
        justify-content:center;
        color:white;
        font-size:12px;
    }
    .challenge {
        transition: opacity .25s ease, transform .25s ease;
    }

    /* SEARCH */
    .Challenges .search-wrapper{
        position:relative;
        width:260px;
    }

    .Challenges .search-wrapper i{
        position:absolute;
        left:14px;
        top:50%;
        transform:translateY(-50%);
        font-size:13px;
        color:var(--muted);
    }

    .Challenges .search-input{
        width:100%;
        padding:8px 14px 8px 36px;
        border-radius:999px;
        border:1px solid var(--border);
        background:var(--panel-2);
        color:var(--text);
        font-size:13px;
    }

    /* DROPDOWNS*/
    .Challenges .filter-select{
        padding:8px 14px;
        border-radius:999px;
        border:1px solid var(--border);
        background:var(--panel-2);
        color:var(--text);
        font-size:13px;
        cursor:pointer;
        transition:.25s ease;
    }

    .Challenges .filter-select.easy{
        background:#22c55e1f;
        color:var(--green);
    }

    .Challenges .filter-select.medium{
        background:#f59e0b1f;
        color:var(--orange);
    }

    .Challenges .filter-select.hard{
        background:#ef44441f;
        color:var(--red);
    }
    .Challenges .filter-select.solved{
        background:#22c55e1f;
        color:var(--green);
    }

    .Challenges .filter-select.unsolved{
        background:#0ea5e91f;
        color:var(--blue);
    }

    .Challenges .filters-row{
        display:flex;
        align-items:center;
        justify-content:space-between; 
        gap:20px;
    }
    .Challenges .filter-group{
        display:flex;
        gap:12px;
    }


    /* ===== CHALLENGE PAGE ===== */
    .challenge-page .challenge-main {
      flex: 1;
      padding: 28px 36px;
      margin-left:260px;
    }

    .challenge-page .back-link {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: var(--muted);
      font-size: 14px;
      margin-bottom: 18px;
      text-decoration: none;
    }

    .challenge-page .challenge-layout {
      display: grid;
      grid-template-columns: 0.9fr 1.4fr;
      gap: 24px;
    }

    /* LEFT */
    .challenge-page .problem-panel {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 24px;
    }

    .challenge-page .problem-panel h2 {
      font-size: 22px;
      margin-bottom: 10px;
    }

    .challenge-page .tag {
      display: inline-block;
      padding: 4px 10px;
      font-size: 12px;
      border-radius: 999px;
      background: var(--panel-2);
      margin-right: 6px;
    }

    .challenge-page .tag.easy {
      background: rgba(34,197,94,.15);
      color: var(--green);
    }

    .challenge-page .problem-desc {
      margin: 18px 0;
      color: var(--muted);
      line-height: 1.6;
    }

    .challenge-page .example-box {
      background: var(--panel-2);
      border-radius: 10px;
      padding: 14px;
      margin-bottom: 12px;
    }

    .challenge-page .example-box h4 {
      font-size: 13px;
      margin-bottom: 6px;
    }

    .challenge-page .example-box code {
      font-size: 13px;
      color: var(--yellow);
    }

    .challenge-page .explain {
      font-size: 12px;
      color: var(--muted);
      margin-top: 6px;
    }

    /* RIGHT */
    .challenge-page .editor-panel {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 14px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .challenge-page .editor-header {
      padding: 14px 16px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid var(--border);
    }

    .challenge-page .lang-select {
      background: var(--panel-2);
      border: 1px solid var(--border);
      color: var(--text);
      padding: 6px 10px;
      border-radius: 8px;
    }
    .challenge-page .editor-panel {
      height: min(520px, 70vh);
    }
    .challenge-page .code-editor {
      flex: 1;
       min-height: 0;
      background: #0b0f14;
      color: #e5e7eb;
      border: none;
      padding: 16px;
      font-size: 14px;
      resize: none;
      outline: none;
    }

    .challenge-page .submit-btn {
      background: #1f4d6b;
      border: none;
      color: white;
      padding: 14px;
      font-weight: 600;
      cursor: pointer;
    }

    .challenge-page .submit-btn:hover {
      background: #25668f;
    }





/* ====ANALYSIS ====*/
    .Analysis{
        --bg:#0b0f14;
        --panel:#121821;
        --panel-2:#0f141c;
        --border:#1f2937;
        --text:#e5e7eb;
        --muted:#9ca3af;
        --blue:#0ea5e9;
        --green:#22c55e;
        --yellow:#facc15;
        --red:#ef4444;

        background:var(--bg);
        color:var(--text);
        display:flex;
        min-height:100vh;
    }

    /* MAIN */
    .Analysis .main{
        flex:1;
        padding:32px 40px;
    }

    /* HEADER */
    .analysis-header{
        display:flex;
        justify-content:space-between;
        align-items:center;
        margin-bottom:30px;
    }

    .analysis-header h2{
        font-size:28px;
        font-weight:700;
    }

    .header-meta{
        font-size:13px;
        color:var(--muted);
    }

    /* STATS */
    .analysis-stats{
        display:grid;
        grid-template-columns:repeat(4,1fr);
        gap:16px;
        margin-bottom:28px;
    }

    .stat-card{
        background:var(--panel);
        border:1px solid var(--border);
        border-radius:14px;
        padding:18px;
        display:flex;
        gap:14px;
        align-items:center;
    }

    .stat-icon{
        width:36px;
        height:36px;
        border-radius:10px;
        display:flex;
        align-items:center;
        justify-content:center;
        font-size:16px;
    }

    .stat-icon.blue{background:#0ea5e91f;color:var(--blue);}
    .stat-icon.green{background:#22c55e1f;color:var(--green);}
    .stat-icon.red{background:#ef44441f;color:var(--red);}
    .stat-icon.yellow{background:#facc151f;color:var(--yellow);}

    .stat-value{
        font-size:22px;
        font-weight:700;
        display:block;
    }

    .stat-title{
        font-size:13px;
        color:var(--muted);
    }

    /* GRID */
    .analysis-grid{
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:20px;
        margin-bottom:20px;
    }

    /* PANELS */
    .panel{
        background:var(--panel);
        border:1px solid var(--border);
        border-radius:16px;
        padding:22px;
    }

    .panel h4{
        font-size:16px;
        margin-bottom:18px;
    }

    /* CHART PLACEHOLDERS */
    .chart-placeholder{
        background:var(--panel-2);
        border-radius:12px;
    }

    .chart-placeholder.donut{
        height:220px;
    }

    .chart-placeholder.bars{
        height:220px;
    }

    .chart-placeholder.line{
        height:260px;
    }

    .chart-placeholder.progress{
        height:260px;
    }
    .main > .panel {
      margin-bottom: 20px;
    }

    #weeklyChart {
      height: 220px !important;
    }

    #improveChart {
      height: 240px !important;
    }

/* ===COMMUNITY=== */
    .community-coming-soon {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.3); 
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
        pointer-events: none;
    }

    .community-coming-soon .coming-soon-content {
        text-align: center;
        color: white;
        background: rgba(0,0,0,0.25);
        padding: 40px 60px;
        border-radius: 15px;
        backdrop-filter: blur(5px);
      }

    .community-coming-soon i {
        margin-bottom: 20px;
        color: white;
    }

  .Community{
        --bg:#0b0f14;
        --panel:#121821;
        --panel-2:#0f141c;
        --border:#1f2937;
        --text:#e5e7eb;
        --muted:#9ca3af;
        --blue:#0ea5e9;
        --green:#22c55e;
        --yellow:#facc15;
        --orange:#f59e0b;
        --red:#ef4444;

        background:var(--bg);
        color:var(--text);
        display:flex;
        min-height:100vh;
    }

    /* LIGHT MODE */
    body.light.Community{
        --bg:#f8fafc;
        --panel:#ffffff;
        --panel-2:#f1f5f9;
        --border:#e5e7eb;
        --text:#0f172a;
        --muted:#64748b;
    }

    /* MAIN */
    .Community .main{
        flex:1;
        padding:30px 36px;
    }

    /* HEADER */
    .Community .section-header{
        display:flex;
        justify-content:space-between;
        align-items:center;
        margin-bottom:28px;
    }

    .Community .section-title{
        font-size:28px;
        font-weight:700;
    }

     .subtext{
        font-size:14px;
        color:var(--muted);
    }

    .top-bar{
        border-bottom:1px solid var(--border);
        padding-bottom:14px;
        margin-bottom:22px;
    }

    .top-bar h2{
        font-size:18px;
        font-weight:600;
        display:flex;
        align-items:center;
        gap:10px;
    }

    .page-title{
        font-size:26px;
        font-weight:700;
        margin-bottom:18px;
    }

    /* SEARCH */
    .community-search{
        display:flex;
        gap:12px;
        align-items:center;
        margin-bottom:22px;
    }

    .search-box{
        flex:1;
        position:relative;
    }

    .search-box input{
        width:100%;
        padding:12px 16px 12px 42px;
        border-radius:10px;
        background:var(--panel);
        border:1px solid var(--border);
        color:var(--text);
    }

    .search-box i{
        position:absolute;
        left:14px;
        top:50%;
        transform:translateY(-50%);
        color:var(--muted);
    }

    .filter-btn{
        background:var(--panel);
        border:1px solid var(--border);
        padding:10px 14px;
        border-radius:10px;
        color:var(--text);
        cursor:pointer;
    }

    .Community .filter-dropdown{
        display:flex;
        align-items:center;
        gap:8px;
        padding:8px 14px;
        border-radius:999px;
        border:1px solid var(--border);
        background:var(--panel-2);
        cursor:pointer;
    }

    .Community .filter-dropdown i{
        font-size:13px;
        color:var(--muted);
    }

    .Community .filter-dropdown select{
        border:none;
        background:transparent;
        color:var(--text);
        font-size:13px;
        cursor:pointer;
        outline:none;
        padding-right:14px; 
    }

    .new-post-btn{
        background:var(--blue);
        color:white;
        border:none;
        padding:10px 16px;
        border-radius:10px;
    }

    .community-grid{
        display:grid;
        grid-template-columns:1fr 320px;
        gap:24px;
    }

    .tabs{
        display:flex;
        gap:8px;
        margin-bottom:18px;
    }

    .tab{
        background:var(--panel);
        border:1px solid var(--border);
        padding:8px 14px;
        border-radius:10px;
        color:var(--muted);
        cursor:pointer;
    }

    .tab.active{
        color:var(--text);
        background:#0ea5e91a;
    }

    /* DISCUSSION */
    .discussion-card{
        display:flex;
        gap:14px;
        background:var(--panel);
        border:1px solid var(--border);
        padding:16px;
        border-radius:16px;
        margin-bottom:14px;
    }

    .avatar{
        width:42px;
        height:42px;
        border-radius:50%;
        background:#0ea5e91a;
        color:var(--blue);
        display:flex;
        align-items:center;
        justify-content:center;
        font-weight:700;
    }

    .avatar.sm{
        width:32px;
        height:32px;
        font-size:12px;
    }

    .title-row{
        display:flex;
        gap:10px;
        align-items:center;
    }

    .hot{
        background:#ef44441f;
        color:#ef4444;
        padding:2px 8px;
        border-radius:999px;
        font-size:11px;
    }

    .content h3{
        font-size:16px;
        font-weight:600;
    }

    .content p{
        font-size:13px;
        color:var(--muted);
        margin:6px 0 10px;
    }

    .meta{
        display:flex;
        gap:12px;
        font-size:12px;
        color:var(--muted);
        align-items:center;
    }

    .tag{
        background:#0ea5e91a;
        color:var(--blue);
        padding:3px 8px;
        border-radius:999px;
    }

    /* RIGHT PANEL */
    .right-panel .panel{
        background:var(--panel);
        border:1px solid var(--border);
        border-radius:16px;
        padding:16px;
        margin-bottom:16px;
    }

    .panel h4{
        font-size:14px;
        margin-bottom:12px;
    }

    .cat{
        display:flex;
        justify-content:space-between;
        padding:8px 10px;
        border-radius:10px;
        color:var(--muted);
        cursor:pointer;
    }

    .cat.active{
        background:#0ea5e91a;
        color:var(--blue);
    }

    /* CONTRIBUTORS */
    .contributor{
        display:flex;
        align-items:center;
        gap:10px;
        margin-bottom:10px;
    }

    .rank{
        width:20px;
        text-align:center;
        color:var(--muted);
    }


    /* MODAL OVERLAY */
    .post-modal-overlay{
        position:fixed;
        inset:0;
        background:rgba(0,0,0,.45);
        backdrop-filter:blur(6px);
        display:flex;
        align-items:center;
        justify-content:center;
        opacity:0;
        pointer-events:none;
        transition:.25s ease;
        z-index:999;
    }

    .post-modal-overlay.show{
        opacity:1;
        pointer-events:auto;
    }

    /* MODAL BOX */
    .post-modal{
        width:100%;
        max-width:520px;
        background:var(--panel-2);
        border-radius:18px;
        padding:22px;
        box-shadow:0 20px 60px rgba(0,0,0,.35);
        transform:scale(.95);
        transition:.25s ease;
    }

    .post-modal-overlay.show .post-modal{
        transform:scale(1);
    }

    /* HEADER */
    .post-modal-header{
        display:flex;
        justify-content:space-between;
        align-items:center;
        margin-bottom:16px;
    }

    .post-modal-header h3{
        font-size:18px;
    }

    .post-modal-header i{
        cursor:pointer;
        color:var(--muted);
        font-size:18px;
    }

    /* INPUTS */
    .post-input,
    .post-textarea,
    .post-select{
        width:100%;
        background:var(--panel);
        border:1px solid var(--border);
        border-radius:12px;
        padding:12px 14px;
        color:var(--text);
        font-size:14px;
        margin-bottom:14px;
    }

    .post-textarea{
        resize:none;
    }

    /* ACTIONS */
    .post-modal-actions{
        display:flex;
        justify-content:flex-end;
        gap:10px;
    }

    .btn-secondary{
        background:transparent;
        border:1px solid var(--border);
        padding:10px 18px;
        border-radius:10px;
        color:var(--muted);
        cursor:pointer;
    }

    .btn-primary{
        background:var(--blue);
        border:none;
        padding:10px 18px;
        border-radius:10px;
        color:white;
        cursor:pointer;
    }

    .btn-primary:hover{
        opacity:.9;
    }
    .modal-subtext{
        font-size:13px;
        color:var(--muted);
        margin-top:4px;
    }

    .modal-label{
        font-size:13px;
        font-weight:500;
        margin-bottom:6px;
        display:block;
    }

    .modal-error{
        font-size:13px;
        color:#ff6b6b;
        margin-top:6px;
        min-height:18px;
    }

/* ===COURSE PAGE ==== */

.course-page .course-tabs{
  display:flex;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  margin:26px 0;
}

.course-page .tab{
  flex:1;
  padding:14px;
  background:transparent;
  color:var(--muted);
  border:none;
  font-weight:600;
}

.course-page .tab.active{
  background:var(--panel);
  color:var(--blue);
  box-shadow:inset 0 0 0 1px var(--blue-2);
}

.course-page .course-panel{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:22px;
}

.course-page .hidden{
  display:none;
}

/* OVERVIEW */

.course-page #overview{
  text-align:left;
}

.course-page #overview h3,
.course-page #overview h4{
  color:var(--text);
  font-weight:700;
  margin-bottom:10px;
}

.course-page #overview p,
.course-page #overview li{
  color:var(--muted);
  font-size:14px;
  line-height:1.6;
}

.course-page #overview ul{
  margin:12px 0 20px;
  padding-left:20px;
}

.course-page #overview li{
  margin-bottom:8px;
}

.course-page #overview h4{
  margin-top:20px;
}

.course-page .checklist li{
  list-style:none;
  margin:8px 0;
}

.course-page .checklist li:before{
  content:'✔';
  color:var(--blue);
  margin-right:8px;
}

.course-page .dotlist{
  padding-left:16px;
}

/* LESSON LIST */
.lesson-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.lesson-header .back-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
}
.lesson-header .summary-btn {
  border: 1px solid #575656;
  background: none;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: white;
  transition: all 0.2s ease;
}

.lesson-header .summary-btn:hover {
background-color: #575656;}

.course-page .lesson-row{
  display:flex;
  align-items:flex-start;
  justify-content: flex-start;
  gap:8px;
  padding:16px;
  border:1px solid var(--border);
  border-radius:12px;
  margin-bottom:12px;
}

.course-page .lesson-row.active{
  border-color:var(--blue-2);
}

.course-page .lesson-row.locked{
  opacity:.4;
}

.course-page .status{
  width:32px;
  height:32px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--panel-2);
}

.course-page .status.complete{
  background:var(--green);
  color:white;
}

.course-page .status.play{
  background:#0ea5e933;
  color:var(--blue);
}
.course-page .lesson-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.course-page .lesson-info span {
  font-size: 12px;
  color: var(--muted);
}

.course-page .lesson-info h4{
  margin:0;
  font-size:15px;
}

.course-page .lesson-info span{
  font-size:12px;
  color:var(--muted);
}

.course-page .now{
  margin-left:auto;
  font-size:11px;
  color:var(--blue);
  border:1px solid var(--blue);
  padding:4px 10px;
  border-radius:999px;
}

.course-page .nav-footer{
  display:flex;
  justify-content:space-between;
  margin-top:26px;
}

.lesson-page .video-wrapper{
  margin-top:20px;
  border-radius:16px;
  overflow:hidden;
}
.empty-state {
  text-align: center;
  padding: 40px 20px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: var(--panel);
  color: var(--muted);
}

.empty-state i {
  font-size: 32px;
  color: var(--blue);
  margin-bottom: 12px;
}

.empty-state h4 {
  margin: 8px 0;
  color: var(--text);
}

.empty-state p {
  font-size: 14px;
  line-height: 1.6;
}
.quiz-box {
  margin-top: 20px;
}

.question-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
}

.question-card h4 {
  margin-bottom: 12px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  background: #0f172a;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.option input {
  accent-color: #22d3ee;
}

.submit-btn {
  width:auto;
  padding:8px 16px;
  font-size:13px;
  margin-left:auto;
  display:block;
  
}

.result {
  margin-top: 24px;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.result.success {
  background: #064e3b;
  border: 1px solid #10b981;
}

.result.fail {
  background: #422006;
  border: 1px solid #facc15;
}

/* QUIZ HEADER */
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.quiz-badges {
  display: flex;
  gap: 10px;
}

.quiz-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px; 
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
}

.quiz-badge.attempts {
  background: #0ea5e91a;
  color: var(--blue-2);
  border-color: #0ea5e933;
}

.quiz-badge.timer {
  background: #f59e0b1f;
  color: var(--orange);
  font-family: "Orbitron", monospace;
  border-color: #f59e0b55;
}

.challenge-result {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background-color: white;
    padding: 25px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: challenge-fadeIn 0.3s ease;
}

.challenge-success {
    border: 3px solid #28a745;
    background-color: rgba(157, 216, 167, 0.3);
}

.challenge-failure {
    border: 3px solid #dc3545;
    background-color: rgba(231, 22, 43, 0.3);
}

.challenge-result h3 {
    margin: 10px 0;
}

.challenge-result p, .challenge-result pre {
    margin: 5px 0;
    font-size: 0.9rem;
}

@keyframes challenge-fadeIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}



/* ===== Competitions & Events ===== */

.events-section {
padding: 10px;} 

.section-subtitle {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #e5e7eb;
  text-align: left;
  margin-left: 0;
  padding-left: 0;
    margin-top: 0;

}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.event-card {
  position: relative;
  padding: 20px;
  border-radius: 16px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
   cursor: pointer;
     transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;

}
.event-card:hover {
  transform: translateY(-6px) scale(1.00); 
  box-shadow: 0 16px 32px rgba(0,0,0,0.35);
  filter: brightness(1.05);
}
.event-card h4 {
  margin: 12px 0 6px;
  font-size: 16px;
  font-weight: 600;
}
.event-card:hover {
  border: 1px solid rgba(255,255,255,0.2);
}
.event-card h4, 
.event-card p, 
.event-meta {
  transition: transform 0.3s ease;
}

.event-card:hover h4 {
  transform: translateY(-3px);
}

.event-card:hover p {
  transform: translateY(-2px);
}

.event-card:hover .event-meta {
  transform: translateY(-1px);
}


.event-card p {
  font-size: 14px;
  opacity: 0.9;
}

.event-icon {
  font-size: 22px;
  opacity: 0.9;
}

.event-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 13px;
  opacity: 0.9;
}

.event-meta i {
  margin-right: 6px;
}

.event-status {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.event-status.active {
  background: rgba(255,255,255,0.25);
}

.event-status.upcoming {
  background: rgba(0,0,0,0.25);
}

.event-card.red {
  background: linear-gradient(135deg, #b45309, #be123c);
}

.event-card.gold {
  background: linear-gradient(135deg, #ca8a04, #a16207);
}

.event-card.purple {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

/* Chart sizing */
.panel canvas {
  width: 100% !important;
  height: 260px !important;
}
#languageChart {
  max-height: 240px !important;
}
#weeklyChart {
  height: 300px !important;
}
#improveChart {
  height: 300px !important;
}


@media (max-width: 600px) {
  .login-modal,
  .extension-modal {
    width: 90%;         
    padding: 20px;      
    font-size: 14px;     
  }

  .extension-steps li {
    font-size: 13px;     
  }

  .btn-google, .btn-primary {
    padding: 12px 16px;  
    font-size: 14px;
  }

  .close-btn {
    top: 10px;
    right: 12px;
  }
} 

/* ========== Profile ===========*/
.Profile {
  --section-gap: 20px;
}
  .Profile .section-title{
      font-size: 30px;
        margin: 0;
    }
    .Profile .subtext{
      margin-top: 0;
    }
    .Profile{
        --bg:#0b0f14;
        --panel:#121821;
        --panel-2:#0f141c;
        --border:#1f2937;
        --text:#e5e7eb;
        --muted:#9ca3af;
        --blue:#22d3ee;
        --blue-2:#0ea5e9;
        --yellow:#facc15;
        --green:#22c55e;
        --orange:#f59e0b;
    }
    .Profile{
        background:var(--bg);
        color:var(--text);
        display:flex;
        min-height:100vh;
        font-family:'Inter',sans-serif;

    }

    .Profile *{
        box-sizing:border-box;
    }
    .Profile .main{
      flex:1;
      height:100vh;
      display:flex;
      flex-direction:column;
      width: 100%;
    }


.Profile .grid-container {
  display: grid;
  grid-template-columns: 7fr 3fr;
  gap: 0px 0px;
  height: 100%;
  width: 100%;
}

.Profile .grid-item {
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;

}

.item-1 {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
}

.item-2 {
  grid-column: 2 / 3;
  grid-row: 3 / 4;
  background:var(--panel-2);
  border-left:1px solid var(--border);

}

.item-3 {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

.item-4 {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
}

.item-5 {
  grid-column: 1 / 2;
  grid-row: 3 / 4;
}

/* Tablet styles */
@media (max-width: 1024px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 5px 5px;
  }
}

/* Mobile styles */
@media (max-width: 640px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 5px 5px;
  }
}

/* Tablet styles */
@media (max-width: 1024px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 5px 5px;
  }
}

/* Mobile styles */
@media (max-width: 640px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 5px 5px;
  }
}
/* ===== ITEM 3: ACHIEVEMENTS ===== */

.item-3 {
  align-items: flex-start;
  padding: 14px;
  
}

.achievements-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}


.achievement-inner {
  background: #0f141c;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 16px;
}


.achievement-left-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.achievement-badge img {
  width: 66px;
  height: 66px;
  object-fit: contain;
}

.achievement-info {
  display: flex;
  flex-direction: column;
  min-width: 110px; 
}

.achievement-info .rank {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.achievement-info .lang {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}


.achievement-right-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.achievement-right-actions i {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--blue-2);
  cursor: pointer;
}

/* ===== ITEM 4: PROFILE KPIs ===== */

.Profile .item-4 {
  padding: 14px;
  align-items: flex-start;
  background: transparent;
}

.Profile .profile-kpis {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--section-gap);
}

.Profile .kpi-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.Profile .kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.Profile .kpi-icon.blue {
  background: #0ea5e91f;
  color: var(--blue);
}

.Profile .kpi-icon.red {
    background: #dd2d0e1f;
    color: var(--red, #ef4444);   
}

.Profile .kpi-icon.yellow {
  background: #facc151f;
  color: var(--yellow);
}

.Profile .kpi-value {
  font-size: 22px;
  font-weight: 700;
  display: block;
  color: var(--text);
}

.Profile .kpi-title {
  font-size: 13px;
  color: var(--muted);
}


/* ===== ITEM 5: BADGES & CERTIFICATES ===== */

.Profile .item-5 {
  padding: 16px;
  align-items: flex-start;
  background: transparent;
  margin-top: -30px;
}

.Profile .badges-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.Profile .badges-section .section-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 15px;
}

.badges-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 15px;

}

.badge-card {
  background: var(--panel);      
  border: 1px solid var(--border); 
  border-radius: 14px;
  padding: 6px;
  width: 100px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  transition: transform 0.2s ease;
}

.badge-card:hover {
  transform: translateY(-3px);
}

.badge-card img {
  width: 65px;
  height: 65px;
  object-fit: contain;
  margin-bottom: 5px;
}

.badge-info .badge-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

.badge-info .badge-level {
  font-size: 12px;
  font-weight: 100;
  color: var(--muted);
  padding: 3px;
}

.Profile .badges-section .coming-soon {
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
}


/* ===== ITEM 1: PROFILE EDIT CARD ===== */

.Profile .item-1 {
  background: var(--panel-2);
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-left:1px solid var(--border);

}

.Profile .profile-card {
  text-align: center;
  max-width: 340px;
  width: 100%;
}

.Profile .avatar-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.Profile .avatar-box {
  width: 160px;
  height: 160px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--panel), var(--panel-2));
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border); 
    position: relative;


}

.Profile .avatar-box img {
  width: 150px;
  height: 150px;
}

.Profile .avatar-nav {
  position: absolute;
  background: #1f2937;
  border: none;
  color: #e5e7eb;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
   opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}


.Profile .avatar-nav.left {
  left: -10px;
}

.Profile .avatar-nav.right {
  right: -10px;
}


.Profile .avatar-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}
.Profile .avatar-wrapper.editing .avatar-nav {
  opacity: 1;
  pointer-events: auto;
}
.Profile .dot {
  width: 8px;
  height: 8px;
  background: #374151;
  border-radius: 50%;
}

.Profile .dot.active {
  background: #22d3ee;
  width: 18px;
  border-radius: 999px;
}

.Profile .username-input {
  background: transparent;
  border: none;
  color: #e5e7eb;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  outline: none;
}

.Profile .verified-line {
  margin-top: 4px;
  color: #22c55e;
}

.Profile .user-meta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.Profile .profile-actions {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.Profile .share-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.Profile .delete-btn {
  background: transparent;
  padding: 8px 14px;
  border-radius: 10px;  color: #ef4444;
  cursor: pointer;
  border: 1px solid var(--border);

}
.Profile .avatar-nav.left { left: 6px; }
.Profile .avatar-nav.right { right: 6px; }

.Profile .username-row {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: 8px;
}


.Profile .username-input {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  outline: none;
  padding: 2px 4px;
}

.Profile .username-input.editing {
  border-bottom-color: var(--blue-2);
  margin-top: 20px;
}


.Profile .edit-btn {
  position: absolute;
  right: 15%;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--blue-2);
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.Profile .edit-btn:hover {
  background: rgba(14,165,233,0.12);
}

.Profile .edit-btn.save {
  border-color: var(--blue-2);
  background: rgba(14,165,233,0.18);
}
/* ===== ITEM 2 : STREAK CALENDAR ===== */

.Profile .item-2 {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;

}

.streak-calendar {
  background: var(--panel);
  border-radius: 24px;
  padding: 18px 16px 20px;
  width: 100%;
  max-width: 320px;
  color: #ffffff;
  border:1px solid var(--border);

}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 12px;
}

.calendar-header i {
  cursor: pointer;
  color: #6b7280;
}

.calendar-week {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 10px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.day {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.day.empty {
  background: #d2d2d3;
}

.day.fire {
  background: #fde68a;
}

.day.fire i {
  color: #f59e0b;
  font-size: 16px;
}

.day.avatar {
  background: #bfdbfe;
}

.day.avatar img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

.day.avatar .check {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  background: #22c55e;
  color: #fff;
  font-size: 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.day.avatar .date {
  position: absolute;
  bottom: -22px;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}
