:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --panel: #ffffff;
  --text: #222831;
  --muted: #65717f;
  --border: #d9dee6;
  --primary: #9a1f2f;
  --primary-dark: #761524;
  --accent: #1f7a5f;
  --warning: #9a6a1f;
  --shadow: 0 12px 34px rgba(31, 42, 54, 0.12);
  color-scheme: light;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

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

.container {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner,
.footer-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
}

.brand img {
  width: 200px;
  height: auto;
}

.site-nav-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.main-nav,
.user-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.main-nav {
  flex: 1;
  min-width: 0;
}

.main-nav > a,
.nav-menu summary,
.user-nav > a,
.user-nav button,
.user-name {
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border-radius: 4px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: currentColor;
  display: block;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.site-header.is-nav-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-nav-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.is-nav-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.user-nav form {
  display: inline;
}

.user-nav button {
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.nav-menu {
  position: relative;
}

.nav-menu summary {
  cursor: pointer;
  color: var(--primary);
  list-style: none;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.menu-panel {
  position: absolute;
  left: 0;
  top: 34px;
  width: min(680px, 92vw);
  max-height: 70vh;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.menu-panel a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  border-bottom: 1px solid #edf0f4;
  padding: 8px 0;
}

.menu-panel small {
  color: var(--accent);
}

.video-page-title {
  color: #333333;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 10px;
}

.hero {
  min-height: 430px;
  background:
    linear-gradient(90deg, rgba(16, 22, 31, 0.88), rgba(16, 22, 31, 0.58)),
    url("https://assets.devopen.club/slide-04.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
  display: flex;
  align-items: center;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.1;
  margin: 0 0 18px;
  letter-spacing: 0;
}

.hero p {
  font-size: 19px;
  max-width: 680px;
  margin: 0 0 28px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.form-card button,
.order-panel button {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  min-height: 42px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
}

.btn.secondary {
  background: #fff;
  color: var(--primary);
}

.section {
  padding: 68px 0;
}

.section.alt {
  background: var(--surface);
}

.section-head {
  text-align: center;
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: 30px;
  margin: 0 0 8px;
}

.section-head p {
  color: var(--muted);
  margin: 0 auto;
  max-width: 740px;
}

.notice {
  background: #edf8f4;
  border: 1px solid #cde7dd;
  color: #1f5f4d;
  padding: 16px 20px;
  margin-bottom: 44px;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.course-card {
  min-width: 0;
}

.course-cover {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e8ecf2;
  border: 1px solid var(--border);
}

.course-cover > img:not(.corner-masker) {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.corner-masker {
  position: absolute;
  left: 0;
  top: 0;
  width: 80px;
  z-index: 2;
}

.course-cover span {
  position: relative;
  z-index: 3;
  bottom: 34px;
  margin-left: 8px;
  display: inline-block;
  background: rgba(17, 24, 34, 0.78);
  color: #fff;
  padding: 2px 8px;
  font-size: 12px;
}

.course-card h3 {
  font-size: 17px;
  line-height: 1.35;
  min-height: 46px;
  margin: 14px 0 8px;
}

.course-meta {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 8px;
}

.course-meta strong {
  color: var(--accent);
  margin-right: 10px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  text-align: center;
}

.stat {
  padding: 28px 16px;
  border: 1px solid var(--border);
  background: #fff;
}

.stat strong {
  display: block;
  color: var(--primary);
  font-size: 30px;
}

.course-hero {
  background: #111821;
  color: #fff;
  min-height: 360px;
  display: flex;
  align-items: end;
  background-size: cover;
  background-position: center;
}

.course-hero-content {
  padding: 72px 0;
  background: linear-gradient(90deg, rgba(17, 24, 33, 0.92), rgba(17, 24, 33, 0.24));
  width: 100%;
}

.course-hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.15;
  max-width: 820px;
  margin: 0 0 14px;
}

.course-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.7fr);
  gap: 36px;
  align-items: start;
}

.side-panel,
.form-card,
.order-panel,
.video-panel {
  background: #fff;
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: 0 8px 24px rgba(31, 42, 54, 0.08);
}

.section-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
}

.section-list li + li {
  border-top: 1px solid var(--border);
}

.section-list a {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--text);
  padding: 14px 18px;
}

.section-list small {
  color: var(--accent);
  white-space: nowrap;
}

.form-shell {
  background: var(--surface);
  padding: 64px 0;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 48px;
  align-items: center;
}

.auth-grid {
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  max-width: 640px;
  text-align: center;
}

.auth-copy {
  margin: 0 auto;
  max-width: 560px;
}

.auth-copy h1 {
  margin-top: 0;
}

.auth-grid .form-card {
  margin: 0 auto;
  max-width: 560px;
  text-align: left;
  width: 100%;
}

.form-card {
  display: grid;
  gap: 16px;
}

.form-card h1 {
  margin: 0;
}

.form-error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: var(--accent);
  margin: 0;
  padding: 10px 12px;
}

.form-card label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.form-card input,
.form-card select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  padding: 8px 10px;
  font: inherit;
  border-radius: 4px;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.orders-table caption {
  text-align: left;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 16px;
}

.orders-table th,
.orders-table td {
  border-bottom: 1px solid var(--border);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #101820;
  display: grid;
  place-items: center;
  color: #fff;
  overflow: hidden;
}

.video-frame video {
  width: 100%;
  height: 100%;
}

.app-alert {
  border: 1px solid #f0d89c;
  color: #7b5517;
  background: #fff7df;
  padding: 16px;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #f2f3f5;
  color: var(--muted);
  font-size: 13px;
  padding: 30px 0;
}

.footer-brand {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.footer-brand img {
  width: 180px;
}

@media (max-width: 900px) {
  .container {
    width: min(100% - 28px, 1140px);
  }

  .header-inner {
    min-height: 64px;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
  }

  .header-top {
    min-height: 64px;
    width: 100%;
  }

  .brand img {
    width: min(200px, 58vw);
    max-height: 48px;
    object-fit: contain;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav-panel {
    display: none;
    width: 100%;
    padding: 6px 0 16px;
    border-top: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-header.is-nav-open .site-nav-panel {
    display: flex;
  }

  .main-nav,
  .user-nav {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    font-size: 16px;
  }

  .main-nav > a,
  .nav-menu summary,
  .user-nav > a,
  .user-nav button,
  .user-name {
    border-bottom: 1px solid #edf0f4;
    color: var(--text);
    display: block;
    padding: 12px 2px;
    text-align: left;
  }

  .auth-separator {
    display: none;
  }

  .menu-panel {
    position: static;
    width: 100%;
    max-height: min(56vh, 420px);
    grid-template-columns: 1fr;
    margin-top: 10px;
    box-shadow: none;
  }

  .course-grid,
  .stats,
  .course-detail-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 480px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-brand {
    justify-items: start;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .course-grid {
    gap: 22px;
  }

  .course-card h3 {
    min-height: 0;
  }

  .hero {
    min-height: 420px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .section {
    padding: 46px 0;
  }

  .section-list a {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .orders-table {
    display: block;
    font-size: 14px;
    overflow-x: auto;
    white-space: nowrap;
  }
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

header.navbar .navbar-brand {
  align-items: center;
  display: flex;
  height: 75px;
  padding-top: 0 !important;
}

header.navbar .navbar-brand img {
  height: auto;
  width: min(200px, 58vw) !important;
}

header.navbar .userinfo form {
  display: inline-flex !important;
  margin: 0;
}

header.navbar .userinfo .user-session-nav {
  align-items: center;
  display: flex !important;
  gap: 12px;
  height: 40px;
  min-height: 40px;
  white-space: nowrap;
}

header.navbar-default .navbar-nav.userinfo > li.user-session-nav > a.user-nav-link,
header.navbar-default .navbar-nav.userinfo > li.user-session-nav > a.user-nav-link:hover,
header.navbar-default .navbar-nav.userinfo > li.user-session-nav > a.user-nav-link:focus,
header.navbar-default .navbar-nav.userinfo > li.user-session-nav > a.user-nav-link:active,
header.navbar .userinfo .user-nav-name,
header.navbar .userinfo .logout-form button {
  align-items: center;
  background: transparent !important;
  border: 0;
  color: #777777;
  display: inline-flex !important;
  font: inherit;
  font-weight: 600;
  height: auto;
  line-height: 1.2;
  padding: 0 !important;
  text-decoration: none;
}

header.navbar .userinfo .user-session-nav .mainColor {
  align-items: center;
  display: inline-flex;
  line-height: 1.2;
}

header.navbar .userinfo .user-nav-name {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}

header.navbar .userinfo .logout-form button:hover,
header.navbar .userinfo .logout-form button:focus {
  color: #911826;
  outline: none;
}

.resource-link {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.resource-code {
  color: #777777;
  font-size: 13px;
}

.team .team-member {
  margin-bottom: 30px;
}

.team .team-member .overlay-wrapper2 {
  overflow: hidden;
}

.team img:not(.cornermasker) {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.team img.cornermasker {
  aspect-ratio: auto;
  height: auto;
  object-fit: contain;
  width: 80px !important;
  z-index: 2;
}

.course_label {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  left: 16px;
  right: 16px;
}

.course_label label {
  margin: 0;
  white-space: nowrap;
}

.course_list a {
  display: block;
  line-height: 1.6;
  overflow-wrap: anywhere;
  padding: 10px;
}

.section-duration {
  float: right;
  padding-right: 10px;
}

.video-actions {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.video-actions > .btn {
  margin-left: 0 !important;
  white-space: normal;
}

.video-actions .dropdown-menu {
  max-height: min(70vh, 520px);
  max-width: min(100vw - 32px, 720px);
  overflow-y: auto;
}

.video-actions .dropdown-menu > li > a {
  line-height: 1.5;
  white-space: normal;
}

#blog-item .blog > .tbBtnDiv:last-child {
  margin-bottom: clamp(48px, 5vw, 72px);
}

@media (min-width: 768px) and (max-width: 991px) {
  header.navbar-default .navbar-brand,
  header.navbar-default .navbar-brand:hover {
    padding-right: 14px;
  }

  header.navbar .navbar-brand img {
    width: 165px !important;
  }

  header.navbar-default .navbar-nav > li > a {
    font-size: 12px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .userinfo a {
    font-size: 12px;
  }
}

@media (max-width: 767px) {
  header.navbar {
    height: auto;
    min-height: 75px;
  }

  header.navbar > .container {
    width: calc(100% - 24px);
  }

  header.navbar .navbar-brand {
    max-width: calc(100% - 64px);
  }

  header.navbar .navbar-toggle {
    margin-right: 0;
  }

  header.navbar .navbar-collapse {
    margin-left: -12px;
    margin-right: -12px;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
    padding: 0 12px 12px;
  }

  header.navbar-default .navbar-nav > li > ul.dropdown-menu > li {
    float: none;
    width: 100%;
  }

  header.navbar-default .navbar-nav > li > ul.dropdown-menu a {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  header.navbar .userinfo,
  header.navbar .userinfo > li {
    float: none !important;
    width: 100%;
  }

  header.navbar .userinfo a {
    padding-left: 0 !important;
  }

  header.navbar .userinfo .user-session-nav {
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    min-height: 0;
    padding: 12px 0;
    white-space: nowrap;
  }

  header.navbar .userinfo .user-session-nav > a,
  header.navbar .userinfo .user-nav-name,
  header.navbar .userinfo .logout-form button {
    height: auto;
    line-height: 24px;
  }

  header.navbar .userinfo .user-nav-name {
    max-width: min(36vw, 160px);
  }

  .jumbotron-project .jumbotron-body {
    align-items: center;
    display: flex;
    min-height: 350px;
  }

  .basic_tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 28px !important;
    text-align: center !important;
  }

  .basic_tags > span {
    line-height: 1.3;
  }

  .basic_title {
    font-size: 28px !important;
    line-height: 1.35 !important;
  }

  .basic_info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    justify-content: center;
  }

  .basic_info > li {
    display: inline-flex;
    float: none;
    padding-right: 0;
  }

  .tbBtnDiv {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
  }

  .gotoPlayBtn,
  .taobaoBtn {
    line-height: 1.5;
    margin: 0 auto !important;
    max-width: 360px;
    text-align: center;
    white-space: normal;
    width: 100%;
  }

  .introP {
    font-size: 16px !important;
    line-height: 1.8 !important;
    padding-left: 0 !important;
  }

  .blog-detail {
    display: block;
  }

  .blog-detail li {
    display: block;
    white-space: normal;
  }

  .breadcrumb {
    background: transparent;
    padding: 10px 0;
  }

  .breadcrumb a,
  .breadcrumb span {
    font-size: 14px;
  }

  .course_list {
    padding-left: 0;
  }

  .course_list li {
    padding-left: 0;
  }

  .course_list .section-duration,
  .course_list .watchPreivew {
    display: inline-block;
    float: none;
    margin: 6px 8px 0 0;
    padding-right: 0;
  }

  .course_list .section-duration {
    color: #777777;
    font-size: 12px;
  }

  .video-actions {
    flex-direction: column;
    width: 100%;
  }

  .video-actions > .btn {
    text-align: center;
    width: 100%;
  }

  .video-actions.open .dropdown-menu {
    float: none;
    margin-top: 8px;
    position: static;
  }

  .video-actions .dropdown-menu {
    min-width: 0;
    width: 100%;
  }

  .video-actions .dropdown-menu > li > a {
    padding: 10px 12px;
  }

  .video-actions .dropdown-menu .section-duration,
  .video-actions .dropdown-menu .watchPreivew {
    display: block;
    float: none;
    margin: 4px 0 0 24px;
    padding-right: 0;
  }

  footer.navbar img[alt="DevOpen.Club Logo"] {
    float: none !important;
    margin: 12px auto 0;
  }

  footer.navbar span {
    float: none !important;
  }
}

@media (max-width: 420px) {
  .basic_title {
    font-size: 26px !important;
  }

  .team h4 {
    font-size: 14px;
    line-height: 1.5;
  }

  .team p {
    min-height: 0;
  }
}
