/*
 * Lo-fi slate/ocean theme
 */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.7;
  margin: 0;
  padding: 0;
  background: #f7f9fb;
  min-height: 100vh;
  color: #3d4f5f;
}

/* App layout */
.app-layout {
  min-height: 100vh;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  background: #fbfcfd;
  border-bottom: 1px solid rgba(61, 79, 95, 0.08);
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.main-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem;
  padding-top: 8vh;
}

.practice-container {
  position: relative;
  z-index: 2;
  background: #fbfcfd;
  padding: 2.5rem 3.5rem;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: center;
  box-shadow:
    0 2px 8px rgba(61, 79, 95, 0.06),
    0 12px 40px rgba(61, 79, 95, 0.1);
  width: 100%;
  border: 1px solid rgba(61, 79, 95, 0.08);
}

.practice-container h2 {
  margin: 0;
  color: #3d4f5f;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.problem-box {
  background: #f3f6f8;
  padding: 2rem;
  border-radius: 16px;
  margin: 2rem 0;
  border: 1px solid rgba(90, 122, 138, 0.15);
}

.problem-box p {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 500;
  color: #3d4f5f;
  line-height: 1.6;
}

.instruction {
  color: #8a9aa8;
  font-weight: 500;
  font-size: 1.15rem;
  margin: 1.5rem 0;
}

.timer {
  font-size: 6rem;
  font-weight: 700;
  text-align: center;
  padding: 2rem 0;
  font-variant-numeric: tabular-nums;
  color: #7ca3b5;
  letter-spacing: -2px;
}

.btn {
  background: #7ca3b5;
  color: #fbfcfd;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 2rem;
  font-family: inherit;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(124, 163, 181, 0.3);
}

.btn:hover {
  background: #6b92a5;
}

.mode-selection {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.mode-btn {
  flex: 1;
  background: #f3f6f8;
  border: 2px solid rgba(90, 122, 138, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.2s ease;
}

.mode-btn:hover {
  border-color: #7ca3b5;
  background: #f8fafc;
}

.mode-btn strong {
  display: block;
  font-size: 1.25rem;
  color: #5a7a8a;
  margin-bottom: 0.5rem;
}

.mode-btn span {
  font-size: 0.95rem;
  color: #8a9aa8;
}

.mode-radio-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-radio-input:checked + .mode-btn {
  border-color: #7ca3b5;
  background: #f8fafc;
}

.skill-input {
  width: 100%;
  padding: 1.25rem;
  text-align: center;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 500;
  color: #3d4f5f;
  background: #f3f6f8;
  border: 1px solid rgba(90, 122, 138, 0.2);
  border-radius: 12px;
  margin: 0;
}

.skill-input:focus {
  outline: none;
  border-color: #7ca3b5;
  box-shadow: 0 0 0 3px rgba(124, 163, 181, 0.15);
}

.skill-input::placeholder {
  color: #a0aab4;
}

kbd {
  background: #e8eef3;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.85rem;
  border: 1px solid #d0d8e0;
}

.tips {
  margin-top: 2rem;
  font-size: 0.95rem;
}

.tips summary {
  color: #8a9aa8;
  cursor: pointer;
  font-weight: 500;
  width: fit-content;
  margin: 0 auto;
  list-style: none;
}

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

.tips summary::before {
  content: "›";
  display: inline-block;
  margin-right: 0.35em;
  transition: transform 0.2s;
}

.tips[open] summary::before {
  transform: rotate(90deg);
}

.tips summary:hover {
  color: #5a7a8a;
}

.tips-content {
  margin-top: 1rem;
  padding: 1.25rem;
  background: #f3f6f8;
  border-radius: 12px;
  color: #3d4f5f;
  text-align: left;
}

.tips-content p {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.tips-content ul {
  margin: 0 0 1rem 0;
  padding-left: 1.25rem;
}

.tips-content ul:last-child {
  margin-bottom: 0;
}

.tips-content li {
  margin-bottom: 0.25rem;
}

/* Mental Rehearsal */
.rehearsal-steps {
  margin: 1.5rem 0;
}

.rehearsal-step {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(90, 122, 138, 0.1);
  text-align: left;
}

.rehearsal-step:last-child {
  border-bottom: none;
}

.rehearsal-step strong {
  color: #5a7a8a;
}

.rehearsal-step p {
  margin: 0.5rem 0 0 0;
  color: #6a7a88;
  font-size: 0.95rem;
}

.rehearsal-time {
  color: #a0aab4;
  font-weight: 500;
  font-size: 0.9rem;
}

.rehearsal-timing {
  color: #6a9a8a;
  font-weight: 500;
  font-size: 0.95rem;
  background: #edf5f3;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}


/* Confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #5a7a8a;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-logo:hover {
  color: #3d4f5f;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb-sep {
  color: #a0aab4;
  font-weight: 500;
}

.breadcrumb-link {
  color: #7ca3b5;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.25rem;
}

.breadcrumb-link:hover {
  color: #5a7a8a;
}

.breadcrumb-current {
  color: #3d4f5f;
  font-weight: 600;
  font-size: 1.25rem;
}

.sign-out-btn {
  background: none;
  border: 1px solid rgba(90, 122, 138, 0.25);
  padding: 0.4rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  color: #8a9aa8;
  font-weight: 500;
  transition: all 0.2s ease;
}

.sign-out-btn:hover {
  border-color: #7ca3b5;
  color: #5a7a8a;
}

/* Flash messages */
.flash {
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-weight: 500;
  font-size: 0.95rem;
}

.flash-notice {
  background: #edf5f3;
  color: #6a9a8a;
  border: 1px solid rgba(106, 154, 138, 0.2);
}

.flash-alert {
  background: #fdf0ef;
  color: #b56a6a;
  border: 1px solid rgba(181, 106, 106, 0.2);
}

/* Devise forms */
.field {
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
}

.field-label {
  display: block;
  color: #5a7a8a;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.field-hint {
  color: #a0aab4;
  font-size: 0.85rem;
  font-weight: 500;
}

.remember-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.remember-field .field-label {
  display: inline;
  margin-bottom: 0;
}

.error-explanation {
  background: #fdf0ef;
  border: 1px solid rgba(181, 106, 106, 0.2);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.error-explanation h3 {
  color: #b56a6a;
  font-size: 0.95rem;
  margin: 0 0 0.75rem 0;
}

.error-explanation ul {
  margin: 0;
  padding-left: 1.25rem;
}

.error-explanation li {
  color: #b56a6a;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

/* Concept list */
.concept-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
  max-height: 50vh;
  overflow-y: auto;
}

a.concept-item {
  text-decoration: none;
  cursor: pointer;
}

.concept-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.75rem 1rem;
  background: #f3f6f8;
  border-radius: 10px;
  border: 1px solid rgba(90, 122, 138, 0.1);
  transition: all 0.15s ease;
}

a.concept-item:hover {
  border-color: #7ca3b5;
  background: #f8fafc;
}

.concept-meta {
  color: #a0aab4;
  font-size: 0.85rem;
  font-weight: 500;
}

.concept-title {
  font-weight: 500;
  color: #3d4f5f;
  text-align: center;
  word-break: break-word;
}

.concept-type-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  text-transform: capitalize;
}

.concept-type-badge.understanding {
  background: #edf5f3;
  color: #6a9a8a;
}

.concept-type-badge.skill {
  background: #edf0f5;
  color: #7ca3b5;
}

/* Concept show */
.concept-show-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.concept-show-category {
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #8a9aa8;
  background: #f3f6f8;
  border-radius: 6px;
}

.last-practiced {
  text-align: center;
  color: #a0aab4;
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0;
}


/* Inline editable fields */
.inline-editable {
  cursor: pointer;
  border-radius: 8px;
  padding: 0.15rem 0.75rem;
  margin: 0 -0.75rem;
  transition: background 0.15s ease;
}

.inline-editable:hover {
  background: rgba(90, 122, 138, 0.08);
}

.inline-editable-pill {
  cursor: pointer;
  transition: all 0.15s ease;
}

.inline-editable-pill:hover {
  opacity: 0.75;
  box-shadow: 0 0 0 2px rgba(124, 163, 181, 0.25);
}

/* Edit form inputs */
.edit-input {
  width: 100%;
  font-family: inherit;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  color: #3d4f5f;
  background: #f3f6f8;
  border: 1px solid rgba(90, 122, 138, 0.2);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
}

.edit-input:focus {
  outline: none;
  border-color: #7ca3b5;
  box-shadow: 0 0 0 3px rgba(124, 163, 181, 0.15);
}

.edit-input-inline {
  width: auto;
  font-size: 0.85rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.card-header-title {
  margin: 0;
  color: #3d4f5f;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.card-header-title ~ [data-inline-field-target="field"] .edit-input {
  font-size: 1.5em;
  font-weight: 700;
  letter-spacing: -0.5px;
}

label.concept-item {
  cursor: text;
}

.inline-row-input {
  width: 100%;
  font-family: inherit;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: #3d4f5f;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
}

.inline-row-input::placeholder {
  color: #a0aab4;
}

.card-footer-hint {
  color: #a0aab4;
  font-size: 0.75rem;
  font-weight: 500;
  margin: 1.75rem 0 0;
  text-decoration: none;
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: 1rem;
}

.card-footer-hint[hidden] {
  display: none;
}

.card-footer-hint kbd {
  font-size: 0.55rem;
}

.empty-state {
  color: #a0aab4;
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0;
}

.empty-state a {
  color: #7ca3b5;
}

.title-with-menu {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.title-with-menu h2 {
  margin: 0;
}

.title-with-menu > div {
  min-width: 70%;
}

.title-full-width > div {
  width: 100%;
}


.add-trigger {
  position: absolute;
  right: 0;
  color: #a0aab4;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 300;
  text-decoration: none;
  transition: color 0.15s ease;
}

.add-trigger:hover {
  color: #5a7a8a;
}

.card-options {
  text-align: center;
}

.card-options:last-child {
  margin-bottom: -1rem;
}

.card-options summary {
  color: #a0aab4;
  cursor: pointer;
  font-weight: 300;
  font-size: 1.1rem;
  letter-spacing: 2px;
  list-style: none;
  width: fit-content;
  margin: 0 auto;
}

.card-options summary::-webkit-details-marker {
  display: none;
}

.card-options summary:hover {
  color: #8a9aa8;
}

.card-options-content {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.btn-danger {
  color: #b56a6a;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(181, 106, 106, 0.2);
  transition: all 0.15s ease;
}

.btn-danger:hover {
  background: rgba(181, 106, 106, 0.1);
}


