:root {
  --bg: #f5faff;
  --title: #56585d;
  --gray-light: #ecf0f2;
  --gray-pale: #aaa;
  --gray-medium: #ccc;
  --gray-dark: #666;
  --danger: #bb0000;
  --border-color: #6f727b;
}

html, body {
  min-height: 100%;
  height: auto;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: hidden;
}

.navbar {
  background-color: #ffffffcc;
  box-shadow: 0 1px 1px #d1d5db2b;
  padding: 0 0.5rem;
}
.navbar .flex.items-center.justify-between.h-12 {
  gap: 18px;
}
.navbar .navbar-search-input,
.navbar .form-control {
  background-color: #FFFFFF;
  border-color: #d1d5db;
  color: #000000;
}
.navbar .navbar-search-input::placeholder,
.navbar .form-control::placeholder {
  color: #9ca3af;
}
  
.navbar a,
.navbar button {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.navbar a {
  gap: 6px;
  padding: 0.3rem 0.65rem;
}
#loginBtn,
#userMenu {
  border-radius: 12px;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  border: 0;
}

.language-switcher select {
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 1rem;
  color: #1f2937;
  cursor: pointer;
  outline: none;
}

.language-switcher select:focus-visible {
  outline: none;
}

.language-switcher-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


#navbarBrand {
  display: flex;
  gap: 8px;
  height: 48px;
  align-items: center;
}

.logo-picture {
  height: 100%;
  width: auto;
  object-fit: contain;
  display: block;
  margin-left: -60px;
  max-width: none!important;
}

@media (max-width: 768px) {
  .logo-picture {
    margin-left: -110px;
  }
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 0.65rem;
  margin-top: -10px;
  line-height: 1;
  color: #000000;
}

.nav-inner {
  gap: 1rem;
}


@media (max-width: 767px) {
  .nav-inner {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
  }

  .nav-inner .navbar-search-input {
    display: none;
    order: 5;
    flex-basis: 100%;
    width: 100%;
    margin-left: 0;
    margin-top: -3px;
  }
}

.echo-cards-grid {
  display: grid;
  gap: 1rem;
  padding: 0;
  width: 100%;
  justify-content: start;
}

/* Mobile: 1 card per screen width */
@media (max-width: 767px) {
  .echo-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablet: 2 cards */
@media (min-width: 768px) and (max-width: 919px) {
  .echo-cards-grid {
    grid-template-columns: repeat(2, 300px);
  }
}

/* Tablet: 3 cards */
@media (min-width: 920px) and (max-width: 1219px) {
  .echo-cards-grid {
    grid-template-columns: repeat(3, 300px);
  }
}

/* Desktop: 4 cards */
@media (min-width: 1220px) {
  .echo-cards-grid {
    grid-template-columns: repeat(4, 300px);
  }
}

/* Wide screen: max 5 cards */
/* @media (min-width: 1620px) {
  .echo-cards-grid {
    grid-template-columns: repeat(5, 300px);
  }
} */

/* Base card styling */
.card-main {
  border-radius: 1rem;
  border: 1px solid #6f727b;
  background-color: #ffffff90;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  padding: 0.5rem;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease-in-out, box-shadow 0.18s ease;
  position: relative;
}


.card-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
}

/* Card size variants */
.card-main-small {
  width: 250px;
  height: 150px;
  padding: 0;
  font-family: "Inter", system-ui;
  font-weight: 400;
  font-size: 2rem;
}

.card-main-echo {
  width: 300px;
  height: 400px;
  font-family: "Inter", system-ui;
  font-weight: 400;
  font-size: 2rem;
}

@media (max-width: 767px) {
  .card-main-echo {
    width: 360px;
  }
}

.card-main-search {
  width: 400px;
  height: 400px;
}

/* Responsive card sizes */
@media (min-width: 769px) {
  .card-main-course {
    width: 500px;
    height: 500px;
  }
  
  .card-main-readings {
    width: 400px;
    height: 400px;
  }
  
  .card-main-echo-promo {
    /* margin-left: 1px; */
    width: 300px;
    height: 400px;
  }
}

@media (max-width: 768px) {
  .card-main-course {
    width: 360px;
    height: 600px;
  }
  
  .card-main-echo-promo {
    width: 360px;
    height: 400px;
  }
  
  .card-main-readings {
    width: 360px;
    height: 400px;
  }
}

/* Card internal structure */
.card-main-inner {
  padding: 0.5rem;
  background-color: #f9fafb;
  width: 100%;
  height: 100%;
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.card-main-upper-row {
  background-color: "transparent";
  border-radius: 1rem 1rem 0 0;
  padding: 0.5rem;
  height: 85%;
  width: 100%;
  min-height: 75%;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.card-main-upper-row-small {
  background-color: "transparent";
  height: 100%;
  width: 96%;
  border-radius: 1rem;
}

.card-main-bottom-row {
  border-radius: 0 0 1rem 1rem;
  padding: 0.5rem;
  background-color: "transparent";
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
}

/* Card content elements */
.card-main-img-desc {
  border-radius: 0.5rem;
  background-color: #f9fafb;
  overflow: hidden;
  margin: 6px 6px 0 6px;
  scrollbar-width: none;
  flex: 1;
  height: 100%;
}

.card-main-img-desc::-webkit-scrollbar {
  display: none;
}

.card-main-img {
  border-radius: 0.75rem;
  max-height: 220px;
  max-width: 133px;
  object-fit: cover;
  object-position: center;
  float: left;
  margin-right: 6px;
}

.card-main-img2 {
  border-radius: 20px;
  max-height: 250px;
  max-width: 250px;
  object-fit: cover;
  object-position: center;
  float: right;
  margin-left: 6px;
}

.card-main-img-larger {
  border-radius: 20px;
  max-height: 350px;
  max-width: 250px;
  object-fit: cover;
  float: left;
  margin-right: 6px;
}

.card-main-img-small {
  border-radius: 20px;
  max-height: 133px;
  max-width: 133px;
  object-fit: cover;
  object-position: center;
  float: left;
  margin-right: 6px;
}

.img-blur {
  filter: blur(3px) brightness(0.9);
  -webkit-filter: blur(3px);
  transform: scale(1.1);
}

.img-blur:hover {
  filter: blur(0px) brightness(1);
  -webkit-filter: blur(0px);
  transform: scale(1);
}

.card-main-desc {
  font-size: 0.9rem;
  border-radius: 0.5rem;
  color: #222;
  margin: 0;
  max-height: 6.4rem;
  text-overflow: ellipsis;
}
@media (max-width: 768px) {
  .card-main-desc {
    font-size: 1rem;
  }
}

/* Card text elements */
.card-main-author {
  font-family: 'Merriweather', serif; 
  font-size: 15px;
  min-height: 1.5rem;
  color: #000;
  margin-left: 5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.card-main-author-heart {
  margin-left: 40px;
  width: 230px;
}

.card-main-echo .card-main-author {
  font-size: 16px;
}

/* Card button */
.card-main-btn {
  padding: 0.6rem 1.4rem;
  letter-spacing: 0.02em;
  background: #2563eb !important;
  border: 0;
  color: #f4f4f4 !important;
  min-width: 200px;
  min-height: 50px;
  font-size: 16px;
  border-radius: 2rem;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.card-main-btn:hover {
  background: #1d4ed8 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Status and decorative elements */
.status-HTML {
  pointer-events: none;
  position: absolute;
  top: 5px;
  right: 10px;
  z-index: 2;
  font-family: "Coiny", sans-serif;
  padding: 0;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 400;
  background: #f9fafbf5;
  color: #4b5563;
}


.status-HTML-small {
  pointer-events: none;
  position: absolute;
  top: -5px;
  right: 15px;
  z-index: 2;
  font-family: "Coiny", sans-serif;
  font-size: 1rem;
  color: rgb(199, 0, 0);
}

.heart-HTML {
  pointer-events: none;
  position: absolute;
  top: 12px;
  left: 5px;
  z-index: 2;
}

.relative ul {
  min-width: 200px;
}

.relative ul li a {
  display: block;
  padding: 0.5rem 1rem;
  transition: background-color 0.2s;
  text-decoration: none;
}

.relative ul li a:hover {
  background-color: #f3f4f6;
}

.relative ul li a.text-red-600:hover {
  background-color: #fee2e2;
}

@media (max-width: 768px) {
  .not-phone-only {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .phone-only {
    display: none !important;
  }
}

.mobile-section-tabs {
  display: none;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.5rem;
  border-radius: 2rem;
  position: sticky;
  top: 48px;
  background: #f5faff30;
  z-index: 30;
}

.mobile-section-tab {
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  background: white;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  color: #6b7280;
}

.mobile-section-tab.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.section-title {
  font-family: 'Merriweather', serif;
}

@media (max-width: 767px) {
  .mobile-section-tabs {
    display: flex;
  }
  
  /* Hide section titles on mobile */
  .section-title {
    display: none !important;
  }
  
  /* Mobile section container */
  .mobile-sections-container {
    position: relative;
    overflow: hidden;
    width: 100%;
  }
  
  .mobile-sections-wrapper {
    display: flex;
    width: 200%; /* Two sections side by side */
  }
  
  .mobile-section {
    width: 100%;
    height: 100%;
    
    flex-shrink: 0;
  }
  
  /* Promoted section on mobile */
  #promotedContainer {
    width: 100% !important;
    margin-bottom: 0 !important;
    position: relative;
  }
  
  #promotedSection {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: calc(100vh - 200px);
  }
  
  #promotedSection .card-main {
    scroll-snap-align: start;
  }
  
  #promotedSection .card-main-echo-promo {
    min-height: 400px;
  }
  
  /* Echo chat section on mobile */
  #echoChatContainer {
    width: 100% !important;
    margin-bottom: 0 !important;
  }
  
  #echoChatSection {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: calc(100vh - 200px);
    scroll-snap-type: y mandatory;
  }
  
  #echoChatSection .card-main {
    scroll-snap-align: start;
  }
  
}

/* ==========================================================================
   SCROLLBAR HIDING
   ========================================================================== */

.overflow-y-scroll::-webkit-scrollbar,
.overflow-x-auto::-webkit-scrollbar {
  display: none;
}

.overflow-y-scroll,
.overflow-x-auto {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ==========================================================================
   PROMOTED SECTION STYLES
   ========================================================================== */

#promotedContainer {
  position: relative;
}

#promotedSection {
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  overflow-x: auto !important;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

#promotedSection::-webkit-scrollbar {
  display: none;
}

#promotedSection .card-main {
  flex-shrink: 0;
  scroll-snap-align: start;
}

/* ==========================================================================
   GAME INFO BOARD WINDOW
   ========================================================================== */

#boardWindow {
  animation: fadeInSlideDown 0.3s ease-out;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  overflow: hidden;
}

#notificationsWindow {
  overflow: hidden;
}

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

#boardWindow .overflow-y-auto {
  overflow-y: auto;
  overflow-x: auto;
  max-height: 60vh;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

#boardWindow .overflow-y-auto::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

#boardWindow .overflow-y-auto::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

#boardWindow .overflow-y-auto::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

#boardWindow .overflow-y-auto::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.board-events-table {
  border-collapse: collapse;
  min-width: 100%;
}

.board-events-table thead th {
  position: sticky;
  top: 0;
  background: #f9fafb;
  z-index: 10;
  box-shadow: 0 1px 0 0 #e5e7eb;
  white-space: nowrap;
}

.board-events-table tbody tr:last-child {
  border-bottom: none;
}

.board-events-table tbody tr.bg-yellow-50 {
  animation: highlightGlow 2s ease-in-out infinite;
}

@keyframes highlightGlow {
  0%, 100% {
    box-shadow: inset 0 0 0 0 rgba(250, 204, 21, 0);
  }
  50% {
    box-shadow: inset 0 0 8px 0 rgba(250, 204, 21, 0.3);
  }
}

/* Mobile responsive for board window */
@media (max-width: 768px) {
  #boardWindow {
    max-width: 95vw;
    top: 10%;
    max-height: 85vh;
  }
  
  #boardWindow .overflow-y-auto {
    max-height: 70vh;
  }
  
  .board-events-table thead th,
  .board-events-table tbody td {
    padding: 0.5rem !important;
    font-size: 0.875rem;
  }
  
  .board-events-table thead th:first-child,
  .board-events-table tbody td:first-child {
    font-size: 1.25rem;
  }
}


/* ==========================================================================
   COURSE DETAIL CARDS
   ========================================================================== */

.course-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 400px;
  max-width: 400px;
  height: 504px;
  border-radius: 1.25rem;
  border: 1px solid #6f727b;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
  transition: transform 0.18s ease-in-out, box-shadow 0.18s ease;
}

.course-card:hover {
  transform: translateY(-4px) translateX(2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.course-card-label {
  position: absolute;
  left: 30px;
  bottom: 0;
  transform-origin: bottom left;
  transform: rotate(-90deg);
  width: 504px;
  height: 35px;
  font-family: "Coiny", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.6rem;
  color: #0f172a;
  background: #d7dfdd;
  border-radius: 6px;
  box-shadow:
    inset 2px 2px 3px rgba(0, 0, 0, 0.2),
    inset -2px -2px 3px rgba(255, 255, 255, 0.7);
  padding: 0.2rem 0.75rem;
  pointer-events: none;
  text-transform: lowercase;
}

.course-card-label--lecture {
  background: #d7dfdd;
}

.course-card-label--readings {
  background: #fffcee;
}

.course-card-label--test {
  background: white;
}

.course-card-label--echo {
  background: #dae3f5;
}

.course-card-inner {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 0.75rem 0.75rem 0.5rem 2.5rem;
  border-radius: 1.25rem;
  overflow: hidden;
  background-color: rgba(236, 240, 242, 0.7);
}

.course-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  min-height: 100px;
  background-color: rgba(244, 244, 244, 0.93);
  border-radius: 1.25rem 1.25rem 0 0;
}

.course-card-image {
  width: 100px;
  height: 100px;
  border-radius: 0.75rem;
  object-fit: cover;
  flex-shrink: 0;
}

.course-card-title {
  font-family: "Merriweather", serif;
  font-size: 1.25rem;
  color: #10245e;
  max-height: 4rem;
  overflow: hidden;
  margin: 0;
}

.course-card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 0.75rem;
  gap: 0.5rem;
  background-color: rgba(244, 244, 244, 0.93);
  border-radius: 0 0 1.25rem 1.25rem;
}

.course-card-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  width: 100%;
}

.course-card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.4rem 0.65rem;
  border-radius: 0.75rem;
  border: none;
  background: #2563eb;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: lowercase;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.18);
}

.course-card-button i {
  font-size: 1.5rem;
}

.course-card-button:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.course-card-button--disabled,
.course-card-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  background: #94a3b8;
  box-shadow: none;
}

.course-card-meta {
  font-size: 0.85rem;
  font-weight: 600;
  font-style: italic;
  color: #111;
  margin: 0.25rem 0 0;
}

.course-card-text {
  font-size: 0.8rem;
  color: #1f2937;
  line-height: 1.45;
  max-height: 300px;
  min-height: 300px;
  overflow-y: auto;
  margin: 0;
}

.course-card-description {
  min-height: 100px;
}

.course-card-audio {
  width: 100%;
  min-height: 60px;
  padding: 0.4rem 0;
  border-radius: 0.75rem;
  background: #fff;
}

/* ==========================================================================
   Creator dashboard overrides (moved from common.css)
   ========================================================================== */
.container-details {
  padding: 10px 10px 12px 10px;
  background-color: var(--gray-light);
  border-radius: 20px;
  border: 3px solid var(--border-color);
}

.floating-window-images {
  position: fixed;
  left: 50%;
  top: 30%;
  transform: translate(-50%, -50%);
  background: #ffffef;
  font-size: 0.9rem;
  border: 0;
  z-index: 1000;
  display: none;
  border-radius: 0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}

.floating-window-gallery {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 70vh;
  width: 80vw;
  transform: translate(-50%, -50%);
  background: #fff;
  font-size: 0.9rem;
  border: 1px solid #000;
  z-index: 1050;
  display: none;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
}

@media (max-width: 768px) {
  .floating-window-gallery {
    width: 90vw;
    height: auto;
    max-height: 80vh;
  }
}

/* ==========================================================================
   BOTTOM BAR
   ========================================================================== */

.bottom-bar {
  width: 100vw!important;
  background-color: #2c4369;
  color: #e2e8f0;
  padding: 0.5rem;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
  margin-top: 1rem;
}

.bottom-bar-content {
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.bottom-bar a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s, color 0.2s;
}

.bottom-bar a:hover {
  background-color: #4a5568;
  color: #ffffff;
}

@media (max-width: 768px) {
  .bottom-bar-content {
    gap: 1rem;
  }
}
