/* client/react/index.css */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* node_modules/reactflow/dist/style.css */
.react-flow {
  direction: ltr;
}
.react-flow__container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}
.react-flow__pane {
  z-index: 1;
  cursor: -webkit-grab;
  cursor: grab;
}
.react-flow__pane.selection {
  cursor: pointer;
}
.react-flow__pane.dragging {
  cursor: -webkit-grabbing;
  cursor: grabbing;
}
.react-flow__viewport {
  transform-origin: 0 0;
  z-index: 2;
  pointer-events: none;
}
.react-flow__renderer {
  z-index: 4;
}
.react-flow__selection {
  z-index: 6;
}
.react-flow__nodesselection-rect:focus,
.react-flow__nodesselection-rect:focus-visible {
  outline: none;
}
.react-flow .react-flow__edges {
  pointer-events: none;
  overflow: visible;
}
.react-flow__edge-path,
.react-flow__connection-path {
  stroke: #b1b1b7;
  stroke-width: 1;
  fill: none;
}
.react-flow__edge {
  pointer-events: visibleStroke;
  cursor: pointer;
}
.react-flow__edge.animated path {
  stroke-dasharray: 5;
  -webkit-animation: dashdraw 0.5s linear infinite;
  animation: dashdraw 0.5s linear infinite;
}
.react-flow__edge.animated path.react-flow__edge-interaction {
  stroke-dasharray: none;
  -webkit-animation: none;
  animation: none;
}
.react-flow__edge.inactive {
  pointer-events: none;
}
.react-flow__edge.selected,
.react-flow__edge:focus,
.react-flow__edge:focus-visible {
  outline: none;
}
.react-flow__edge.selected .react-flow__edge-path,
.react-flow__edge:focus .react-flow__edge-path,
.react-flow__edge:focus-visible .react-flow__edge-path {
  stroke: #555;
}
.react-flow__edge-textwrapper {
  pointer-events: all;
}
.react-flow__edge-textbg {
  fill: white;
}
.react-flow__edge .react-flow__edge-text {
  pointer-events: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
.react-flow__connection {
  pointer-events: none;
}
.react-flow__connection .animated {
  stroke-dasharray: 5;
  -webkit-animation: dashdraw 0.5s linear infinite;
  animation: dashdraw 0.5s linear infinite;
}
.react-flow__connectionline {
  z-index: 1001;
}
.react-flow__nodes {
  pointer-events: none;
  transform-origin: 0 0;
}
.react-flow__node {
  position: absolute;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  pointer-events: all;
  transform-origin: 0 0;
  box-sizing: border-box;
  cursor: -webkit-grab;
  cursor: grab;
}
.react-flow__node.dragging {
  cursor: -webkit-grabbing;
  cursor: grabbing;
}
.react-flow__nodesselection {
  z-index: 3;
  transform-origin: left top;
  pointer-events: none;
}
.react-flow__nodesselection-rect {
  position: absolute;
  pointer-events: all;
  cursor: -webkit-grab;
  cursor: grab;
}
.react-flow__handle {
  position: absolute;
  pointer-events: none;
  min-width: 5px;
  min-height: 5px;
  width: 6px;
  height: 6px;
  background: #1a192b;
  border: 1px solid white;
  border-radius: 100%;
}
.react-flow__handle.connectionindicator {
  pointer-events: all;
  cursor: crosshair;
}
.react-flow__handle-bottom {
  top: auto;
  left: 50%;
  bottom: -4px;
  transform: translate(-50%, 0);
}
.react-flow__handle-top {
  left: 50%;
  top: -4px;
  transform: translate(-50%, 0);
}
.react-flow__handle-left {
  top: 50%;
  left: -4px;
  transform: translate(0, -50%);
}
.react-flow__handle-right {
  right: -4px;
  top: 50%;
  transform: translate(0, -50%);
}
.react-flow__edgeupdater {
  cursor: move;
  pointer-events: all;
}
.react-flow__panel {
  position: absolute;
  z-index: 5;
  margin: 15px;
}
.react-flow__panel.top {
  top: 0;
}
.react-flow__panel.bottom {
  bottom: 0;
}
.react-flow__panel.left {
  left: 0;
}
.react-flow__panel.right {
  right: 0;
}
.react-flow__panel.center {
  left: 50%;
  transform: translateX(-50%);
}
.react-flow__attribution {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.5);
  padding: 2px 3px;
  margin: 0;
}
.react-flow__attribution a {
  text-decoration: none;
  color: #999;
}
@-webkit-keyframes dashdraw {
  from {
    stroke-dashoffset: 10;
  }
}
@keyframes dashdraw {
  from {
    stroke-dashoffset: 10;
  }
}
.react-flow__edgelabel-renderer {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
.react-flow__edge.updating .react-flow__edge-path {
  stroke: #777;
}
.react-flow__edge-text {
  font-size: 10px;
}
.react-flow__node.selectable:focus,
.react-flow__node.selectable:focus-visible {
  outline: none;
}
.react-flow__node-default,
.react-flow__node-input,
.react-flow__node-output,
.react-flow__node-group {
  padding: 10px;
  border-radius: 3px;
  width: 150px;
  font-size: 12px;
  color: #222;
  text-align: center;
  border-width: 1px;
  border-style: solid;
  border-color: #1a192b;
  background-color: white;
}
.react-flow__node-default.selectable:hover,
.react-flow__node-input.selectable:hover,
.react-flow__node-output.selectable:hover,
.react-flow__node-group.selectable:hover {
  box-shadow: 0 1px 4px 1px rgba(0, 0, 0, 0.08);
}
.react-flow__node-default.selectable.selected,
.react-flow__node-default.selectable:focus,
.react-flow__node-default.selectable:focus-visible,
.react-flow__node-input.selectable.selected,
.react-flow__node-input.selectable:focus,
.react-flow__node-input.selectable:focus-visible,
.react-flow__node-output.selectable.selected,
.react-flow__node-output.selectable:focus,
.react-flow__node-output.selectable:focus-visible,
.react-flow__node-group.selectable.selected,
.react-flow__node-group.selectable:focus,
.react-flow__node-group.selectable:focus-visible {
  box-shadow: 0 0 0 0.5px #1a192b;
}
.react-flow__node-group {
  background-color: rgba(240, 240, 240, 0.25);
}
.react-flow__nodesselection-rect,
.react-flow__selection {
  background: rgba(0, 89, 220, 0.08);
  border: 1px dotted rgba(0, 89, 220, 0.8);
}
.react-flow__nodesselection-rect:focus,
.react-flow__nodesselection-rect:focus-visible,
.react-flow__selection:focus,
.react-flow__selection:focus-visible {
  outline: none;
}
.react-flow__controls {
  box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.08);
}
.react-flow__controls-button {
  border: none;
  background: #fefefe;
  border-bottom: 1px solid #eee;
  box-sizing: content-box;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 16px;
  height: 16px;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  padding: 5px;
}
.react-flow__controls-button:hover {
  background: #f4f4f4;
}
.react-flow__controls-button svg {
  width: 100%;
  max-width: 12px;
  max-height: 12px;
}
.react-flow__controls-button:disabled {
  pointer-events: none;
}
.react-flow__controls-button:disabled svg {
  fill-opacity: 0.4;
}
.react-flow__minimap {
  background-color: #fff;
}
.react-flow__minimap svg {
  display: block;
}
.react-flow__resize-control {
  position: absolute;
}
.react-flow__resize-control.left,
.react-flow__resize-control.right {
  cursor: ew-resize;
}
.react-flow__resize-control.top,
.react-flow__resize-control.bottom {
  cursor: ns-resize;
}
.react-flow__resize-control.top.left,
.react-flow__resize-control.bottom.right {
  cursor: nwse-resize;
}
.react-flow__resize-control.bottom.left,
.react-flow__resize-control.top.right {
  cursor: nesw-resize;
}
.react-flow__resize-control.handle {
  width: 4px;
  height: 4px;
  border: 1px solid #fff;
  border-radius: 1px;
  background-color: #3367d9;
  transform: translate(-50%, -50%);
}
.react-flow__resize-control.handle.left {
  left: 0;
  top: 50%;
}
.react-flow__resize-control.handle.right {
  left: 100%;
  top: 50%;
}
.react-flow__resize-control.handle.top {
  left: 50%;
  top: 0;
}
.react-flow__resize-control.handle.bottom {
  left: 50%;
  top: 100%;
}
.react-flow__resize-control.handle.top.left {
  left: 0;
}
.react-flow__resize-control.handle.bottom.left {
  left: 0;
}
.react-flow__resize-control.handle.top.right {
  left: 100%;
}
.react-flow__resize-control.handle.bottom.right {
  left: 100%;
}
.react-flow__resize-control.line {
  border-color: #3367d9;
  border-width: 0;
  border-style: solid;
}
.react-flow__resize-control.line.left,
.react-flow__resize-control.line.right {
  width: 1px;
  transform: translate(-50%, 0);
  top: 0;
  height: 100%;
}
.react-flow__resize-control.line.left {
  left: 0;
  border-left-width: 1px;
}
.react-flow__resize-control.line.right {
  left: 100%;
  border-right-width: 1px;
}
.react-flow__resize-control.line.top,
.react-flow__resize-control.line.bottom {
  height: 1px;
  transform: translate(0, -50%);
  left: 0;
  width: 100%;
}
.react-flow__resize-control.line.top {
  top: 0;
  border-top-width: 1px;
}
.react-flow__resize-control.line.bottom {
  border-bottom-width: 1px;
  top: 100%;
}

/* client/react/flashcards/flashcard-home.css */
.flashcard-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 2rem;
  row-gap: 2rem;
}
@media (min-width: 640px) {
  .flashcard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .flashcard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.flashcard-card-wrapper {
  width: 100%;
}
.flashcard-card {
  width: 100%;
  display: block;
}
.flashcard-grid-container {
  display: grid !important;
  grid-auto-rows: minmax(0, 1fr) !important;
  align-items: stretch !important;
}
.flashcard-grid-item,
.flashcard-grid-item > button,
.flashcard-grid-item > .card-inner {
  height: 100% !important;
  min-height: 0 !important;
}
.flashcard-grid-item h3,
.flashcard-grid-item p {
  margin: 0 0 0.5rem 0 !important;
}

/* client/react/flashcards/flashcard.css */
.perspective-1000 {
  perspective: 1000px;
}
.transform-style-3d {
  transform-style: preserve-3d;
}
.backface-hidden {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.flip-card {
  transition: transform 0.6s;
  transform-style: preserve-3d;
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.flip-card.flipped {
  transform: rotateY(180deg);
}
.card-front {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: rotateY(0deg);
  z-index: 2;
  border-radius: 1rem;
}
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: rotateY(180deg);
  z-index: 1;
  border-radius: 1rem;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.slide-in {
  animation: slideIn 0.3s ease-out;
}
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}
.pulse-animation {
  animation: pulse 0.5s ease-in-out;
}
* {
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}
.dark {
  color-scheme: dark;
}
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 40;
  animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.modal-content {
  animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* client/react/notes/notes.css */
.notes-container * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.notes-container {
  font-family:
    "Segoe UI",
    Tahoma,
    Geneva,
    Verdana,
    sans-serif;
  line-height: 1.6;
  color: #333;
}
.notes-container .app-container {
  min-height: 100vh;
  padding: 20px;
}
.notes-container .navigation {
  max-width: 900px;
  margin: 0 auto 20px;
  background: white;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}
.notes-container .nav-title {
  color: #667eea;
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.8em;
}
.notes-container .nav-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}
.notes-container .nav-btn {
  padding: 12px 24px;
  font-size: 1em;
  border: 2px solid #667eea;
  background: white;
  color: #667eea;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}
.notes-container .nav-btn:hover {
  background: #f0f4ff;
  transform: translateY(-2px);
}
.notes-container .nav-btn.active {
  background: #667eea;
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
.notes-container .content-area {
  animation: fadeIn 0.5s ease-in;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.notes-container .container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.notes-container h1 {
  color: #667eea;
  text-align: center;
  margin-bottom: 10px;
  font-size: 2.5em;
  border-bottom: 3px solid #667eea;
  padding-bottom: 15px;
}
.notes-container .chapter-info {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
  font-size: 1.1em;
}
.notes-container h2 {
  color: #764ba2;
  margin-top: 35px;
  margin-bottom: 15px;
  font-size: 1.8em;
  border-left: 5px solid #764ba2;
  padding-left: 15px;
}
.notes-container h3 {
  color: #667eea;
  margin-top: 25px;
  margin-bottom: 10px;
  font-size: 1.4em;
}
.notes-container h4 {
  color: #555;
  margin-top: 15px;
  margin-bottom: 8px;
  font-size: 1.2em;
}
.notes-container .key-topics {
  background: #f0f4ff;
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
  border-left: 4px solid #667eea;
}
.notes-container .key-topics h3 {
  margin-top: 0;
  color: #667eea;
}
.notes-container .key-topics ul {
  margin-left: 25px;
  margin-top: 10px;
}
.notes-container .key-topics li {
  margin: 8px 0;
}
.notes-container .explanation {
  background: #fff9e6;
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
  border-left: 4px solid #ffa500;
}
.notes-container .explanation h3 {
  margin-top: 0;
  color: #ff8c00;
}
.notes-container .examples {
  background: #e8f5e9;
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
  border-left: 4px solid #4caf50;
}
.notes-container .examples h3 {
  margin-top: 0;
  color: #2e7d32;
}
.notes-container .example-box {
  background: white;
  padding: 15px;
  margin: 15px 0;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.notes-container .example-box strong {
  color: #2e7d32;
  display: block;
  margin-bottom: 10px;
  font-size: 1.1em;
}
.notes-container .example-box p strong {
  display: inline;
  color: #2e7d32;
}
.notes-container ul {
  margin-left: 30px;
  margin-top: 10px;
  margin-bottom: 15px;
}
.notes-container ol {
  margin-left: 30px;
  margin-top: 10px;
  margin-bottom: 15px;
}
.notes-container li {
  margin: 8px 0;
}
.notes-container .formula-box {
  background: #ffebee;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  border: 2px dashed #e53935;
  text-align: center;
  font-weight: bold;
  color: #c62828;
}
.notes-container .formula-box ul {
  text-align: left;
  margin-top: 10px;
}
.notes-container .important-note {
  background: #fff3e0;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  border-left: 4px solid #ff9800;
}
.notes-container .important-note strong {
  color: #ef6c00;
}
.notes-container .important-note p {
  margin: 8px 0;
}
.notes-container table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}
.notes-container th,
.notes-container td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: left;
}
.notes-container th {
  background-color: #667eea;
  color: white;
  font-weight: 600;
}
.notes-container tr:nth-child(even) {
  background-color: #f9f9f9;
}
.notes-container .tip-box {
  background: #e1f5fe;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  border-left: 4px solid #0288d1;
}
.notes-container .tip-box strong {
  color: #01579b;
}
.notes-container .tip-box ol {
  margin-top: 10px;
}
.notes-container code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: "Courier New", monospace;
}
.notes-container .footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid #eee;
  color: #666;
}
.notes-container .footer p {
  margin: 8px 0;
}
@media (max-width: 768px) {
  .notes-container .container {
    padding: 20px;
  }
  .notes-container h1 {
    font-size: 2em;
  }
  .notes-container h2 {
    font-size: 1.5em;
  }
  .notes-container h3 {
    font-size: 1.2em;
  }
  .notes-container .nav-buttons {
    flex-direction: column;
  }
  .notes-container .nav-btn {
    width: 100%;
  }
  .notes-container .navigation {
    padding: 15px;
  }
  .notes-container .nav-title {
    font-size: 1.4em;
  }
}
@media (max-width: 480px) {
  .notes-container .app-container {
    padding: 10px;
  }
  .notes-container .container {
    padding: 15px;
  }
  .notes-container h1 {
    font-size: 1.8em;
  }
  .notes-container .chapter-info {
    font-size: 0.95em;
  }
  .notes-container .key-topics,
  .notes-container .explanation,
  .notes-container .examples {
    padding: 15px;
  }
  .notes-container table {
    font-size: 0.9em;
  }
  .notes-container th,
  .notes-container td {
    padding: 8px;
  }
}
@media print {
  .notes-container {
    background: white;
  }
  .notes-container .app-container {
    padding: 0;
  }
  .notes-container .navigation {
    display: none;
  }
  .notes-container .container {
    box-shadow: none;
    padding: 20px;
  }
  .notes-container .example-box,
  .notes-container .key-topics,
  .notes-container .explanation,
  .notes-container .examples {
    page-break-inside: avoid;
  }
  .notes-container h2 {
    page-break-after: avoid;
  }
}
.notes-container {
  scroll-behavior: smooth;
}
.notes-container ::selection {
  background-color: #667eea;
  color: white;
}
.notes-container ::-moz-selection {
  background-color: #667eea;
  color: white;
}
