:root{
  --cat-primary:#f59e0b;
  --cat-primary-dark:#d97706;
  --cat-primary-soft:#fff7ed;
  --cat-primary-border:#fed7aa;
  --cat-text:#0f172a;
  --cat-muted:#64748b;
  --cat-border:#e2e8f0;
  --cat-bg:#f8fafc;
  --cat-white:#ffffff;
  --cat-shadow:0 18px 45px rgba(15,23,42,.08);
}

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

body{
  font-family:'Inter',sans-serif;
  background:
    radial-gradient(circle at top left,rgba(245,158,11,.12),transparent 30rem),
    linear-gradient(180deg,#ffffff 0%,#f8fafc 48%,#eef2f7 100%);
  color:var(--cat-text);
  line-height:1.75;
  min-height:100vh;
}

.topbar{
  width:100%;
  min-height:92px;
  padding:18px clamp(18px,5vw,58px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:rgba(255,255,255,.94);
  border-bottom:1px solid var(--cat-border);
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter:blur(12px);
}

.logo{
  color:var(--cat-primary);
  font-size:clamp(1.55rem,4vw,2.25rem);
  font-weight:800;
  letter-spacing:-.04em;
}

.back-btn{
  min-width:118px;
  min-height:54px;
  padding:16px 24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:18px;
  background:var(--cat-primary-soft);
  color:#92400e;
  border:1px solid var(--cat-primary-border);
  font-weight:800;
  line-height:1;
  text-decoration:none !important;
  text-decoration-line:none !important;
  transition:transform .2s ease,box-shadow .2s ease;
}

.back-btn:hover{
  transform:translateY(-2px);
}

.course-header{
  max-width:1180px;
  margin:0 auto;
  padding:76px clamp(22px,5vw,42px) 44px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:34px;
  align-items:end;
}

.course-info{
  max-width:850px;
}

.course-badge,
.lesson-number,
.section-label{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--cat-primary-soft);
  border:1px solid var(--cat-primary-border);
  color:#b45309;
  border-radius:999px;
  padding:10px 18px;
  font-size:.82rem;
  line-height:1;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.course-info h1{
  margin-top:26px;
  font-size:clamp(2.45rem,7vw,5.4rem);
  line-height:1.04;
  letter-spacing:-.07em;
  font-weight:800;
  color:var(--cat-text);
}

.course-info p{
  margin-top:24px;
  color:var(--cat-muted);
  font-size:clamp(1.04rem,2.2vw,1.22rem);
  max-width:780px;
}

.course-progress-box{
  background:rgba(255,255,255,.88);
  border:1px solid var(--cat-border);
  border-radius:28px;
  padding:28px;
  box-shadow:var(--cat-shadow);
}

.progress-text{
  display:block;
  font-weight:700;
  color:#334155;
  margin-bottom:14px;
}

.progress-bar{
  width:100%;
  height:12px;
  border-radius:999px;
  background:#e2e8f0;
  overflow:hidden;
}

.progress-fill{
  height:100%;
  width:0%;
  border-radius:999px;
  background:linear-gradient(135deg,var(--cat-primary),#fbbf24);
  transition:width .45s ease;
}

.progress-percent{
  display:block;
  margin-top:14px;
  color:#92400e;
  font-weight:800;
}

.container{
  max-width:1180px;
  margin:0 auto;
  padding:0 clamp(22px,5vw,42px) 82px;
}

.lesson-card,
.card,
.problem-section,
.important-box{
  background:rgba(255,255,255,.94);
  border:1px solid var(--cat-border);
  border-radius:34px;
  padding:clamp(28px,5vw,52px);
  margin-bottom:36px;
  box-shadow:var(--cat-shadow);
}

.lesson-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:30px;
  flex-wrap:wrap;
}

.lesson-duration{
  color:#64748b;
  font-weight:800;
}

.lesson-card h2,
.card h2,
.problem-section h2,
.video-card h2,
.important-box h2{
  font-size:clamp(1.8rem,4vw,2.9rem);
  line-height:1.12;
  letter-spacing:-.05em;
  color:var(--cat-text);
  margin-bottom:22px;
}

.card h3{
  color:#92400e;
  font-size:1.25rem;
  margin-top:28px;
  margin-bottom:12px;
}

.card p,
.problem-card p,
.video-card p,
.important-box p{
  color:#475569;
  font-size:1.04rem;
  margin-top:18px;
}

.objectives{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  margin-top:28px;
}

.objective{
  background:linear-gradient(180deg,#ffffff 0%,#fff7ed 100%);
  border:1px solid var(--cat-primary-border);
  border-radius:22px;
  padding:22px;
  color:#92400e;
  font-weight:800;
  line-height:1.45;
}

.problem-section{
  border-color:var(--cat-primary-border);
  background:linear-gradient(135deg,#fff7ed 0%,#ffffff 70%);
}

.problem-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:22px;
  margin-top:28px;
}

.problem-card{
  background:#ffffff;
  border:1px solid var(--cat-primary-border);
  border-radius:24px;
  padding:26px;
}

.problem-card h3{
  color:#92400e;
  font-size:1.08rem;
  line-height:1.35;
  margin-bottom:12px;
}

.important-box{
  background:linear-gradient(135deg,#fff7ed 0%,#ffffff 72%);
  border-color:var(--cat-primary-border);
}

.lesson-navigation{
  display:flex;
  justify-content:center;
  margin-top:40px;
}

.next-btn{
  min-height:62px;
  min-width:min(100%,560px);
  padding:20px 32px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:22px;
  background:linear-gradient(135deg,var(--cat-primary),#f59e0b);
  color:#ffffff;
  font-weight:800;
  text-decoration:none !important;
  box-shadow:0 18px 32px rgba(245,158,11,.25);
  transition:transform .2s ease,box-shadow .2s ease;
}

.next-btn:hover{
  transform:translateY(-2px);
}

@media(max-width:900px){
  .course-header,
  .course-header{
    padding-top:52px;
  }

  .problem-list,
  .objectives{
    grid-template-columns:1fr;
  }
}

@media(max-width:600px){
  .topbar{
    min-height:80px;
  }

  .back-btn{
    min-width:96px;
    min-height:48px;
    padding:14px 18px;
    border-radius:16px;
  }

  .course-header{
    padding-top:42px;
  }

  .lesson-card,
  .card,
  .problem-section,
    .important-box{
    border-radius:26px;
    margin-bottom:32px;
  }

  .lesson-top{
    align-items:flex-start;
  }
}

.solution-text{
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid #fde7c2;
  color:#475569;
}

@media(max-width:900px){
  .course-header{
    grid-template-columns:1fr;
  }
}
