/* Google Gemini AI integration styles for Abstract Institute */

/* Remove default focus outlines */
.gemini-ai-button,
.gemini-ai-login-button,
.gemini-ai-notification-close,
.gemini-ai-error-close,
.gemini-ai-remove-image,
.gemini-ai-container button,
.gemini-ai-container a,
.gemini-ai-container input,
.gemini-ai-container textarea {
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}

/* AI Button */
.gemini-ai-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gradient);
  border: none;
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  cursor: pointer;
  z-index: 99;
  transition: transform 0.3s, box-shadow 0.3s;
  animation: pulse 2s infinite;
  -webkit-tap-highlight-color: transparent;
}

.gemini-ai-button:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.gemini-ai-button:active {
  transform: scale(0.97);
}

@keyframes pulse {
  0% {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(45, 212, 191, 0.7);
  }
  70% {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), 0 0 0 10px rgba(45, 212, 191, 0);
  }
  100% {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(45, 212, 191, 0);
  }
}

/* Login Notification */
.gemini-ai-login-notification {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 340px;
  background: var(--glass-dark);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  z-index: 100;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: none;
  overflow: hidden;
  animation: fadeInUp 0.3s ease-out forwards;
  font-family: 'Google Sans', 'Roboto', sans-serif;
}

.gemini-ai-login-content {
  padding: 24px;
  position: relative;
}

.gemini-ai-login-content h3 {
  margin: 0 0 15px 0;
  color: var(--light);
  font-size: 20px;
  font-weight: 500;
  font-family: 'Google Sans', sans-serif;
  letter-spacing: -0.01em;
}

.gemini-ai-login-content p {
  margin: 0 0 24px 0;
  color: var(--light);
  font-size: 14px;
  line-height: 1.5;
  font-family: 'Google Sans', 'Roboto', sans-serif;
  opacity: 0.9;
}

.gemini-ai-login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 20px;
  background: #fff;
  color: #444;
  border: none;
  border-radius: 8px;
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gemini-ai-login-button:hover {
  background: #f8f8f8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.gemini-ai-login-button:active {
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.gemini-ai-login-button img {
  width: 20px;
  height: 20px;
}

.gemini-ai-notification-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--light);
  font-size: 20px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.gemini-ai-notification-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

/* Error Message */
.gemini-ai-error {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 340px;
  background: rgba(220, 53, 69, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeInDown 0.3s ease-out forwards;
  font-family: 'Google Sans', 'Roboto', sans-serif;
}

.gemini-ai-error-content {
  padding: 16px 20px;
  position: relative;
}

.gemini-ai-error-content h3 {
  margin: 0 0 8px 0;
  color: white;
  font-size: 16px;
  font-weight: 500;
  font-family: 'Google Sans', sans-serif;
  letter-spacing: 0.01em;
}

.gemini-ai-error-content p {
  margin: 0;
  color: white;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.95;
  font-family: 'Google Sans', 'Roboto', sans-serif;
}

.gemini-ai-error-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.gemini-ai-error-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* AI Container */
.gemini-ai-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 420px;
  height: 580px;
  background: var(--glass-dark);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  font-family: 'Google Sans', 'Roboto', 'Space Grotesk', sans-serif;
}

/* AI Header */
.gemini-ai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--gradient);
  color: white;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.gemini-ai-header h3 {
  margin: 0;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.01em;
  font-family: 'Google Sans', 'Space Grotesk', sans-serif;
}

/* Subject selector */
.gemini-ai-subject-selector {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 6px 32px 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 10px top 50%;
  background-size: 12px auto;
  padding-right: 30px;
  transition: all 0.3s;
  max-width: 130px;
  text-overflow: ellipsis;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gemini-ai-subject-selector:hover, 
.gemini-ai-subject-selector:focus {
  background-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gemini-ai-subject-selector option {
  background-color: var(--dark);
  color: white;
  font-family: 'Google Sans', 'Roboto', sans-serif;
  padding: 8px;
}

.gemini-ai-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.gemini-ai-close:hover {
  opacity: 1;
}

/* AI Chat */
.gemini-ai-chat {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 15, 29, 0.98) 100%);
}

.gemini-ai-chat::-webkit-scrollbar {
  width: 5px;
}

.gemini-ai-chat::-webkit-scrollbar-track {
  background: transparent;
}

.gemini-ai-chat::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 10px;
}

/* AI Messages */
.gemini-ai-message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  transition: all 0.2s ease-in-out;
}

.gemini-ai-user {
  background: var(--primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 5px;
  font-family: 'Google Sans', 'Roboto', 'Space Grotesk', sans-serif;
  font-weight: 400;
}

.gemini-ai-bot {
  background: rgba(255, 255, 255, 0.1);
  color: var(--light);
  align-self: flex-start;
  border-bottom-left-radius: 5px;
  font-family: 'Google Sans', 'Roboto', 'Space Grotesk', sans-serif;
  font-weight: 400;
  padding: 16px 18px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Add an enhanced style for AI responses */
.gemini-ai-bot p {
  margin: 16px 0;
  line-height: 1.7;
}

.gemini-ai-bot p:first-child {
  margin-top: 0;
}

.gemini-ai-bot p:last-child {
  margin-bottom: 0;
}

.gemini-ai-bot br + br {
  display: block;
  content: "";
  margin-top: 16px;
}

.gemini-ai-bot strong, 
.gemini-ai-bot b {
  font-weight: 500;
  color: #fff;
}

.gemini-ai-bot h1, 
.gemini-ai-bot h2, 
.gemini-ai-bot h3, 
.gemini-ai-bot h4 {
  font-family: 'Google Sans', 'Space Grotesk', sans-serif;
  font-weight: 500;
  margin-top: 16px;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  color: #fff;
}

.gemini-ai-bot ul, 
.gemini-ai-bot ol {
  padding-left: 20px;
  margin: 8px 0;
}

.gemini-ai-bot li {
  margin-bottom: 6px;
}

.gemini-ai-bot a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dashed var(--primary);
  transition: all 0.2s ease;
}

.gemini-ai-bot a:hover {
  opacity: 0.8;
  border-bottom: 1px solid var(--primary);
}

.gemini-ai-bot code {
  font-family: 'Roboto Mono', monospace;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.9em;
}

.gemini-ai-bot pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 10px 0;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.9em;
}

.gemini-ai-bot blockquote {
  border-left: 3px solid var(--primary);
  padding-left: 12px;
  margin: 10px 0;
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
}

/* Improve table formatting */
.gemini-ai-bot table {
  border-collapse: collapse;
  width: 100%;
  margin: 10px 0;
  font-size: 0.9em;
}

.gemini-ai-bot th,
.gemini-ai-bot td {
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px;
  text-align: left;
}

.gemini-ai-bot th {
  background: rgba(255, 255, 255, 0.1);
  font-weight: 500;
}

.gemini-ai-bot tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.05);
}

/* Loading animation */
.gemini-ai-loading {
  padding: 12px;
}

.gemini-ai-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.gemini-ai-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--light);
  opacity: 0.6;
  animation: bounce 1.5s infinite;
}

.gemini-ai-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.gemini-ai-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* AI Input Area */
.gemini-ai-input-area {
  padding: 16px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.gemini-ai-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 14px 16px;
  border-radius: 20px;
  resize: none;
  max-height: 120px;
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-size: 14px;
  transition: all 0.3s;
  line-height: 1.5;
}

.gemini-ai-input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.2);
}

.gemini-ai-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Google Sans', 'Roboto', sans-serif;
}

.gemini-ai-send {
  background: var(--gradient);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gemini-ai-send:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gemini-ai-image-button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.gemini-ai-image-button:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Image preview */
.gemini-ai-image-preview {
  padding: 10px 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
}

.gemini-ai-image-preview-inner {
  position: relative;
  width: 100%;
}

.gemini-ai-image-preview-inner img {
  width: 100%;
  max-height: 150px;
  object-fit: contain;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.gemini-ai-image-preview-inner img.analyzed-image {
  border: 2px solid var(--primary);
}

.gemini-ai-remove-image {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  z-index: 2;
}

/* Image analysis overlay */
.image-analysis-overlay {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-family: 'Google Sans', sans-serif;
  z-index: 2;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.image-analysis-overlay.analysis-complete {
  background: var(--primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Analyze Image Button */
.analyze-image-button {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: linear-gradient(45deg, #4285f4, #0f9d58);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-family: 'Google Sans', sans-serif;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.analyze-image-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.analyze-image-button:active {
  transform: translateY(0);
}

/* Image Hotspots */
.hotspot-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.image-hotspot {
  position: absolute;
  width: 24px;
  height: 24px;
  background: rgba(66, 133, 244, 0.8);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 4;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.image-hotspot.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.image-hotspot.selected {
  background: #fbbc05;
  box-shadow: 0 0 0 3px rgba(251, 188, 5, 0.5);
}

.hotspot-ripple {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(66, 133, 244, 0.4);
  animation: hotspot-ripple 2s infinite;
}

.image-hotspot.selected .hotspot-ripple {
  background: rgba(251, 188, 5, 0.4);
}

@keyframes hotspot-ripple {
  0% {
    transform: scale(1);
    opacity: 0.4;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.hotspot-label {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.image-hotspot:hover .hotspot-label {
  opacity: 1;
}

/* Text selection toolbar */
.selection-toolbar {
  position: fixed;
  background: var(--glass-dark);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px;
  display: none;
  transform: translateX(-50%);
  animation: fadeIn 0.2s ease-out;
}

.search-selection-button {
  background: linear-gradient(45deg, #4285f4, #34a853, #fbbc05, #ea4335);
  background-size: 300% 300%;
  animation: gradientShift 3s ease infinite;
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-family: 'Google Sans', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.search-selection-button:hover {
  transform: scale(1.05);
}

.search-selection-button i {
  font-size: 10px;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) translateX(-50%);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(-50%);
  }
}

/* Drag and drop styles */
.gemini-ai-chat.drag-over {
  background: linear-gradient(180deg, rgba(20, 30, 55, 0.98) 0%, rgba(15, 25, 40, 0.98) 100%);
  border: 2px dashed var(--primary);
}

/* Math formatting */
.gemini-ai-bot .math {
  background-color: rgba(255, 255, 255, 0.15);
  padding: 2px 5px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
}

/* Google-style Math and Chemistry Formatting */
.math-expression {
  display: inline-flex;
  align-items: baseline;
  font-family: 'Noto Sans Math', 'Google Sans', 'Roboto', sans-serif;
  margin: 0 3px;
  border-radius: 4px;
  padding: 1px 4px;
  background-color: rgba(255, 255, 255, 0.08);
  vertical-align: middle;
}

.math-base {
  font-weight: 500;
  font-family: 'Noto Sans Math', 'Google Sans', sans-serif;
  letter-spacing: 0.01em;
}

.math-sup {
  font-size: 0.75em;
  position: relative;
  top: -0.5em;
  margin-left: 1px;
  font-weight: 400;
  font-family: 'Noto Sans Math', 'Google Sans', sans-serif;
}

.math-sub {
  font-size: 0.75em;
  position: relative;
  bottom: -0.25em;
  margin-left: 1px;
  font-weight: 400;
  font-family: 'Noto Sans Math', 'Google Sans', sans-serif;
}

/* New math fraction style */
.math-frac {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  font-family: 'Noto Sans Math', 'Google Sans', sans-serif;
  margin: 0 2px;
}

.math-num, .math-denom {
  padding: 0 2px;
}

/* New square root style */
.math-sqrt {
  display: inline-flex;
  align-items: baseline;
  font-weight: 500;
  font-family: 'Noto Sans Math', 'Google Sans', sans-serif;
  position: relative;
}

.math-sqrt-content {
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  padding: 0 2px 0 4px;
  margin-left: -2px;
}

.chem-formula {
  display: inline-flex;
  align-items: baseline;
  font-family: 'Noto Sans Math', 'Google Sans', 'Roboto', sans-serif;
  margin: 0 3px;
  font-weight: 500;
  border-radius: 4px;
  padding: 1px 4px;
  background-color: rgba(255, 255, 255, 0.08);
  vertical-align: middle;
}

.chem-element {
  font-weight: 500;
  font-family: 'Noto Sans Math', 'Google Sans', sans-serif;
  letter-spacing: 0.01em;
}

.chem-count {
  font-size: 0.75em;
  position: relative;
  bottom: -0.25em;
  font-weight: 400;
  font-family: 'Noto Sans Math', 'Google Sans', sans-serif;
}

.chem-group {
  display: inline-flex;
  align-items: baseline;
  font-family: 'Noto Sans Math', 'Google Sans', sans-serif;
  margin: 0 1px;
  font-weight: 500;
}

.chem-group-content {
  margin: 0 1px;
}

.chem-charge {
  font-size: 0.75em;
  position: relative;
  top: -0.4em;
  margin-left: 1px;
  font-weight: 500;
  font-family: 'Noto Sans Math', 'Google Sans', sans-serif;
}

/* MathJax specific styling */
.gemini-ai-bot .MathJax {
  color: var(--light) !important;
  font-family: 'Noto Sans Math', 'Google Sans', sans-serif !important;
  background-color: rgba(255, 255, 255, 0.08);
  padding: 0 4px;
  border-radius: 4px;
  margin: 0 2px;
  vertical-align: middle;
}

/* Import Google fonts for math expressions */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Roboto:wght@300;400;500&display=swap');

/* Add responsiveness */
@media (max-width: 480px) {
  .gemini-ai-container {
    width: 100%;
    height: 85vh;
    bottom: 0;
    right: 0;
    border-radius: 0;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
  }
  
  .gemini-ai-button {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }
  
  .gemini-ai-header {
    padding: 10px 15px;
  }
  
  .gemini-ai-subject-selector {
    max-width: 120px;
    font-size: 12px;
    padding: 4px 8px;
    padding-right: 25px;
    background-size: 10px auto;
    background-position: right 8px top 50%;
  }
}

/* Mobile adjustments for AI button */
@media (max-width: 768px) {
  .gemini-ai-button {
    bottom: 80px; /* Position above the mobile nav bar */
    right: 20px;
    width: 54px; /* Slightly smaller size */
    height: 54px;
    font-size: 20px;
  }
} 