/* app/assets/stylesheets/application.css */

/* Define your custom color scheme */
:root {
  --bs-primary: #a0d468;  /* Light Green */
  --bs-secondary: #ffd966;  /* Light Yellow */
  --bs-success: #8cc152;  /* Darker Green */
  --bs-info: #4fc1e9;  /* Light Blue */
  --bs-warning: #ffce54;  /* Yellow-Orange */
  --bs-danger: #ed5565;  /* Light Red */
  --bs-light: #f7f9f9;  /* Very Light Greenish White */
  --bs-dark: #656d78;  /* Dark Gray */
}
/* Dark Theme Variables */
.theme_dark {
  --bs-primary: #4fc1e9;  /* Light Blue */
  --bs-secondary: #ffce54;  /* Yellow-Orange */
  --bs-success: #a0d468;  /* Light Green */
  --bs-info: #3bafda;  /* Medium Blue */
  --bs-warning: #ffd966;  /* Light Yellow */
  --bs-danger: #ed5565;  /* Light Red */
  --bs-light: #888CA0;  /* Dark Grayish */
  --bs-dark: #222529;  /* Very Dark Gray */
  --bs-heading-color: #f0f0f0;
  --bs-list-group-bg: #2f323a;
  --bs-list-group-color: #f0f0f0;
  --bs-body-bg: #2f323a;
  --bs-body-color: #f0f0f0;
  --bs-card-title-color: #f0f0f0;
  --bs-text: #d0d0d0;
}
.theme_dark .card-title {
  color: #f0f0f0 !important;
}
html body.theme_dark {
  color: var(--bs-text) !important;
}

/* Override Navbar */
.navbar-light {
  background-color: var(--bs-primary) !important;
}
.theme_dark .navbar-light {
  background-color: var(--bs-dark) !important;
}
.navbar-light .navbar-nav .nav-link {
  color: var(--bs-light) !important;
  border-radius: 5px;
}
.theme_dark .navbar-light .navbar-nav .nav-link {
  color: var(--bs-light) !important;
  border-radius: 5px;
}
.navbar-brand {
  color: var(--bs-light) !important;
}
.theme_dark .navbar-brand {
  color: var(--bs-primary) !important;
}
.theme_dark .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 0.9)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Override Buttons */
.btn-primary {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  color: #fff !important;
}
.theme_dark .btn-primary {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  color: #fff !important;
}
.btn-secondary {
  background-color: var(--bs-secondary) !important;
  border-color: var(--bs-secondary) !important;
  color: #fff !important;
}
.theme_dark .btn-secondary {
  background-color: var(--bs-secondary) !important;
  border-color: var(--bs-secondary) !important;
  color: #222529 !important;
}

/* Override Background */
body {
  background-color: var(--bs-light) !important;
  color: var(--bs-dark) !important;
}
body.theme_dark {
  background-color: var(--bs-dark) !important;
  color: var(--bs-light) !important;
}

/* Override Links */
a {
  color: var(--bs-primary) !important;
}
.theme_dark a {
  color: var(--bs-primary) !important;
}
.theme_dark a.btn {
  color: var(--bs-white) !important;
}
a:hover {
  color: var(--bs-success) !important;
}
.theme_dark a:hover {
  color: var(--bs-success) !important;
}

.nav-link:hover, .navbar-brand:hover {
  background-color: #898636;
}

.theme_dark .nav-link:hover,
.theme_dark .navbar-brand:hover {
  background-color: #3bafda; /* slightly lighter blue for hover effect */
}


/* Background colors for correctness */
.bg-correct {
  background-color: #8cc152 !important;
}

.theme_dark .bg-correct {
  background-color: var(--bs-success) !important;
}

.bg-incorrect {
  background-color: #ed5565 !important;
}

.theme_dark .bg-incorrect {
  background-color: var(--bs-danger) !important;
}

.theme_dark .card {
  background-color: var(--bs-dark); /* Very Dark Gray */
  border: 1px solid #444950; /* Dark Grayish */
  color: var(--bs-light); /* Light Grayish */
}

.theme_dark .text-muted {
  color: #b0b3b8 !important; /* Lighter gray for better contrast on dark backgrounds */
}

.proceeding {
  position: relative;
  overflow: hidden;
  background-color: #007bff; /* base blue */
  color: white;
}

.proceeding::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background-color: #0056b3; /* darker blue */
  animation: wipe 1s linear forwards;
  z-index: 1;
}

.proceeding > * {
  position: relative;
  z-index: 2;
}

@keyframes wipe {
  to {
    left: 0;
  }
}
.htmx-a .spinner-border {
  border-width: 0.2em;
  display: none;
  height: 1rem;
  margin-left: 20px;
  width: 1rem;
}
.htmx-a .spinner-border.htmx-request {
  display: inline-block !important;
}
.reader_overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% + 50px); /* Adjust height to be taller */
  pointer-events: none;
  background: linear-gradient(to bottom, 
    rgba(0, 0, 0, 1) 0%, /* Top fully dark */
    rgba(0, 0, 0, 0) calc(50% - 65px), /* Shift fade start up to keep the clear center */
    rgba(0, 0, 0, 0) calc(50% + 65px), /* Shift fade end down to keep the clear center */
    rgba(0, 0, 0, 1) 100% /* Bottom fully dark */
  );
  z-index: 2;
}

.stories_read .navbar {
  z-index:999;
}
.read_story {
  padding-top:5em;
  position: relative;
}
.part.active {
  outline: 1px solid #FFFFFF33;
  border-radius: 5px;
}
.part .details {
  border-radius: 5px 5px 0 0;
  bottom: 0;
  display: block;
  font-size: 1rem;
  left: 0;
  margin-top: 2em;
  opacity: 0;
  padding: 5px;
  position: fixed;
  text-align: center;
  z-index: 9;
  transition: 0.3s opacity;
}
.part.active>.details {
  display: block;
  opacity: 1;
}
.part .romanization {
  display: block;
  line-height: 1em;
  font-weight:bold;
}
.lesson_progressbar {
  position: absolute;
  top: 0;
  left: 0;
  height: 5px;
  width: 100%;
}
.lesson_progressbar .progress {
  background-color: #7a9ea7;
  height: 5px;
  width: 20px;
}
.modal {
  --bs-modal-zindex: 10500;
}
.bg-window {
  background: #00000099;
  box-shadow: 3px 3px 0px #00000033;
}
.theme_dark .bg-window {
  background: #FFFFFF11;
  box-shadow: 3px 3px 0px #FFFFFF33;
}
.drill .footers, body.lessons_take .footers {
  display: none;
}
.cursor-pointer {
  cursor: pointer;
}
.mw-800 {
  max-width: 800px;
  margin: 0 auto;
}
.lesson-x {
  background: #f9f9f9;
  border: 1px solid #CCC;
  border-radius: 10px;
  color: #444 !important;
  display: inline-block;
  height: 35px;
  line-height: 27px;
  margin: 0;
  padding: 0;
  width: 37px;
}
.theme_dark .lesson-x {
  background: #444;
  border: 1px solid #444;
  color: #f9f9f9 !important;
}
a .card {
  transition: transform 0.3s ease, box-shadow 0.1s ease;
}

a:hover .card.scale-hover {
  transform: scale(1.05);
}
a:hover .card {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
a:hover .card-body {
  background-color: #f8f9fa; /* Light background color change */
}
.theme_dark a:hover .card {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.theme_dark a:hover .card-body {
  background-color: #111; /* Dark background color change */
}

.static_home {
  background: url(/rememble-bg.jpg) no-repeat top center;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3)),
              url(/rememble-bg.jpg) no-repeat top center;
}
.static_home.theme_dark .navbar-light, .static_home .navbar-light {
  background-color: unset !important;
}
.theme_dark .navbar-light .navbar-nav .nav-link {
  color: #FFF !important;
}
.home.hero {
  backgroundx: url(/rememble-bg.jpg) no-repeat center center;
  background-size: cover;
  color: #FFF;
  padding: 100px 0;
}
.home.hero h4 {
  font-family: 'Roboto', sans-serif;
  font-size: 1.3em;
  font-weight: 300;
  line-height: 1.2;
  text-transform: uppercase;
}
.home.hero h1 {
  font-family: 'Roboto', sans-serif;
  font-size: 3.5em;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}
.home.hero p {
  font-size: 1.5em;
  line-height: 1.5;
}
@media (max-width: 992px) {
  .home.hero h1 {
    font-size: 2.5em;
  }
  .home.hero p {
    font-size: 1.2em;
  }
}
.why-choose {
  font-family: 'Roboto', sans-serif;
}
.why-choose h4 {
  font-weight: 400;
}
.cta-get-started {
  background-image: linear-gradient(to bottom, rgba(34, 37, 41, 0.85), rgba(34, 37, 41, 0.85)), url(/cta-bg.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  color: #DDD;
  height: auto;
  padding: 4rem 0;
  margin-bottom: -1.5rem;
}

.known, .known .text-muted {
  color: #FFFFFF22 !important;
}
.favorite, .favorite .badge {
  background-color: #fff4cc;
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
  color: #000;
  position: relative;
}

.footer-nav a {
  color: var(--bs-light) !important;
}

/* Content Rich Courses */
.course-wrapper .btn {
  border-radius: 0;
  padding: 1.2em 2.3em;
}
.course-wrapper .container {
  max-width: 1200px;
}
.course-wrapper.counts {
  background: #f8f9fa;
  padding: 2em 0;
}
.ribbon>div {
  padding: 4em 2em;
}
.ribbon1.wrapper {
  background: #565656;
  color: #FFF;
}
.ribbon h2 {
  color: #FFF;
}
.ribbon2.wrapper {
  background: #00152a;
}
.ribbon2>div {
  padding: 4em 2em 0;
}
.ribbon4.wrapper {
  background: #252f30;
}
.ribbon-flashcards {
  background: linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9)),
              url(/text-background.jpg) no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  color: #ffffff; /* Ensures text is visible on dark background */
  padding: 50px 20px; /* Adjust padding as needed */
}
.fixed-bottom-row {
  max-width: 900px;
  margin: 0 auto;
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
}
.fixed-bottom-row.quiz .btn {
  background: rgba(0,0,0,0.1) !important;
  margin: 0 0 10px 0;
}
@media (max-width: 768px) {
  .fixed-bottom-row {
    bottom: 0;
    margin: 0;
    width: 100%;
    padding: 0;
    z-index: 1000;
  }

  .fixed-bottom-row .col-6 {
    border-left: 1px solid #e9ecef;
    padding: 0;
  }

  .fixed-bottom-row .btn {
    margin: 0;
    border-radius: 0;
    padding: 11px 0 14px;
  }

  .fixed-top-row {
    position: fixed;
    top: 0;
    z-index: 10000;
    width: 100%;
    background: #FFF;
    padding: 0;
    margin: 0;
    left: 0;
    min-height: 90px;
  }
  .theme_dark .fixed-top-row {
    background: #161616;
  }
}

.autoclick {
  position: relative;
  overflow: hidden;
}

.autoclick span {
  position: relative;
  z-index: 2;
}

.autoclick::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 0%;
  height: 100%;
  background: #a3812c;
  animation: autoclick-progress 2s linear forwards;
  z-index: 1;
}

@keyframes autoclick-progress {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

/* Enable hover for Bootstrap 5 dropdowns */
.nav-item.dropdown:hover .dropdown-menu {
  display: block;
}
.nav-item .dropdown-menu a {
  color: #FFF !important;
}
.nav-item .dropdown-menu a:hover {
  background-color: #007bff;
  color: #FFF !important;
}
.dropdown-menu {
  margin-top: 0;
}

#app-container {
  background: #17191c;
  position: fixed;
  top: 0;
  width: 100%;
}
#app-container.shown {
  bottom: 0;
}
.btn-outline-minor {
  border: 1px solid #4c4c4c !important;
}
.iframe .footers, .iframe .navbar {
  display: none !important;
}
.iframe .drill .navbar {
  display: block !important;
}
.mastery-bar {
  width: 100px;
  height: 16px;
  background-color: #3d3d3d;
  border-radius: 4px;
  display: inline-block;
  overflow: hidden;
  margin-bottom: 4px;
  vertical-align: middle;
}

.mastery-fill {
  height: 100%;
  background-color: #4a90e2;
}
.glow {
  box-shadow: 0 0 4px #0d6efd, 0 0 4px #0d6efd;
}
.question_text {
  margin:0;
}
.question_mode>.container {
  padding:0;
  margin-top:0 !important;
}
body.question_mode, .question_mode.theme_dark .question-container, .question_mode.theme_dark .navbar-light {
  background:#111 !important;
}
.deck-wrapper.active .deck-link {
  background: var(--bs-primary) !important;
  color: #FFF !important;
  margin-right:.5rem!important;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
