/* Chessnut - Common Styles */

/* ===== RESET & BASIC STYLES ===== */
* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Only prevent horizontal scrolling */
}

/* ===== LAYOUT CONTAINERS ===== */
.main-content {
  background: white;
  min-height: 100vh;
}

.main-view {
  background: white;
  min-height: 100vh;
  padding: 0;
}

.welcome-section {
  min-height: 100vh;
  background: white;
  padding: 0;
  padding-top: 0;
  overflow-x: hidden;
}

/* Scroll Container - No Snap */
.scroll-container {
  overflow-y: auto;
  height: 100vh;
  scroll-behavior: smooth;
}

.scroll-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
}

/* Individual Section Styling */
.hero-section {
  background: white;
}

/* Welcome Banner Styles */
.welcome-banner {
  position: relative;
  width: 100%;
  height: 656px; /* 600px + 56px navbar height */
  overflow: hidden;
  background-image: url("/img/homepage chessnut.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  margin-top: -56px; /* Pull up to start at navbar edge */
}

.welcome-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.4) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 2rem;
  padding-top: calc(2rem + 56px); /* Extra padding to account for navbar */
  padding-bottom: 3rem;
  text-align: center;
}

.welcome-overlay h1 {
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  font-weight: 700;
}

.welcome-overlay p {
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7);
  font-weight: 500;
  max-width: 800px;
}

/* Chess Pieces Showcase */
.chess-pieces-showcase {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2rem 1rem;
  min-height: 300px;
}

.chess-piece-img {
  max-width: 150px;
  height: auto;
  margin-bottom: 1rem;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.chess-piece-img:hover {
  transform: scale(1.1) rotate(5deg);
}

/* Achievement medal images */
.achievement-medal-img {
  max-width: 50px;
  height: auto;
}

/* Chessnut logo inline with title */
.chessnut-logo-inline {
  max-width: 180px;
  height: auto;
  flex-shrink: 0;
}

/* Mobile logo adjustment */
@media (max-width: 767.98px) {
  .chessnut-logo-inline {
    max-width: 80px;
  }

  .hero-section .display-4 {
    font-size: 1.75rem;
  }
}

/* Benefit Card Images */
.benefit-card img {
  max-width: 150px;
  height: auto;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.benefit-card:hover img {
  transform: scale(1.05);
}

@media (min-width: 768px) {
  .hero-section .container-fluid {
    padding-top: 100px !important;
  }
}

.benefits-section {
  background: #f8f9fa;
}

.gallery-section {
  background: white;
}

/* ===== INSTRUCTOR SHOWCASE STYLES ===== */
.instructor-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
}

.instructor-image {
  position: relative;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.instructor-photo {
  width: 100%;
  height: auto;
  border-radius: 20px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  object-fit: cover;
  aspect-ratio: 3/4;
}

.instructor-photo:hover {
  transform: scale(1.02);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
}

.instructor-name {
  margin-top: 1.5rem;
  text-align: center;
  color: white;
}

.instructor-name span {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.instructor-name small {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.welcome-content {
  padding: 2rem 0;
}

/* Benefit Cards */
.benefit-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid #e0e0e0;
}

.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.benefit-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
}

.benefit-card p,
.benefit-card ul {
  font-size: 0.95rem;
  line-height: 1.6;
}

.benefit-card ul {
  padding-left: 1.2rem;
}

/* Stats Section */
.stats-section {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 2rem 1.5rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.stats-section:hover {
  background: rgba(255, 255, 255, 0.15);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

/* Quality Highlights */
.quality-highlights {
  margin: 0;
}

.highlight-item {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.highlight-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.highlight-icon {
  font-size: 1.5rem;
  margin-right: 1rem;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.highlight-item span:last-child {
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.95);
}

/* Welcome Actions */
.welcome-actions {
  margin-top: 2rem;
}

.welcome-actions .btn {
  transition: all 0.3s ease;
  border-width: 2px;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 50px;
}

.welcome-actions .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.welcome-actions .btn-light:hover {
  background: #f8f9fa;
  color: #667eea;
}

.welcome-actions .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #667eea;
}

/* ===== END INSTRUCTOR SHOWCASE STYLES ===== */

.admin-dashboard {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding-top: 100px;
  padding-bottom: 40px;
}

.page-title {
  text-align: center;
  margin-bottom: 2rem;
  padding-top: 2rem;
}

/* ===== NAVIGATION ===== */
.navbar {
  height: 56px;
  min-height: 56px;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.navbar-logo {
  height: 40px;
  width: auto;
}

.navbar-logo-with-text {
  height: 40px;
  width: auto;
  margin-right: 8px;
}

/* Navbar button styling for consistent sizing */
.navbar .btn {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

/* Reserve minimal space for navbar content */
#navbar-content {
  min-height: 38px;
  display: flex;
  align-items: center;
}

/* Navbar Score Container - Match btn-sm btn-outline-dark style */
.navbar .score-container {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  background: transparent;
  border-radius: 0.25rem;
  border: 1px solid #212529;
  color: #212529;
  transition: all 0.15s ease-in-out;
  line-height: 1.5;
}

.navbar .score-container:hover {
  background-color: #212529;
  border-color: #212529;
}

.navbar .score-container:hover .score-label,
.navbar .score-container:hover .score-value {
  color: #fff;
}

.navbar .score-container .score-label {
  font-size: 0.875rem;
  line-height: 1;
}

.navbar .score-container .score-value {
  font-size: 0.875rem;
  font-weight: bold;
  color: #212529;
  font-family: "Arial", sans-serif;
  min-width: auto;
  text-align: center;
}

/* Mobile navbar adjustments */
@media (max-width: 575.98px) {
  .navbar .btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .navbar .d-flex {
    gap: 0.5rem !important;
  }
}

@media (max-width: 480px) {
  .navbar .btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
  }

  .navbar .d-flex {
    gap: 0.25rem !important;
  }
}

/* Admin navbar specific adjustments */
@media (max-width: 991.98px) {
  .navbar-brand {
    font-size: 1.3rem;
  }
}

@media (max-width: 767.98px) {
  .navbar-brand {
    font-size: 1.2rem;
  }
}

@media (max-width: 575.98px) {
  .navbar-brand {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .navbar-brand {
    font-size: 1rem;
  }
}

/* Fix dropdown positioning in fixed navbar */
.navbar .dropdown-menu {
  position: absolute;
  z-index: 1021;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.navbar .dropdown-toggle::after {
  margin-left: 0.5rem;
}

/* ===== CARDS ===== */
.admin-card,
.lesson-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.lesson-card {
  padding: 2rem;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  cursor: pointer;
  width: 100%;
}

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

/* ===== LESSON STYLES ===== */
.lesson-card .lesson-play-btn,
.lesson-grid .lesson-play-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 25px;
  padding: 0.75rem 2rem;
  color: white;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 0.8rem;
}

.lesson-card .lesson-play-btn:hover,
.lesson-grid .lesson-play-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.lesson-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.lesson-description {
  color: #7f8c8d;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.lesson-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.lesson-item .completion-badge {
  font-size: 0.7rem;
  margin-left: 0.2rem;
  line-height: 1;
  vertical-align: middle;
  display: inline;
}

.completion-status {
  text-align: right;
}

.lesson-completed {
  border-left: 4px solid #28a745;
  background-color: #f8fff9;
}

.lesson-completed .lesson-play-btn {
  border-color: #28a745;
  color: #28a745;
}

.lesson-completed .lesson-play-btn:hover {
  background-color: #28a745;
  color: white;
}

.lesson-category {
  margin-bottom: 0.5rem;
  padding: 0.25rem 0;
}

.lesson-category small {
  font-weight: 500;
}

/* ===== GRIDS ===== */
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.lesson-grid-empty {
  grid-column: 1 / -1;
}

/* ===== VISIBILITY HELPERS ===== */
.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.alert-hidden {
  display: none !important;
}

/* Toast notification container */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  max-width: 400px;
}

@media (max-width: 575.98px) {
  .toast-container {
    top: 70px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

/* ===== MODALS ===== */
.modal-xl {
  max-width: 95vw;
  max-height: 95vh;
  margin: 10px auto;
}

.modal-xl .modal-content {
  border-radius: 15px;
  height: auto;
  max-height: 90vh;
}

.modal-xl .modal-body {
  padding: 30px;
  overflow-y: auto;
  max-height: calc(90vh - 120px);
}

/* ===== FORMS ===== */
.pgn-code-display {
  max-height: 400px;
  overflow-y: auto;
}

/* ===== ALERTS & MESSAGES ===== */
.error-message {
  background: #ff4757;
  color: white;
  padding: 15px;
  border-radius: 8px;
  margin: 10px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-weight: 500;
  text-align: center;
  min-width: 300px;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large screens */
@media (min-width: 1200px) {
  .stat-number {
    font-size: 3rem;
  }
}

/* Tablet and below */
@media (max-width: 991.98px) {
  .admin-dashboard {
    padding-top: 80px;
  }

  .main-content {
    padding-top: 70px;
  }

  .modal-xl {
    max-width: 98vw;
    margin: 5px auto;
  }

  .modal-xl .modal-body {
    padding: 20px;
  }

  /* Instructor showcase tablet styles */
  .instructor-image {
    max-width: 300px;
    margin-bottom: 2rem;
  }

  .instructor-name span {
    font-size: 1.3rem;
  }

  .instructor-name small {
    font-size: 0.9rem;
  }

  .stats-section {
    padding: 1.5rem 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .highlight-item {
    padding: 1rem 1.25rem;
  }
}

@media (max-width: 767.98px) {
  .admin-dashboard {
    padding-top: 70px;
  }

  .main-content {
    padding-top: 60px;
  }

  .welcome-section {
    padding-top: calc(60px + 1.5rem);
  }

  /* Welcome Banner Mobile */
  .welcome-banner {
    height: 356px; /* 300px + 56px navbar height */
    margin-top: -56px; /* Pull up to start at navbar edge */
  }

  .welcome-overlay h1 {
    font-size: 1.75rem;
  }

  .welcome-overlay p {
    font-size: 1rem;
  }

  .lesson-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  /* Mobile chess pieces */
  .chess-pieces-showcase {
    padding: 1rem 0.5rem;
    gap: 0.5rem;
    min-height: 200px;
  }

  .chess-piece-img {
    max-width: 80px;
  }

  .benefit-card img {
    max-width: 100px;
  }

  .modal-xl .modal-body {
    padding: 15px;
    max-height: calc(90vh - 100px);
  }

  .welcome-section {
    padding: 0;
  }

  .welcome-section h1 {
    font-size: 2rem;
  }

  /* Disable scroll snap on tablet for better usability */
  .scroll-container {
    scroll-snap-type: none;
    overflow-y: auto;
  }

  .scroll-section {
    min-height: auto;
    padding: 3rem 0;
  }

  .benefit-card h4 {
    font-size: 1.05rem;
  }

  .lesson-card {
    padding: 1.5rem;
  }

  .lesson-title {
    font-size: 1.3rem;
  }

  /* Mobile instructor showcase */
  .welcome-content {
    padding: 1rem 0;
  }

  .instructor-image {
    max-width: 250px;
    margin-bottom: 1.5rem;
  }

  .instructor-name span {
    font-size: 1.2rem;
    letter-spacing: 1px;
  }

  .instructor-name small {
    font-size: 0.85rem;
  }

  .stats-section {
    padding: 1.25rem 1rem;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  .highlight-item {
    padding: 0.875rem 1rem;
    margin-bottom: 0.5rem;
  }

  .highlight-icon {
    font-size: 1.25rem;
    margin-right: 0.75rem;
  }

  .highlight-item span:last-child {
    font-size: 0.9rem;
  }
}

@media (max-width: 575.98px) {
  .admin-dashboard {
    padding-top: 65px;
  }

  .main-content {
    padding-top: 56px;
  }

  .welcome-section {
    padding-top: calc(56px + 1rem);
  }

  /* Welcome Banner Small Mobile */
  .welcome-banner {
    height: 306px; /* 250px + 56px navbar height */
    margin-top: -56px; /* Pull up to start at navbar edge */
  }

  .welcome-overlay {
    padding: 1rem;
  }

  .welcome-overlay h1 {
    font-size: 1.5rem;
  }

  .welcome-overlay p {
    font-size: 0.9rem;
  }

  /* Small mobile chess pieces */
  .chess-pieces-showcase {
    padding: 0.5rem;
    gap: 0.25rem;
    min-height: 150px;
  }

  .chess-piece-img {
    max-width: 60px;
  }

  .benefit-card img {
    max-width: 80px;
  }

  .admin-card,
  .lesson-card {
    padding: 15px;
    margin-bottom: 15px;
  }

  .page-title {
    padding-top: 1rem;
    padding-bottom: 0.5rem;
  }

  .page-title h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
  }

  .page-title .lead {
    font-size: 1rem;
  }

  .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .modal-xl {
    max-width: 100vw;
    margin: 0;
  }

  .modal-xl .modal-content {
    border-radius: 0;
  }

  .modal-xl .modal-body {
    padding: 10px;
  }

  .navbar-brand {
    font-size: 1.2rem;
  }

  .welcome-section h1 {
    font-size: 1.75rem;
  }

  .welcome-section .lead {
    font-size: 1rem;
  }

  .lesson-description {
    font-size: 0.9rem;
  }

  /* Small mobile instructor showcase */
  .instructor-image {
    max-width: 200px;
    margin-bottom: 1rem;
  }

  .instructor-name {
    margin-top: 1rem;
  }

  .instructor-name span {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
  }

  .instructor-name small {
    font-size: 0.8rem;
  }

  .stats-section {
    padding: 1rem 0.75rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .highlight-item {
    padding: 0.75rem 1rem;
    flex-direction: row;
    text-align: left;
  }

  .highlight-icon {
    font-size: 1.1rem;
    margin-right: 0.5rem;
  }

  .highlight-item span:last-child {
    font-size: 0.85rem;
  }

  .welcome-actions {
    margin-top: 1.5rem;
  }

  .welcome-actions .btn {
    width: 100%;
    margin-bottom: 0.75rem;
    padding: 0.625rem 1.5rem;
    font-size: 0.95rem;
  }

  .welcome-actions .me-3 {
    margin-right: 0 !important;
  }
}

/* Very small screens */
@media (max-width: 400px) {
  .instructor-image {
    max-width: 180px;
  }

  .instructor-name span {
    font-size: 1rem;
  }

  .instructor-name small {
    font-size: 0.75rem;
  }

  .stat-number {
    font-size: 1.25rem;
  }

  .highlight-item span:last-child {
    font-size: 0.8rem;
  }

  /* Welcome section mobile adjustments */
  .scroll-section {
    min-height: auto;
    padding: 2rem 0;
  }

  .benefit-card {
    margin-bottom: 1rem;
  }

  .benefit-card h4 {
    font-size: 1rem;
  }

  .benefit-card p,
  .benefit-card ul {
    font-size: 0.85rem;
  }

  .gallery-img {
    height: 150px;
  }
}

/* ===== LESSONS TREE STYLES ===== */

.lessons-tree-container {
  padding: 0;
  max-width: 100%;
}

.category-tree,
.subcategories,
.lessons-list {
  list-style: none;
  padding-left: 0;
}

.subcategories {
  margin-left: 0.8rem;
  margin-top: 0.3rem;
}

.lessons-list {
  margin-left: 0.6rem;
  margin-top: 0.3rem;
}

.category-node {
  margin-bottom: 0.4rem;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  border-left: 3px solid rgba(255, 255, 255, 0.4);
  margin-bottom: 0.3rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
}

.category-header:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(2px);
}

.lesson-count {
  margin-left: auto;
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.category-icon {
  font-size: 0.85rem;
}

.category-name {
  font-weight: 600;
  color: white;
  font-size: 0.85rem;
}

.lesson-item {
  margin-bottom: 0.35rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.lesson-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.15);
}

.lesson-item.lesson-completed {
  background: rgba(40, 167, 69, 0.2);
  border-color: rgba(40, 167, 69, 0.5);
}

.lesson-item .lesson-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  color: white;
}

.lesson-item .lesson-icon {
  font-size: 0.65rem;
  line-height: 1;
  vertical-align: middle;
}

.lesson-item .lesson-title {
  flex: 1;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1;
  margin: 0;
  padding: 0;
  vertical-align: middle;
}

.lesson-item .lesson-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.empty-tree {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin: 1rem 0;
  padding: 2rem 1rem;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  text-align: center;
  color: white;
}

.empty-icon {
  opacity: 0.5;
  font-size: 2rem;
}

.uncategorized-section {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  margin-top: 1rem;
}

.uncategorized-title {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.no-lessons-message {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin: 1rem 0;
  padding: 2rem 1rem;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  text-align: center;
  color: white;
}

.no-lessons-message .empty-icon {
  opacity: 0.5;
}

/* Lesson play button styling in sidebar */
.lesson-item .lesson-play-btn {
  padding: 0.1rem 0.3rem;
  font-size: 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #667eea;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
  vertical-align: middle;
}

.lesson-item .lesson-play-btn:hover {
  background: white !important;
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lesson-item.lesson-completed .lesson-play-btn {
  background: rgba(40, 167, 69, 0.2) !important;
  border-color: rgba(40, 167, 69, 0.5) !important;
  color: #28a745 !important;
}

.lesson-item.lesson-completed .lesson-play-btn:hover {
  background: rgba(40, 167, 69, 0.3) !important;
}

/* Responsive adjustments for lessons tree */
@media (max-width: 767.98px) {
  .lessons-tree-container {
    padding: 0;
  }

  .subcategories {
    margin-left: 0.75rem;
  }

  .lessons-list {
    margin-left: 0.5rem;
  }

  .category-header {
    padding: 0.5rem 0.6rem;
    flex-wrap: wrap;
  }

  .lesson-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .lesson-actions {
    align-self: flex-end;
    width: 100%;
  }

  .lesson-play-btn {
    width: 100%;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
  }

  .lesson-count {
    margin-left: 0.5rem;
    margin-top: 0.25rem;
  }
}

/* ===== COLLAPSIBLE CATEGORIES ===== */

.category-header {
  user-select: none;
}

.collapsible-content {
  overflow: hidden;
  transition:
    max-height 0.3s ease-out,
    opacity 0.2s ease-out;
  max-height: 100000px;
  opacity: 1;
}

.category-node.collapsed .collapsible-content {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}

.admin-lessons-table .btn-group {
  gap: 0.25rem;
}

.pagination .page-item.active .page-link {
  font-weight: 600;
}

/* ===== ADMIN FORM STYLES ===== */

.admin-pgn-textarea {
  resize: vertical;
  min-height: 100px;
}

/* ===== OAUTH2 COMPLETION PAGE ===== */

.oauth2-complete-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f8f9fa;
}

.completion-container {
  text-align: center;
  padding: 2rem;
}

.completion-container .spinner-border {
  width: 3rem;
  height: 3rem;
}

.completion-container .error-message {
  color: #dc3545;
  margin-top: 1rem;
}

/* ===== ANIMATIONS ===== */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
