@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

body {
    background-color: #181818;
    color: #e0e0e0;
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 20px;
  }
  .chat-container, .review-container, .gravity-container, .chat-container, .connect-container, .fill-blank-container, .conjugation-container, .multiple-choice-container, .typing-container, .custom-quiz-container {
    background: #1e1e1e;
    border-radius: 10px;
    padding: 15px;
    margin: auto;
    max-width: 800px;
    margin-bottom: 20px;
    text-align: center; /* Ensures the content is centered */
  }
  .chat-display {
    height: 500px;
    overflow-y: auto;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 10px;
  }
  .chat-message {
    padding: 10px;
    margin: 5px 0;
    border-radius: 10px;
  }
  .chat-message.user {
    background-color: #3a3a3a;
    text-align: right;
  }
  .chat-message.bot {
    background-color: #2a2a2a;
    text-align: left;
  }
  .chat-input {
    display: flex;
  }
  .chat-input input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 16px;
    background: #2a2a2a;
    color: #e0e0e0;
  }
  .chat-input input:focus {
    outline: none;
    box-shadow: none;
  }
  .chat-input button {
    padding: 10px 20px;
    border: none;
    border-radius: 0 5px 5px 0;
    background-color: #4f2885;
    color: #fff;
    cursor: pointer;
  }
  .chat-input button:hover {
    background-color: #4f2885;
  }
  .chat-input button:focus {
    outline: 2px solid #4f2885;
    outline-offset: 2px;
  }
  a {
    color: #bb86fc;
    text-decoration: none;
  }
  a:hover {
    text-decoration: underline;
  }
  
  /* Menu Styles */
  .menu-container {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 3000;
  }
  
  .menu-button {
    background-color: #4f2885; /* Change this value to update the menu button color */
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .menu-button:hover {
    background-color: #642fa3;
  }
  
  .menu-dropdown {
    position: absolute;
    right: 0;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px;
    margin-top: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    min-width: 180px;
  }
  
  .menu-dropdown a {
    display: block;
    color: #e0e0e0;
    padding: 10px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s ease;
    margin-bottom: 2px;
  }
  
  .menu-dropdown a:hover {
    background-color: #3a3a3a;
    text-decoration: none;
  }
  
  /* Dark theme styles for the info modal */
  #infoModal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #2c2c2c !important; /* Dark grey background */
    color: #e0e0e0 !important;        /* Light text color */
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;       /* Limits height while allowing scrolling */
    padding: 20px;
    z-index: 1500;
    overflow-y: auto;       /* Enables vertical scrolling */
  }
  
  #infoModalContent {
    line-height: 1.6;
  }
  
  #infoModal h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
  }
  
  #infoModal p {
    margin: 15px 0;
  }
  
  #closeInfo {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 24px;
    color: #bbb;
    transition: color 0.3s ease;
  }
  
  #closeInfo:hover {
    color: #ddd;
  }
  
  /* Updated button styling for a modern, rounded look */
  button {
    border-radius: 8px;
    border: none;
    background-color: #4f2885;
    color: #fff;
    padding: 10px 16px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  button:hover {
    background-color: #642fa3;
  }
  button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79,40,133,0.5);
  }
  
  /* Optional: Styling for forms to create a modern card-like look */
  form {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #444;
  }
  
  /* New rule: Infomodal for Noun Conjugation (wider infobox) */
  #infomodal_nouns_conj {
    display: none; /* Hidden by default */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #2c2c2c !important;
    color: #e0e0e0 !important;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 1000px; /* Increased width for noun conjugation modal */
    max-height: 80vh;       /* Limits height while allowing scrolling */
    padding: 20px;
    z-index: 1500;
    overflow-y: auto;       /* Enables vertical scrolling */
  }
  
  /* Anki-style Streak Heatmap Styles */
  .user-streak-container {
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: visible; /* Ensures popups can display outside the container */
  }
  
  .user-streak-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
  }
  
  .anki-heatmap {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: visible; /* Changed from auto to visible to allow popups to show fully */
  }
  
  .heatmap-months {
    display: grid;
    grid-template-rows: 20px;
    grid-template-columns: 30px repeat(53, 15px);
    margin-left: 30px;
  }
  
  .month-label {
    font-size: 11px;
    color: #666;
    text-align: center;
  }
  
  .heatmap-days {
    display: grid;
    grid-template-columns: 30px;
    grid-auto-rows: 15px;
    position: absolute;
  }
  
  .day-label {
    font-size: 10px;
    color: #666;
    display: flex;
    align-items: center;
    height: 15px;
  }
  
  .heatmap-grid {
    display: grid;
    grid-template-rows: repeat(7, 15px);
    grid-template-columns: 30px repeat(53, 15px);
    gap: 2px;
    margin-top: 2px;
  }
  
  .heatmap-square {
    width: 13px;
    height: 13px;
    border-radius: 2px;
    transition: all 0.2s ease;
    cursor: pointer;
  }
  
  .heatmap-square:hover {
    z-index: 2;
  }
  
  .out-of-range {
    background-color: transparent;
  }
  
  .no-points {
    background-color: #2d2d2d;
  }
  
  .has-points-1 {
    background-color: #c6e48b;
  }
  
  .has-points-2 {
    background-color: #7bc96f;
  }
  
  .has-points-3 {
    background-color: #49af5d;
  }
  
  .has-points-4 {
    background-color: #2e8840;
  }
  
  .has-points-5 {
    background-color: #8585fd;
  }
  
  .heatmap-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
    gap: 10px;
  }
  
  .legend-item {
    display: flex;
    align-items: center;
    font-size: 12px;
    margin-right: 10px;
  }
  
  .legend-item .square {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 5px;
  }
  
  .legend-item .no-points {
    background-color: #ebedf0;
  }
  
  .legend-item .has-points-1 {
    background-color: #c6e48b;
  }
  
  .legend-item .has-points-2 {
    background-color: #7bc96f;
  }
  
  .legend-item .has-points-3 {
    background-color: #49af5d;
  }
  
  .legend-item .has-points-4 {
    background-color: #2e8840;
  }
  
  .legend-item .has-points-5 {
    background-color: #8585fd;
  }
  
  /* Clean, Minimal Streak Heatmap Styles */
  .streak-heatmap-container {
    margin: 30px auto;
    max-width: 95%;
    background-color: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: visible; /* Ensures popups can display outside the container */
  }
  
  .streak-heatmap {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: 100%;
    padding: 10px 0;
    overflow: visible; /* Changed from auto to visible to allow popups to show fully */
  }
  
  .heatmap-row {
    display: flex;
    gap: 3px;
  }
  
  .heatmap-square {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    transition: box-shadow 0.15s ease;
    position: relative;
    cursor: pointer;
  }
  
  .heatmap-square:hover {
    z-index: 10;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  }
  
  .heatmap-square.today {
    border: 1.5px solid #ffffff;
    box-sizing: border-box;
  }
  
  .empty, .out-of-range {
    background-color: transparent;
    cursor: default;
  }
  
  .no-points {
    background-color: #2d2d2d;
  }
  
  /* Removed individual has-points-N classes as we're now using inline styles */
  
  .year-label {
    font-size: 18px;
    font-weight: 500;
    color: #e0e0e0;
    margin-top: 10px;
    text-align: center;
  }
  
  /* Heatmap Popup Styles */
  .heatmap-popup {
    position: absolute;
    background-color: #2c2c2c;
    color: #ffffff;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 12px;
    min-width: 120px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    z-index: 100;
    pointer-events: auto;
    text-align: center;
    line-height: 1.4;
    border: 1px solid #4a4a8a;
  }
  
  .heatmap-popup strong {
    display: block;
    margin-bottom: 4px;
    color: #8585fd;
  }
  
  .heatmap-popup.hidden {
    display: none;
  }
  