/* ========================================
   CSS Variables
   ======================================== */
:root {
  --bg-primary: #f0f0f0;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-elevated: #f1f5f9;
  --gold: #2563eb;
  --gold-light: #60a5fa;
  --gold-dark: #1d4ed8;
  --gradient-gold: linear-gradient(135deg, #2563eb, #3b82f6);
  --text-primary: #0f0f0f;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-color: #d4d4d4;
  --border-hover: #a0a0a0;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --navbar-h: 64px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: #ffffff;
  color: #000000;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(248, 250, 252, 0.85);
  transition: background var(--transition), box-shadow var(--transition), backdrop-filter var(--transition);
}

.navbar--solid {
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border-color);
}

.navbar-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 48px;
  height: var(--navbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 56px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  transition: opacity var(--transition);
}

.nav-logo:hover {
  opacity: 0.8;
}

.nav-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--gradient-gold);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}

.nav-logo-text {
  color: var(--text-primary);
}


.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  position: relative;
  padding: 6px 14px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
  transition: transform var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-links a.active {
  color: var(--text-primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-login-btn {
  padding: 7px 20px;
  border: 1px solid var(--border-color);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: all var(--transition);
}

.nav-login-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.nav-user {
  position: relative;
}

.nav-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient-gold);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform var(--transition);
}

.nav-avatar:hover {
  transform: scale(1.08);
}

.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all var(--transition);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.nav-user:hover .nav-user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-user-dropdown a {
  display: block;
  padding: 8px 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-user-dropdown a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.nav-user-info {
  padding: 8px 14px 6px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 4px;
}

.nav-user-name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-user-badge {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 8px;
  font-size: 0.7rem;
  background: var(--gradient-gold);
  border-radius: 100px;
  color: #fff;
}

.nav-user-logout {
  color: rgba(255, 255, 255, 0.4) !important;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   Hero
   ======================================== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.15);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-slogan {
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 900;
  letter-spacing: 0.15em;
  color: #fff;
  text-shadow: 0 4px 60px rgba(0, 0, 0, 0.5);
  line-height: 1.1;
  animation: heroFadeIn 1.5s ease-out;
}

.hero-slogan-img {
  filter: drop-shadow(0 2px 20px rgba(255,255,255,0.3)) drop-shadow(0 0 40px rgba(0,0,0,0.5));
  animation: heroFadeIn 1.5s ease-out;
}
.hero-footer-info {
  position: absolute;
  bottom: 48px;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 48px;
  animation: heroFadeIn 2s ease-out 0.5s both;
}

.hero-footer-info span {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  font-weight: 500;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.hero-scroll-hint span {
  display: block;
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.2);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.2; transform: scaleY(1); }
  50% { opacity: 0.6; transform: scaleY(1.5); }
}

/* ========================================
   Sections
   ======================================== */
.section {
  padding: 100px 0;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: 0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-top: -36px;
  margin-bottom: 48px;
  font-size: 1rem;
}

.section-more {
  text-align: center;
  margin-top: 40px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--gold);
  transition: all var(--transition);
}

.link-arrow:hover {
  gap: 10px;
  color: var(--gold-light);
}

/* ========================================
   Course List - Horizontal Row Layout
   ======================================== */
.course-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.course-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 20px;
  border-radius: var(--radius);
  transition: all var(--transition);
  background: transparent;
  text-decoration: none;
  color: inherit;
}

.course-row:hover {
  background: var(--bg-card);
}

.course-row-thumb {
  flex-shrink: 0;
  width: 240px;
  height: 140px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-secondary);
}

.course-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.course-row:hover .course-row-thumb img {
  transform: scale(1.04);
}

.course-row-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  color: var(--text-muted);
}

.course-row-body {
  flex: 1;
  min-width: 0;
}

.course-row-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-row-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-row-tags {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 100px;
}

.course-row-price {
  flex-shrink: 0;
  text-align: right;
}

.price-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
}

.price-free {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
  padding: 100px 0;
  text-align: center;
}

.cta-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.cta-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 36px;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 40px;
  background: var(--gradient-gold);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(245, 175, 25, 0.3);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border-color);
}

.footer-text {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========================================
   Courses Page
   ======================================== */
.courses-page {
  padding-top: calc(var(--navbar-h) + 40px);
  padding-bottom: 60px;
  min-height: 80vh;
}

.courses-block {
  margin-bottom: 56px;
}

.courses-block-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.course-list-horizontal {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-state {
  text-align: center;
  padding: 48px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.empty-state a {
  display: inline-block;
  margin-top: 16px;
}

.load-more-wrap {
  text-align: center;
  margin-top: 32px;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

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

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(245, 175, 25, 0.3);
}

.btn-secondary {
  background: transparent;
  color: #ffffff;
  border: 1px solid var(--border-hover);
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-sm {
  padding: 6px 16px;
  font-size: 0.82rem;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  border: 1px solid var(--border-hover);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ========================================
   Auth Pages (Login / Register)
   ======================================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--navbar-h) + 40px) 24px 60px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  transition: border-color var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--gold);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-error {
  font-size: 0.78rem;
  color: #ef4444;
  margin-top: 4px;
  display: none;
}

.auth-actions {
  margin-top: 28px;
}

.auth-actions .btn {
  width: 100%;
  padding: 13px;
  font-size: 1rem;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--gold);
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ========================================
   Profile Page
   ======================================== */
.profile-page {
  padding-top: calc(var(--navbar-h) + 40px);
  padding-bottom: 60px;
  min-height: 80vh;
}

.profile-header {
  text-align: center;
  margin-bottom: 40px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gradient-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin: 0 auto 16px;
}

.profile-name {
  font-size: 1.3rem;
  font-weight: 700;
}

.profile-phone {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

.profile-section {
  max-width: 800px;
  margin: 0 auto;
}

.profile-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

/* ========================================
   Course Detail Page
   ======================================== */
.course-detail-page {
  padding-top: calc(var(--navbar-h) + 40px);
  padding-bottom: 60px;
}

.course-detail-header {
  display: flex;
  gap: 40px;
  margin-bottom: 60px;
}

.course-detail-cover {
  flex-shrink: 0;
  width: 380px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.course-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-detail-title {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}

.course-detail-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
  flex: 1;
}

.course-detail-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}

.course-detail-meta .meta-item {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.course-detail-price-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.course-detail-price {
  font-size: 2rem;
  font-weight: 700;
}

.course-detail-price.free {
  color: var(--gold);
}

.course-detail-actions {
  display: flex;
  gap: 12px;
}

.course-detail-videos {
  max-width: 900px;
}

.course-detail-videos-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.video-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  cursor: pointer;
}

.video-item:hover {
  background: var(--bg-card);
}

.video-item.active {
  background: var(--bg-card);
}

.video-item-index {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.video-item.active .video-item-index {
  background: var(--gradient-gold);
  color: #fff;
}

.video-item-info {
  flex: 1;
  min-width: 0;
}

.video-item-title {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-item-duration {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.video-item-lock {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 2px 8px;
  border: 1px solid var(--border-color);
  border-radius: 100px;
}

.video-player-section {
  margin-bottom: 40px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-player-section video {
  width: 100%;
  height: 100%;
}

/* ========================================
   Admin Page
   ======================================== */
.admin-page {
  padding-top: calc(var(--navbar-h) + 40px);
  padding-bottom: 60px;
  min-height: 80vh;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.admin-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-color);
}

.admin-tab {
  padding: 10px 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font-sans);
}

.admin-tab:hover {
  color: #ffffff;
}

.admin-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.admin-table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  color: var(--text-secondary);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-actions {
  display: flex;
  gap: 8px;
}

.admin-btn {
  padding: 4px 12px;
  font-size: 0.78rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.admin-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.admin-btn-danger:hover {
  border-color: #ef4444;
  color: #ef4444;
}

/* ========================================
   Toast
   ======================================== */
.toast {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  animation: toastIn 0.3s ease-out;
  pointer-events: none;
}

.toast-success {
  background: rgba(34, 197, 94, 0.9);
  color: #fff;
}

.toast-error {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
}

.toast-info {
  background: var(--bg-card);
  color: #ffffff;
  border: 1px solid var(--border-color);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ========================================
   Features Grid (index)
   ======================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(245, 175, 25, 0.1);
  color: var(--gold);
  margin-bottom: 16px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   Scroll Reveal Animation
   ======================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* fadeUp utility */
.fade-up {
  animation: fadeUp 0.6s ease-out both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
  .course-detail-header {
    flex-direction: column;
  }

  .course-detail-cover {
    width: 100%;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --navbar-h: 56px;
  }

  
.nav-links {
    display: none;
    position: fixed;
    top: var(--navbar-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.96);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 999;
  }

  .nav-links a {
    font-size: 1.1rem;
    padding: 12px 24px;
  }

  .nav-hamburger {
    display: flex;
  }

  .body.nav-open {
    overflow: hidden;
  }

  body.nav-open {
    overflow: hidden;
  }

  .hero-slogan {
    font-size: clamp(3rem, 14vw, 6rem);
  }

  .hero-footer-info {
    gap: 24px;
    bottom: 36px;
  }

  .hero-footer-info span {
    font-size: 0.6rem;
    letter-spacing: 0.15em;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.4rem;
    margin-bottom: 32px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .course-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
  }

  .course-row-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .course-row-price {
    text-align: left;
    align-self: flex-start;
  }

  .cta-title {
    font-size: 1.5rem;
  }

  .course-detail-header {
    gap: 24px;
  }

  .course-detail-title {
    font-size: 1.4rem;
  }

  .course-detail-price-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .course-detail-meta {
    flex-wrap: wrap;
    gap: 12px;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .auth-card {
    padding: 28px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-slogan {
    font-size: clamp(2.5rem, 16vw, 4.5rem);
  }

  .course-row-title {
    font-size: 1rem;
  }

  .price-value {
    font-size: 1.1rem;
  }
}

/* ========================================
   Login Modal
   ======================================== */
.login-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.login-modal-overlay::before {
  content: "";
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245,175,25,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.login-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.login-modal {
  position: relative;
  width: 90%;
  max-width: 420px;
  background: rgba(20, 20, 28, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 215, 0, 0.1);
  border-radius: var(--radius-lg);
  padding: 48px 40px 40px;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(245, 175, 25, 0.04);
  overflow: hidden;
}
.login-modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(245,175,25,0.5) 20%, rgba(255,215,0,0.8) 50%, rgba(245,175,25,0.5) 80%, transparent);
}

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

.login-modal-close {
  position: absolute;
  top: 20px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255, 215, 0, 0.35);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.login-modal-close:hover {
  color: #ffd700;
  background: rgba(255, 215, 0, 0.1);
}

.login-modal-panel {
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-modal-title {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #f5af19, #ffd700, #f0b25a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-modal-subtitle {
  text-align: center;
  color: rgba(200, 190, 170, 0.65);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.login-modal-form {
  display: flex;
  flex-direction: column;
}
.login-modal-form .form-label {
  color: rgba(200, 190, 170, 0.7);
}
.login-modal-form .form-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 215, 0, 0.1);
  border-radius: var(--radius-sm);
  color: #fff;
  transition: all var(--transition);
}
.login-modal-form .form-input:focus {
  border-color: rgba(245, 175, 25, 0.5);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 2px rgba(245, 175, 25, 0.08);
}
.login-modal-form .form-input::placeholder {
  color: rgba(255, 255, 255, 0.22);
}

.login-modal-submit {
  margin-top: 8px;
  width: 100%;
  padding: 13px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  background: rgba(245, 175, 25, 0.1);
  border: 1px solid rgba(245, 175, 25, 0.35);
  color: #ffd700;
  border-radius: 100px;
  transition: all var(--transition);
}
.login-modal-submit:hover {
  background: rgba(245, 175, 25, 0.2);
  border-color: rgba(245, 175, 25, 0.6);
  box-shadow: 0 4px 24px rgba(245, 175, 25, 0.15);
}

.login-modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-modal-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.login-modal-switch a {
  color: #f5af19;
  transition: color var(--transition);
}

.login-modal-switch a:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

@media (max-width: 480px) {
  .login-modal {
    padding: 36px 24px 28px;
    width: 94%;
  }

  .login-modal-title {
    font-size: 1.4rem;
  }
}

/* Logo image style */
.nav-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

/* Hero Slogan Text - 白色文字版 */
.hero-slogan-text {
  font-size: 5rem;
  font-weight: 900;
  font-style: italic;
  color: #ffffff;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  text-align: center;
  margin: 0 auto;
  text-shadow: 0 4px 40px rgba(0,0,0,0.6), 0 0 80px rgba(0,0,0,0.3);
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'STHeiti', sans-serif;
  user-select: none;
}

@media (max-width: 768px) {
  .hero-slogan-text {
    font-size: 2.8rem;
    letter-spacing: 0.3em;
    text-indent: 0.3em;
  }
}

/* Hero Sound Toggle Button */
.hero-sound-btn {
  position: absolute;
  bottom: 60px;
  right: 30px;
  z-index: 20;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.3);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}
.hero-sound-btn:hover {
  background: rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.8);
  transform: scale(1.1);
}


/* ========================================
   Page Hero: Homepage transparent navbar
   ======================================== */
.page-hero .navbar {
  background: transparent;
}
.page-hero .navbar--solid {
  background: transparent;
  box-shadow: none;
}
.page-hero .nav-logo-text {
  color: #ffffff;
}
.page-hero .nav-links {
  gap: 32px;
}
.page-hero .nav-links a {
  color: rgba(255,255,255,0.85);
  padding: 6px 4px;
}
.page-hero .nav-links a::after {
  background: rgba(255,255,255,0.9);
}
.page-hero .nav-links a:hover,
.page-hero .nav-links a.active {
  color: #ffffff;
}
.page-hero .nav-login-btn {
  border: none;
  color: rgba(255,255,255,0.85);
}
.page-hero .nav-login-btn:hover {
  opacity: 0.8;
  color: #ffffff;
}

/* Homepage navbar: top-left spacious layout */
.page-hero .navbar-inner {
  max-width: 100%;
  padding: 0 48px;
}
.page-hero .nav-left {
  gap: 56px;
}
.page-hero .nav-links {
  gap: 36px;
}
.page-hero .nav-logo {
  gap: 12px;
}

/* ========================================
   Sub-pages: White background + black text
   ======================================== */
body:not(.page-hero) {
  background: #ffffff;
  color: #333333;
}
body:not(.page-hero) .navbar {
  background: #ffffff;
}
body:not(.page-hero) .navbar--solid {
  background: #ffffff;
  box-shadow: 0 1px 0 #d4d4d4;
}
body:not(.page-hero) main,
body:not(.page-hero) .courses-page,
body:not(.page-hero) .materials-page,
body:not(.page-hero) .works-page,
body:not(.page-hero) .contact-page,
body:not(.page-hero) .profile-page {
  background: #ffffff;
  color: #333333;
}

/* Sub-page headings and text */
body:not(.page-hero) h1,
body:not(.page-hero) h2,
body:not(.page-hero) h3,
body:not(.page-hero) h4 {
  color: #000000;
}
body:not(.page-hero) p,
body:not(.page-hero) span,
body:not(.page-hero) label {
  color: #555555;
}
body:not(.page-hero) a {
  color: #60a5fa;
}

/* Sub-page cards */
body:not(.page-hero) .card,
body:not(.page-hero) .course-card,
body:not(.page-hero) .material-card {
  background: #ffffff;
  border-color: #e5e5e5;
}

/* Sub-page form inputs */
body:not(.page-hero) input,
body:not(.page-hero) textarea,
body:not(.page-hero) select {
  background: #ffffff;
  border-color: #e5e5e5;
  color: #000000;
}

/* Sub-page footer area */
body:not(.page-hero) footer {
  background: #ffffff;
  border-color: #e5e5e5;
}

/* Fix: nav links should NOT be blue */
body:not(.page-hero) .nav-links a {
  color: var(--text-secondary);
}
body:not(.page-hero) .nav-links a:hover,
body:not(.page-hero) .nav-links a.active {
  color: var(--text-primary);
}
body:not(.page-hero) .nav-logo-text {
  color: var(--text-primary);
}
body:not(.page-hero) .nav-login-btn {
  color: var(--text-primary);
}

/* Fix: card backgrounds dark, text readable */
body:not(.page-hero) .card,
body:not(.page-hero) .feature-card {
  background: #ffffff !important;
}

/* Fix: text inside cards on dark pages */
body:not(.page-hero) .card *,
body:not(.page-hero) .feature-card {
  color: #333333;
}

/* Card titles */
body:not(.page-hero) .card h3,
body:not(.page-hero) .card h4,
body:not(.page-hero) .feature-card h3 {
  color: #000000;
}

/* Card descriptions */
body:not(.page-hero) .card p,
body:not(.page-hero) .feature-card p {
  color: #666666;
}

/* Fix: page title area text */
body:not(.page-hero) .page-header h1,
body:not(.page-hero) .section-title {
  color: #000000 !important;
}
body:not(.page-hero) .page-header p {
  color: #666666 !important;
}


/* Contact section titles */
body:not(.page-hero) .contact-section-title {
  color: #000000 !important;
  border-color: #e5e5e5 !important;
}

/* Dropdown avatar styles */
.nav-dropdown-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.nav-dropdown-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}
.nav-user-info-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Dark page dropdown fix - full styling */
body:not(.page-hero) .nav-user-dropdown {
  background: #ffffff;
  border-color: #e5e5e5;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}
body:not(.page-hero) .nav-user-dropdown a {
  color: #333333;
}
body:not(.page-hero) .nav-user-dropdown a:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #ffffff;
}
body:not(.page-hero) .nav-user-info {
  border-color: #e5e5e5;
}
body:not(.page-hero) .nav-user-name {
  color: #000000;
}
body:not(.page-hero) .nav-user-badge {
  color: #666666;
}
body:not(.page-hero) .nav-user-logout {
  color: #ef4444;
}

body:not(.page-hero) .nav-dropdown-initial {
  background: #2563eb;
}

/* Logo sizing */
.nav-logo-img {
  height: 28px;
  width: auto;
}

/* Homepage: invert logo to white for dark video background */
/* Logo: no filter needed */

/* Works page: card text readability on dark pages */
body:not(.page-hero) .video-card-body {
  background: #ffffff !important;
}
body:not(.page-hero) .video-card-title {
  color: #000000 !important;
}
body:not(.page-hero) .video-card-desc {
  color: #666666 !important;
}
body:not(.page-hero) .video-card-tag {
  background: #f0f0f0 !important;
  color: #333333 !important;
}

/* ========================================
   Mobile Fixes (2026-08-22)
   ======================================== */
@media (max-width: 768px) {
  /* 首页：手机端导航栏内边距 */
  .page-hero .navbar-inner {
    padding: 0 16px;
  }

  /* 首页：汉堡菜单按钮在透明导航上可见 */
  .page-hero .nav-hamburger span {
    background: #ffffff;
  }

  /* 手机端菜单展开：所有页面链接白色（菜单背景深色） */
  .nav-links a,
  body:not(.page-hero) .nav-links a {
    color: rgba(255, 255, 255, 0.85) !important;
  }
  .nav-links a:hover,
  .nav-links a.active,
  body:not(.page-hero) .nav-links a:hover,
  body:not(.page-hero) .nav-links a.active {
    color: #ffffff !important;
  }

  /* 首页hero文字防止溢出 */
  .page-hero .hero-slogan-text {
    font-size: 2.2rem;
    letter-spacing: 0.25em;
    text-indent: 0.25em;
  }

  /* 声音按钮手机端位置 */
  .hero-sound-btn {
    bottom: 70px;
    right: 16px;
    width: 40px;
    height: 40px;
  }

  /* 底部信息手机端间距 */
  .hero-footer-info {
    gap: 16px;
    bottom: 28px;
  }
  .hero-footer-info span {
    font-size: 0.55rem;
    letter-spacing: 0.12em;
  }

  /* 登录按钮手机端 */
  .page-hero .nav-login-btn {
    font-size: 0.8rem;
    padding: 6px 14px;
  }

}

@media (max-width: 480px) {
  .page-hero .hero-slogan-text {
    font-size: 1.8rem;
    letter-spacing: 0.18em;
    text-indent: 0.18em;
  }
  .page-hero .navbar-inner {
    padding: 0 12px;
  }
}

/* ========================================
   WeChat/Mobile Video Fix (2026-08-22)
   ======================================== */
@media (max-width: 768px) {
  /* 隐藏微信/QQ浏览器的视频大播放按钮 */
  .hero-video::-webkit-media-controls-overlay-play-button {
    display: none !important;
  }
  .hero-video::-webkit-media-controls {
    display: none !important;
  }
  /* X5内核 */
  .hero-video {
    -webkit-appearance: none;
    appearance: none;
  }
  /* logo手机端适当放大 */
  .nav-logo-img {
    height: 32px !important;
    width: auto !important;
  }
}

/* ========================================
   Course Grid & Cards (profile page)
   ======================================== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding-bottom: 40px;
}

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.course-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-elevated);
  overflow: hidden;
}

.course-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 3px 10px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 0.72rem;
  border-radius: 4px;
}

.course-info {
  padding: 16px;
}

.course-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.course-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.page-header {
  padding: 20px 0 32px;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.72rem;
  border-radius: 100px;
  font-weight: 600;
}

.tag-success {
  background: rgba(16,185,129,0.1);
  color: #059669;
}

.placeholder-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e293b, #334155);
}

@media (max-width: 768px) {
  .course-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .page-title { font-size: 1.4rem; }
}

/* ========================================
   Auth Container (login/register pages)
   ======================================== */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.auth-link {
  text-align: center;
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.auth-link a {
  color: var(--gold);
  font-weight: 600;
}

.auth-link a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .auth-container {
    padding: 16px;
  }
}


/* Mobile Overflow Fix (2026-08-22) */
html, body {
  overflow-x: hidden;
  width: 100%;
}
@media (max-width: 768px) {
  .auth-container {
    width: 100%;
    max-width: 100vw;
    padding: calc(var(--navbar-h) + 24px) 16px 40px !important;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .auth-card {
    width: 100%;
    max-width: 100% !important;
    margin: 0 auto;
    padding: 28px 20px !important;
    box-sizing: border-box;
  }
  .auth-card .form-input,
  .auth-card .btn,
  .auth-card button {
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 768px) {
  .auth-card form,
  .auth-card .login-modal-form { width: 100%; max-width: 100%; box-sizing: border-box; }
  .auth-card .btn,
  .auth-card button[type=submit] {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }
}

/* ========================================
   Mobile Nav Fix (2026-08-24)
   ======================================== */
@media (max-width: 768px) {
  /* Ensure hamburger is visible */
  .nav-hamburger {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 8px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
  }
  .nav-hamburger span {
    display: block !important;
    width: 22px;
    height: 2px;
    background: #555;
    border-radius: 2px;
  }
  /* Hero page: white hamburger on dark background */
  .page-hero .nav-hamburger {
    border-color: rgba(255,255,255,0.4);
  }
  .page-hero .nav-hamburger span {
    background: #ffffff;
  }
  /* Nav right: prevent overflow */
  .nav-right {
    gap: 8px;
    flex-shrink: 0;
  }
  /* Login button smaller on mobile */
  .nav-login-btn {
    padding: 5px 10px;
    font-size: 0.75rem;
  }
  .page-hero .nav-login-btn {
    font-size: 0.7rem;
    padding: 4px 8px;
  }
  /* Nav inner padding */
  .navbar-inner {
    padding: 0 12px;
  }
  .page-hero .navbar-inner {
    padding: 0 12px;
  }
  /* Nav left gap */
  .nav-left {
    gap: 12px;
  }
  .page-hero .nav-left {
    gap: 12px;
  }
}

/* Hamburger as 3rd flex child of navbar-inner */
@media (max-width: 768px) {
  .navbar-inner {
    justify-content: space-between !important;
    align-items: center;
  }
  .nav-hamburger {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 3px !important;
    padding: 6px 8px !important;
    border: 1px solid rgba(0,0,0,0.15) !important;
    border-radius: 6px !important;
    background: transparent !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    margin-left: 4px !important;
  }
  .nav-hamburger span {
    display: block !important;
    width: 22px !important;
    height: 2px !important;
    background: #555 !important;
    border-radius: 2px !important;
  }
  .page-hero .nav-hamburger {
    border-color: rgba(255,255,255,0.4) !important;
  }
  .page-hero .nav-hamburger span {
    background: #ffffff !important;
  }
}

/* SVG hamburger styling */
@media (max-width: 768px) {
  .nav-hamburger svg {
    display: block;
  }
  .page-hero .nav-hamburger svg {
    color: #ffffff;
  }
  body:not(.page-hero) .nav-hamburger svg {
    color: #333333;
  }
  .nav-hamburger {
    background: rgba(0,0,0,0.05) !important;
  }
  .page-hero .nav-hamburger {
    background: rgba(255,255,255,0.1) !important;
  }
}

/* GRID LAYOUT: force 3-column navbar on mobile */
@media (max-width: 768px) {
  .navbar-inner {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    align-items: center !important;
    justify-content: unset !important;
    padding: 0 12px !important;
  }
  .nav-left {
    justify-self: start !important;
  }
  .nav-right {
    justify-self: center !important;
  }
  .nav-hamburger {
    justify-self: end !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px !important;
    background: rgba(0,0,0,0.06) !important;
    border-radius: 6px !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
  }
  .nav-hamburger svg {
    width: 24px !important;
    height: 24px !important;
    color: #333 !important;
  }
  .page-hero .nav-hamburger {
    background: rgba(255,255,255,0.15) !important;
    border-color: rgba(255,255,255,0.3) !important;
  }
  .page-hero .nav-hamburger svg {
    color: #ffffff !important;
  }
}

/* Make hamburger MUCH more visible */
@media (max-width: 768px) {
  .nav-hamburger {
    padding: 10px 12px !important;
    background: rgba(0,0,0,0.08) !important;
    border: 1.5px solid rgba(0,0,0,0.15) !important;
    border-radius: 8px !important;
  }
  .nav-hamburger svg {
    width: 26px !important;
    height: 26px !important;
    stroke-width: 3 !important;
    color: #222 !important;
  }
  .page-hero .nav-hamburger {
    background: rgba(255,255,255,0.2) !important;
    border-color: rgba(255,255,255,0.4) !important;
  }
  .page-hero .nav-hamburger svg {
    color: #ffffff !important;
    stroke-width: 3 !important;
  }
}

/* Show nav-links when menu is open */
@media (max-width: 768px) {
  body.nav-open .nav-links {
    display: flex !important;
  }
}

/* Fix: reveal-on-scroll always visible on mobile (IntersectionObserver unreliable on mobile) */
@media (max-width: 768px) {
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
}
