.gemini-chat-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.gemini-chat-container h1 {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
}

.system-instruction-section {
  margin-bottom: 30px;
}

.system-instruction-section label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #555;
}

.system-instruction-section textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
}

.system-instruction-section textarea:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.chat-input-section {
  margin-bottom: 30px;
}

.chat-input-section label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #555;
}

.input-group {
  display: flex;
  gap: 10px;
}

.input-group input {
  flex: 1;
  padding: 12px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 16px;
}

.input-group input:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.input-group button {
  padding: 12px 24px;
  background-color: #4285f4;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.input-group button:hover:not(:disabled) {
  background-color: #3367d6;
}

.input-group button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.chat-history {
  max-height: 500px;
  overflow-y: auto;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  background-color: #fafafa;
}

.message {
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 8px;
  max-width: 80%;
}

.message.user {
  margin-left: auto;
  background-color: #4285f4;
  color: white;
}

.message.model {
  margin-right: auto;
  background-color: white;
  color: #333;
  border: 1px solid #e1e5e9;
}

.message-header {
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
  opacity: 0.9;
}

.message-content {
  line-height: 1.5;
  white-space: pre-wrap;
}

.recommendation-display {
  background-color: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  margin: 8px 0;
}

.recommendation-header {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  align-items: center;
}

.recommendation-header .mode {
  background-color: #007bff;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
}

.recommendation-header .battery-reserve {
  background-color: #28a745;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
}

.recommendation-display .rationale,
.recommendation-display .excess-solar,
.recommendation-display .next-checkin {
  margin-bottom: 8px;
  line-height: 1.4;
}

.recommendation-display strong {
  color: #495057;
}

.raw-json-section {
  margin-bottom: 30px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  padding: 20px;
  background-color: #f8f9fa;
}

.raw-json-section h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  font-size: 18px;
}

.json-container {
  display: flex;
  gap: 20px;
}

.json-section {
  width: 600px;
  flex-shrink: 0;
}

.json-section h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #555;
  font-size: 14px;
  font-weight: 600;
}

.json-section pre {
  background-color: #2d3748;
  color: #e2e8f0;
  padding: 15px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  overflow-x: auto;
  max-height: 200px;
  margin: 0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .json-container {
    flex-direction: column;
    gap: 15px;
  }
  
  .json-section {
    width: 100%;
  }
}
