* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
  background: #011627; /* Night Owl base */
  color: #d6deeb; /* Soft light blue text */
    font-family: 'Fira Code', monospace;
    display: flex;
    flex-direction: column;
}

#problemTitle {
    background: #011221; /* Slightly darker */
    padding: 12px 20px;
    font-weight: bold;
    font-size: 1.2em;
    
}

#controls {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background: #011221; /* Slightly darker */
    gap: 10px;
    border-bottom: 1px solid #333;
}

select, button {
    padding: 6px 12px;
    background: #3c3c3c;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

button:hover, select:hover {
    background: #103f5b;
}

.section-container {
    position: relative;
    flex: 1;
}

#editor {
    height: 70vh;
    width: 100%;
    margin-top: 5px;
    /* Prevent overlap with top-right buttons */

}
#inputArea::-webkit-scrollbar,
#output::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

#inputArea::-webkit-scrollbar-thumb,
#output::-webkit-scrollbar-thumb {
   background-color: #1e2d3d; 
  border-radius: 3px;
}

.font-controls {
    position: absolute;
    top: 6px;
    right: 10px;
    display: flex;
    gap: 3px;
    
}

.font-btn {
    font-size: 12px;
    padding: 2px 6px;
    background: #444;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.font-btn:hover {
    background: #666;
}

#io-section {
    display: flex;
    flex-direction: row;
    height: 30vh;
    padding: 8px;
    gap: 10px;
}

#inputContainer, #outputContainer {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;

}

#inputArea, #output {
    flex: 1;
    padding: 32px 12px 12px 8px;
    background: #011221;
    color: #addb67;
    font-family: 'Fira Code', monospace;
    border: 1px solid #425569;
    border-radius: 5px;
    font-size: 16px;
    resize: none;
    overflow: auto;
    font-weight: normal;
    }

#output {
    white-space: pre-wrap;
}

.font-controls {
  position: absolute;
  top: 6px;
  right: 10px;
  display: flex;
  gap: 6px;
  z-index: 10;
}
.font-btn, .copy-btn {
  font-size: 12px;
  padding: 2px 6px;
  background: #444;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}
.font-btn:hover, .copy-btn:hover {
  background: #666;
}

.clr-str {
    color: #ff9800;
    
}
#top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #011221; /* Slightly darker */
  padding: 2px ;
  border-bottom: 1px solid #444;
}

#problemTitle {
  font-weight: bold;
  font-size: 0.8em;
  color: #f0f0f0;
  padding: 10px;

}

#controls {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-right: 5px;
  border: none;
  background: #282c34;
  padding: 2px;
}

.font-btn, .copy-btn {
  font-size: 10px;
  padding: 5px 8px;
  background: #1d3b53;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  color: white;
}

.font-btn:hover, .copy-btn:hover {
  background: #666;
}

select, button {
   background: #1d3b53;
  color: #d6deeb;
  border: 1px solid #1e2d3d;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 10px;
  cursor: pointer;
  border: none;
}
#resizer {
  height: 5px;
  background: #1d3b53;
  cursor: row-resize;
  width: 100%;
}
body {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#editor {
  height: 60vh;
  min-height: 100px;
  max-height: 80vh;
  width: 100%;
}

#resizer {
  height: 6px;
  background: #4e6d86;
  cursor: row-resize;
}

#io-section {
  flex: 1;
  min-height: 100px;
  max-height: 70vh;
  overflow: auto;
  background: #0a1824;
}
#editor {
  touch-action: pinch-zoom !important;
  -ms-touch-action: pinch-zoom;
  overscroll-behavior: contain;
}
#inputArea,
#output {
  font-size: 14px;
  line-height: 1.4;
}

/* Hide element */
.hidden {
  display: none !important;
}

/* Maximize editor */
.maximize-editor {
  height: calc(100vh - 50px); /* Full height minus top bar */
  max-height: none !important;
}

/* Maximize IO */
.maximize-io {
  height: calc(100vh - 50px);
  max-height: none !important;
  flex: unset;
  display: flex;
  flex-direction: row;
}
.maximize-editor {
  height: calc(100vh - 50px) !important;  /* 50px is approx top bar */
  max-height: none !important;
  min-height: unset !important;
}
/* Container for checkbox */
.toggle-container {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  cursor: pointer;
}

/* Hide default checkbox */
.toggle-container input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.custom-toggle {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #888;
  border-radius: 30px;
  transition: 0.3s;
}

/* The circle inside the slider */
.custom-toggle::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

/* When checked */
.toggle-container input:checked + .custom-toggle {
  background-color: #4caf50;
}

.toggle-container input:checked + .custom-toggle::before {
  transform: translateX(18px);
}
@media screen and (max-width: 1100px) {
  #top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #011221;
  padding: 2px;
  border-bottom: 1px solid #444;

  /* allow wrapping for small screens */
  flex-wrap: wrap;
}

  #problemTitle {
    font-size: 14px;
    padding: 6px 8px;
    text-align: center;
   
  }

  #controls {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 4px 0;
    gap: 6px;
    scrollbar-width: none; /* Firefox */
  }

  #controls::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }

  #controls button,
  #controls select,
  #controls label {
    flex: 0 0 auto;
    font-size: 12px;
    padding: 6px 20px;
    min-width: unset;
  }

  #controls label.toggle-container {
    margin-left: auto;
  }
}
#problemTitle {
  font-weight: bold;
  font-size: 0.8em;
  color: #f0f0f0;
  padding: 10px;

  /* Add these for ellipsis */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
}
.toggle-container {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  margin-left: 8px;
  flex-shrink: 0;
}

.toggle-container input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
}

.custom-toggle {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #3a3f4b;
  border-radius: 20px;
  transition: background-color 0.2s ease;
  border: 1px solid #5a6b7d;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.2);
}

.custom-toggle::before {
  content: "";
  position: absolute;
  height: 14px;
  width: 14px;
  left: 3px;
  top: 2.5px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.25s ease;
}

.toggle-container input:checked + .custom-toggle {
  background-color: #4caf50;
  border-color: #3e8e41;
}

.toggle-container input:checked + .custom-toggle::before {
  transform: translateX(16px);
}
#controls {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  justify-content: flex-start;
  padding: 4px 0;
  gap: 6px;
  scrollbar-width: none; /* Firefox */
}
#controls {
  scroll-behavior: smooth;
  background-color: #011221; /* Slightly darker */
}

#controls:hover {
  scrollbar-width: thin; /* Firefox */
}

#controls::-webkit-scrollbar {
  height: 1px;
}

#controls::-webkit-scrollbar-thumb {
  background-color: #2f3b4b;
  border-radius: 4px;
}
button:hover{
    background: #666;
}
.mobile-only-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
  padding: 6px 12px;
  font-size: 14px;
  background: #4caf50;
  border: none;
  color: white;
  border-radius: 4px;
  display: none; /* shown only on mobile */
}
.gemini-box {
  background-color: #1e1e1e;
  color: #e0e0e0;
  padding: 1em;
  margin-top: 1em;
  border-left: 5px solid #00c6ff;
  border-radius: 10px;
  font-family: "Fira Code", monospace;
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 0.95rem;
  overflow-x: auto;
}
#aiResponse code {
  background-color: #1e1e1e;
  padding: 2px 4px;
  border-radius: 4px;
  font-family: monospace;
  color: #ffb86c;
}
#aiResponse pre {
  background-color: #1e1e1e;
  padding: 10px;
  border-radius: 6px;
  overflow-x: auto;
  color: #f8f8f2;
}
/* Overlay covers page */
#chat-overlay {
  display: none;
  position: fixed; left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.22);
  z-index: 102;
}

/* Sliding Gemini Chat Panel */
#gemini-chat-panel {
  position: fixed;
  top: 0; right: 0; height: 100vh;
  width: 370px;
  max-width: 99vw;
  background: #232742;
  z-index: 103;
  box-shadow: -2px 0 22px 0 rgba(0,0,0,0.19);
  border-left: 2px solid #353b4d;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .29s cubic-bezier(.35,1.4,.42,1);
}
#gemini-chat-panel.open {
  display: flex !important;
  transform: translateX(0);
}
body.chat-open #chat-overlay { display: block; }
body.chat-open #gemini-chat-panel { display: flex !important; }
body.chat-open #editor,
body.chat-open #io-section {
  transition: margin .3s, width .3s;
  margin-right: 370px !important;
}
@media (max-width: 540px) {
  #gemini-chat-panel { width: 99vw; }
  body.chat-open #editor, body.chat-open #io-section { margin-right: 0 !important;}
}

/* Chat bubble style for Gemini/AI */
.chat-bubble.gemini {
  background: #242b38;
  color: #edeae3;
  border-radius: 16px 16px 16px 3px;
  margin-bottom: 16px;
  box-shadow: 0 2px 7px #0002;
  line-height: 1.7;
  padding: 14px;
  font-size: 16px;
  font-family: 'Segoe UI', 'Inter', sans-serif;
  position: relative;
  max-width: 97%;
  overflow-x: auto;
}
.chat-bubble.user {
  background: #2b498d;
  color: #fff;
  border-radius: 16px 16px 2px 16px;
  margin-bottom: 15px;
  padding: 13px;
  line-height: 1.7;
  font-size: 16px;
  font-family: inherit;
  max-width: 97%;
}

.chat-bubble code, .chat-bubble pre {
  font-family: 'JetBrains Mono', 'Fira Mono', 'Consolas', 'Menlo', monospace;
  font-size: 15px;
  background: #011627!important;
  color: #ffeb95 !important;
}

.chat-bubble pre {
  background: #011627 !important;
  color: #ffe491;
  padding: 13px 15px;
  border-radius: 9px;
  margin: 22px 0 18px 0;
  white-space: pre-wrap;
  overflow-x: auto;
  box-shadow: 0 2px 6px #0002;
}
#gemini-chat-panel {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: 370px;
  max-width: 99vw;
  z-index: 104;
  /* ... */
  display: flex;
  flex-direction: column;
  /* ... */
}

.gemini-chat-header { /* ... */ }
.gemini-chat-body {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  padding: 10px 17px 4px 16px;
  background: #20223b;
  display: flex;
  flex-direction: column;
}
.gemini-chat-input { /* ... */ }
#gemini-chat-panel {
  position: fixed;
  top: 0; right: 0; height: 100vh;
  width: 85vw;
  display: flex;
  flex-direction: column;
}

.gemini-chat-body {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 17px 4px 16px;
  background: #20223b;
  display: flex;
  flex-direction: column;
  gap: 0.6em; /* Space between messages */
}

/* Each bubble/message should NOT have scroll */
.chat-bubble {
  max-width: 93%;
  /* No overflow-y here! */
  word-break: break-word;
  /* More styling as desired */
}

.chat-bubble pre, .chat-bubble code {
  /* For long code, allow wrapping or horizontal scroll */
  white-space: pre-wrap;        /* or pre-line, or use pre with overflow-x */
  overflow-x: auto;
}
.chat-bubble,
.chat-bubble.user,
.chat-bubble.gemini,
.gemini-box,
pre {
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
}
#gemini-chat-panel {
  display: flex;
  flex-direction: column;
  height: 100vh;
  /* ...rest of your styles... */
}

.gemini-chat-body {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 17px 4px 16px;
  background: #20223b;
  display: flex;
  flex-direction: column;
  gap: 0.7em; /* space between messages */
}
.chat-bubble {
  /* your style: padding, color, border-radius, etc. */
  word-break: break-word;
  /* No height, max-height, or overflow here! */
}
.gemini-chat-input {
  display: flex;
  gap: 7px;
  align-items: flex-end; /* <- this keeps button's height natural */
}
.gemini-chat-input button {
  /* Set a max-height so it never grows beyond a reasonable size */
  height: 38px;
  max-height: 38px; 
  align-self: flex-end;
  padding: 8px 15px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
}
.gemini-chat-input {
  display: flex;
  gap: 8px;
  align-items: center; /* Center button vertically with textarea */
}

.gemini-chat-input textarea {
  flex: 1 1 auto;
  min-height: 38px;
  max-height: 110px;
  resize: vertical;
  padding: 8px 12px;
  font-size: 15px;
  line-height: 1.4;
  border-radius: 5px;
  border: 1px solid #31364d;
  background: #23263a;
  color: #fff;
  overflow-y: auto;
  /* Optional smooth height transition */
  transition: height 0.15s ease;
}

.gemini-chat-input button {
  height: 40px;          /* Slightly taller than textarea minimum */
  padding: 0 18px;
  font-size: 15px;
  border-radius: 5px;
  background: #3f8ecf;
  color: #fff;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  align-self: center;    /* make sure it stays vertically centered */
  transition: background 0.2s ease;
}

.gemini-chat-input button:hover {
  background: #2a6ab3;
}
.gemini-chat-input button {
  width: 44px;
  height: 40px;
  min-width: 40px;
  min-height: 38px;
  padding: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3f8ecf;
  border: none;
  transition: background .22s;
  font-size: 21px;
}

.gemini-chat-input button:hover, .gemini-chat-input button:focus {
  background: #2360ab;
}
.data-label {
  margin-top: 8px;
  margin-bottom: 2px;
  font-size: 13px;
  color: #ffe082;
  font-weight: bold;
}
.chat-bubble pre {
  background: #011627;
  color: #ffe491;
  padding: 13px 15px;
  border-radius: 9px;
  margin: 0 0 12px 0;
  white-space: pre-wrap;
  overflow-x: auto;
}
.code-block-wrap {
  position: relative;
  margin-bottom: 10px;
}

.copy-code-btn, .send-to-editor-btn {
  position: absolute;
  top: 10px;
  right: 11px;
  background: #232733;
  color: #ffe082;
  border: none;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  opacity: .8;
  z-index: 3;
  transition: background .18s;
}
.send-to-editor-btn {
  right: 70px;
  background: #3f8ecf;
  color: #fff;
}
.copy-code-btn:hover, .send-to-editor-btn:hover { opacity: 1; background: #232b44; }
.gemini-response {
  white-space: pre-line;
}
.gemini-response {
  background-color: #19263a;        /* darker blue background */
  color: #eaeaea;                   /* light text color */
  font-family: 'Fira Code', monospace;
  font-size: 1rem;                  /* comfortable font size */
  line-height: 1.6;                 /* more breathing room between lines */
  padding: 1.2em 1.5em;
  border-radius: 10px;
  margin: 1.5em 0;
  white-space: pre-line;
  box-shadow: 0 1px 10px rgba(8, 14, 34, 0.1);
}

/* Paragraph spacing inside response */
.gemini-response p {
  margin-top: 1em;
  margin-bottom: 1em;
  text-indent: 1.2em;
}

/* Lists styling */
.gemini-response ul,
.gemini-response ol {
  margin: 1.3em 0 1.3em 2em;
  padding-left: 1em;
  line-height: 1.7;
}

/* List items spacing */
.gemini-response li {
  margin-bottom: 0.7em;
  font-size: 1.03em;
  padding-left: 0.2em;
  list-style-position: outside;
}

/* Inline code */
.gemini-response code {
  background: #232f4b;
  color: #ffcb6b;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Fira Mono', monospace;
  word-break: break-word;
}

/* Code blocks */
.gemini-response pre {
  background: #101830;
  color: #b2c2f7;
  border-radius: 7px;
  margin-top: 0px;
  margin-bottom: 0px;
  padding: 1.3em 1.2em;
  overflow-x: auto;
  font-size: 1em;
  line-height: 1.6;
  font-family: 'JetBrains Mono', monospace;
  box-shadow: 0 2px 8px rgba(8, 14, 34, 0.13);
}
.gemini-response ul {
  list-style: none; /* Remove default bullets */
  padding-left: 0;
  margin: 1.2em 0 1.2em 0;
}

.gemini-response ul li {
  position: relative;
  padding-left: 2.2em;
  margin-bottom: 0.85em;
  font-size: 1.08em;
  line-height: 1.7;
  background: transparent;
}

.gemini-response ul li::before {
  content: '';
  position: absolute;
  left: 0.5em;
  top: 0.87em;
  width: 1em;
  height: 1em;
  background: linear-gradient(135deg, #ffe082, #22d3ee 90%);
  border-radius: 50%;
  box-shadow: 0 1px 5px rgba(34, 211, 238, 0.1);
  display: inline-block;
  transition: background 0.2s;
}
.gemini-response ul li:hover::before {
  background: linear-gradient(135deg, #fd1d1d, #fcb045 70%);
  box-shadow: 0 2px 10px rgba(253, 29, 29, 0.16);
}
.gemini-response ul li:hover {
  background: rgba(34,211,238,0.06);
  border-radius: 6px;
}
.gemini-response {
  font-family: 'Inter', 'Segoe UI', 'Fira Code', monospace;
  font-size: 1.1em;
  color: #f1f6fa;
  background: #182132;
  padding: 1.3em 2em;
  border-radius: 12px;
  margin-top: 1em;
  letter-spacing: 0.01em;
}

.gemini-response ul li {
  margin-bottom: 1.1em;
}
.gemini-response ul {
  list-style: none;
  padding-left: 0;
  margin: 1.7em 0 1.7em 0.3em;
}

/* Modern, soft bullet */
.gemini-response ul li {
  position: relative;
  padding-left: 2.2em;
  margin-bottom: 0.4em;
  font-size: 1em;
  background: transparent;
  line-height: 1.85;
  border-radius: 9px;
  transition: background 0.15s;
}

.gemini-response ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 1.05em;
  height: 1.05em;
  background: linear-gradient(120deg, #3a86ff, #00c6ff 80%);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(58, 134, 255, 0.14);
  display: inline-block;
  transition: background 0.2s, box-shadow 0.2s;
}

/* Optional: Add gently animated highlight on hover/focus for interactivity */
.gemini-response ul li:hover,
.gemini-response ul li:focus-within {
  background: rgba(94,213,255, 0.07);
}

.gemini-response ul li:hover::before,
.gemini-response ul li:focus-within::before {
  background: linear-gradient(120deg, #ffbe0b, #ff006e 90%);
  box-shadow: 0 3px 14px rgba(255, 190, 11, 0.19);
}
.gemini-response ul {
  list-style: none;
  padding-left: 0;
  margin: 1em 0 1em 0.8em;
}

.gemini-response ul li {
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 0.38em;
  font-size: 1.05em;
  line-height: 1.6;
  /* keep your custom bullet ::before here */
}
.gemini-response ul,
.gemini-response ol {
  margin: 0.8em 0 0.8em 1.5em;
  padding-left: 1em;
  line-height: 1.5;
}
.gemini-response ul li:last-child {
  margin-bottom: 0;
}
.gemini-response ul {
  list-style: none;
  padding-left: 0;
  margin: 1em 0 1em 0.8em;
}

.gemini-response ul li {
  position: relative;
  padding-left: 2em;      /* room for the arrow */
  margin-bottom: 0px;
  font-size: 1.07em;
  line-height: 1.5;
  padding-top: 0.5em;
  padding: 0.5em;
  margin-top: 0px;
}

.gemini-response ul li::before {
  content: '➔';              /* Unicode arrow */
  position: absolute;
  left: 0.1em;
  top: 0.08em;
  font-size: 1.18em;
  color: #38bdf8;            /* Tailwind cyan, change as desired */
  font-family: inherit;
  font-weight: bold;
  transition: color 0.2s;
}

.gemini-response ul li:hover::before {
  color: #fbbe24;            /* Gold on hover, for interactivity */
}
.gemini-response ul {
  list-style: none;
  padding-left: 0;
  margin: 1em 0 1em 0.8em;
}

.gemini-response ul li {
  position: relative;
  padding-left: 2em;      /* Space for the arrow */
  margin-bottom: 0.4em;
  font-size: 0.9em;
  line-height: 1.5;
}

.gemini-response ul li::before {
  content: '➔';              /* Unicode arrow */
  position: absolute;
  left: 0.1em;
  top: 0.08em;
  font-size: 1.18em;
  color: #38bdf8;
  font-family: inherit;
  font-weight: bold;
  background: none;           /* Ensure no background gradient */
  box-shadow: none;           /* Remove shadow if left from before */
  border-radius: 0;           /* Cancel any previous bullet shape */
  width: auto; height: auto;  /* Reset from previous styles */
  transition: color 0.2s;
}

.gemini-response ul li:hover::before {
  color: #fbbe24;
}
.gemini-response ul li:hover {
  background: rgba(94,213,255, 0.07);
  border-radius: 6px;
}
.gemini-response ul li:hover::before,
.gemini-response ul li:focus-within::before {
  background: linear-gradient(120deg, #ffbe0b, #ff006e 90%);
  /* May cause colored/gradient square if content is not '' */
  box-shadow: 0 3px 14px rgba(255, 190, 11, 0.19);
}
.gemini-response ul li::before {
  content: '➔';
  position: absolute;
  left: 0.1em;
  top: 0.08em;
  font-size: 1.18em;
  color: #38bdf8;
  font-family: inherit;
  font-weight: bold;
  background: none !important;     /* REMOVE any gradient/color */
  box-shadow: none !important;     /* REMOVE glow or shape */
  border-radius: 0 !important;     /* REMOVE roundness from earlier styles */
  width: auto; height: auto;
  transition: color 0.2s;
}

.gemini-response ul li:hover::before,
.gemini-response ul li:focus-within::before {
  color: #fbbe24;                  /* Only color changes */
  background: none !important;     /* Ensures background doesn't show */
  box-shadow: none !important;
}
.chat-options {
  margin: 8px 16px;
  display: flex;
  gap: 16px;
  align-items: center;
  color: #d6deeb;
}

.modern-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.11em;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.modern-checkbox input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.checkmark {
  width: 1.2em;
  height: 1.2em;
  border: 2px solid #82aaff;
  background: #18233a;
  border-radius: 7px;
  display: inline-block;
  box-sizing: border-box;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
  box-shadow: 0 1px 8px #0002;
}

.modern-checkbox input[type="checkbox"]:focus + .checkmark {
  outline: 2px solid #ffd24c;
  outline-offset: 2px;
}
.modern-checkbox input[type="checkbox"]:hover + .checkmark {
  border-color: #ffd24c;
}

.checkmark::after {
  content: "";
  position: absolute;
  left: 0.30em;
  top: 0.04em;
  width: 0.34em;
  height: 0.65em;
  border-right: 3px solid #ffd24c;
  border-bottom: 3px solid #ffd24c;
  border-radius: 1px;
  opacity: 0;
  transform: scale(0.55) rotate(18deg);
  transition: all 0.16s cubic-bezier(.69,1.44,.34,1.18);
}

.modern-checkbox input[type="checkbox"]:checked + .checkmark {
  background: rgb(14, 42, 78);
  border-color: #ffd24c;
}
.modern-checkbox input[type="checkbox"]:checked + .checkmark::after {
  opacity: 1;
  transform: scale(1) rotate(43deg);
}

.label-text {
  color: #d6deeb;
  transition: color 0.16s;
}

.modern-checkbox:hover .label-text {
  color: #ffd24c;
}
.chat-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #131c35;
  padding: 0.5em 1.5em 0.5em 1em;
  box-shadow: 0 2px 8px #00102708;
  gap: 1em;
  border-radius: 10px 10px 0 0;
  min-height: 56px;
  margin-bottom: 0.4em;
}

.chat-checkboxes {
  display: flex;
  align-items: center;
  gap: 1.2em;
  flex-wrap: wrap;
}

.chat-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
}

/* Clear Chat button styling */
#clearGeminiChatBtn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: inherit;
  background: linear-gradient(120deg, #344e7a 70%, #00c6ff 100%);
  color: #fffbe8;
  border: none;
  padding: 0.45em 1.2em;
  border-radius: 7px;
  font-size: 0.7em;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px #00102722;
  transition: background 0.17s, color 0.13s, transform 0.11s;
  outline: none;
  margin-right: 1em;
}
#clearGeminiChatBtn:hover, #clearGeminiChatBtn:focus {
  background: linear-gradient(130deg, #ffd24c 40%, #e10050 100%);
  color: #231c17;
  transform: translateY(-2px) scale(1.04);
}

@media (max-width: 650px) {
  .chat-options {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6em;
    padding: 0.6em 1em 0.6em 1em;
  }
  .chat-actions {
    margin-left: 0;
    justify-content: flex-end;
  }
  .chat-checkboxes {
    flex-wrap: wrap;
    gap: 0.8em;
  }
}
.chat-prompts {
  display: flex;
  gap: 0.7em;
  margin-bottom: 0.5em;
  flex-wrap: wrap;
}

.prompt-btn {
  background: linear-gradient(90deg, #313e59, #415d86);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 4px 16px;
  font-size: 0.99em;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px #0010270c;
  transition: background 0.18s, color 0.16s;
}
.prompt-btn:hover, .prompt-btn:focus {
  background: linear-gradient(90deg, #ffe082 60%, #82aaff 100%);
  color: #1d2233;
  outline: none;
}
.chat-prompts {
  display: flex;
  gap: 0.7em;
  margin-bottom: 0.6em;
  flex-wrap: wrap;
}

.prompt-btn {
  background: linear-gradient(90deg, #c792ea, #82aaff);
  color: #000000;
  border: none;
  border-radius: 24px;
  padding: 0.45em 1.35em;
  font-size: 1em;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 2px 8px #16103218;
  transition: background 0.16s, color 0.16s, transform 0.1s;
  outline: none;
  margin-bottom: 0.18em;
  position: relative;
}

.prompt-btn:hover, .prompt-btn:focus {
  background: linear-gradient(90deg, #ffe082, #82aaff);
  color: #222d3d;
  transform: translateY(-2px) scale(1.045);
  box-shadow: 0 4px 22px #c792ea33, 0 1.5px 10px #0111d141;
}

.prompt-btn:active {
  background: linear-gradient(90deg, #bd6ffb, #307cf6 85%);
  color: #fff;
  transform: scale(0.97);
  box-shadow: 0 1px 5px #1d2232;
}


.user-avatar {
  width: 2em;
  height: 2em;
  border-radius: 50%;
  background: #181b22;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Add default transition */
  transition: box-shadow 0.3s;
}

/* Avatar glows green for online */
.user-badge-simple.online .user-avatar {
  box-shadow: 0 0 14px 3px #77e86baa;
}

/* Avatar glows red for offline */
.user-badge-simple.offline .user-avatar {
  box-shadow: 0 0 14px 3px #fa5555bb;
}


.user-badge-simple:hover, .user-badge-simple:focus-within {
  box-shadow: 0 6px 28px 0 rgba(76,150,204,0.22);
}

.user-avatar {
  width: 2.3em;
  height: 2.3em;
  min-width: 2.3em;
  min-height: 2.3em;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #31386a 70%, #202338 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 0 2px #384cb799, 0 2px 8px #2d314d44;
  transition: box-shadow 0.18s;
}

.user-badge-simple:hover .user-avatar {
  box-shadow: 0 0 0 3px #47e39399, 0 4px 18px #2d314d55;
}

.user-avatar svg {
  width: 1em;
  height: 1.4em;
  color: #a8bbdd;
  stroke-width: 2.3;
  opacity: 0.96;
}


/* Optional: Responsive tweak for mobile */
@media (max-width: 500px) {
  .user-badge-simple {
    font-size: 0.97rem;
    padding: 0.41em 0.85em 0.41em 0.6em;
  }

  .user-avatar {
    width: 2em;
    height: 2em;
    min-width: 2em;
    min-height: 2em;
  }
}


.user-avatar {
  width: 2.3em;
  height: 2.3em;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #31386a 68%, #202338 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Start with green pulse */
  box-shadow: 0 0 0 2px #49fa9f70;
  animation: pulseOnline 2.1s infinite cubic-bezier(.4,0,.6,1);
  transition: box-shadow 0.19s;
}

@keyframes pulseOnline {
  0%, 100% {
    box-shadow: 0 0 0 2px #84ffc077, 0 0 14px 4px #49fa9f44;
  }
  50% {
    box-shadow: 0 0 0 5px #6affd699, 0 0 26px 12px #9affc495;
  }
}

/* Add this class via JS when offline */
.user-badge-simple.offline .user-avatar {
  animation: pulseOffline 2.1s infinite cubic-bezier(.4,0,.6,1);
  box-shadow: 0 0 0 2px #fa555570;
}

@keyframes pulseOffline {
  0%, 100% {
    box-shadow: 0 0 0 2px #fa555580, 0 0 12px 2px #fa555540;
  }
  50% {
    box-shadow: 0 0 0 5px #ff797980, 0 0 22px 9px #ffafaf75;
  }
}

.user-avatar svg {
  width: 1.4em;
  height: 1.4em;
  color: #a8bbdd;
  stroke-width: 2.3;
  opacity: 0.95;
}

.username {
  font-weight: 600;
  letter-spacing: 0.012em;
  color: #fbfcff;
  padding-left: 0.12em;
  text-shadow: 0 1px 3px #0003;
}
@keyframes pulseOnline {
  0%, 100% {
    box-shadow: 0 0 0 1px #84ffc022, 0 0 6px 2px #49fa9f22;
  }
  50% {
    box-shadow: 0 0 0 3px #6affd633, 0 0 12px 5px #9affc422;
  }
}

@keyframes pulseOffline {
  0%, 100% {
    box-shadow: 0 0 0 1px #fa555522, 0 0 6px 1px #fa555520;
  }
  50% {
    box-shadow: 0 0 0 3px #ff797933, 0 0 11px 4px #ffafaf31;
  }
}

.user-avatar {
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: #181b22;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: box-shadow 0.17s;
}

.user-avatar svg {
  width: 0.8em;
  height: 0.8em;
  color: #a8bbdd;
  stroke-width: 2;
}
.gemini-response ul{
  margin-bottom: 0px;
  margin-top: 1em;
}
.gemini-response ul li{
  line-height: 2em;
  
}
.save-gemini-response-btn {
  float: right;
}
.save-gemini-response-btn {
  padding: 0.7em 1.4em;
  background: transparent;
  border: 2px solid #4f9cff;
  border: 2px solid #4f9cff;
  border-radius: 0.7em;
  font-size: 1rem;
  font-weight: 600;
  transition: 
    background 0.2s,
    color 0.22s,
    transform 0.14s;
  cursor: pointer;
}

.save-gemini-response-btn:hover, 
.save-gemini-response-btn:focus {
  background: #4f9cff;
  color: #fff;
  transform: scale(1.03);
}
#top-bar {
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
}
#problemTitle {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
#controls-wrapper {
  flex: 0 0 auto !important;
  min-width: max-content !important;
  display: flex !important;
}
#controls {
  display: flex !important;
  flex-wrap: nowrap !important;
  min-width: max-content !important;
  width: auto !important;
  flex: 0 0 auto !important;
}
@media (max-width: 768px) {
  #controls {
    overflow-x: auto !important;
    width: 100vw !important;
    min-width: 0 !important;
  }
  #controls::-webkit-scrollbar {
    display: none !important;
  }
}
