.ai-container {
  width: 100%;
  padding: 0;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 30%, #2a2a2a 70%, #1a1a1a 100%);
  min-height: calc(100vh - 80px);
  color: white;
  position: relative;
  overflow-x: hidden;
}

.ai-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 215, 0, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.ai-container > * {
  position: relative;
  z-index: 2;
}

.ai-header {
  text-align: center;
  padding: 4rem 2rem 3rem;
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #0a0a0a 100%);
  border-bottom: 3px solid #ffd700;
  position: relative;
  overflow: hidden;
}

.ai-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at center, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
  animation: gentle-rotate 20s linear infinite;
  pointer-events: none;
}

@keyframes gentle-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ai-header h1 {
  color: #ffd700;
  margin-bottom: 1.5rem;
  font-size: 4rem;
  font-weight: 800;
  text-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.ai-header h1 i {
  color: #ffffff;
  margin-left: 1.5rem;
  animation: pulse-glow 3s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.ai-header p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.4rem;
  font-weight: 300;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ai-personalization {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  border: 1px solid #ffd700;
  margin: 0 2rem;
  padding: 1.5rem;
  border-radius: 16px;
  margin-bottom: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.personalization-content {
  text-align: center;
}

.personalization-input {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.personalization-input label {
  color: #ffd700;
  font-weight: 600;
  font-size: 1.1rem;
}

.personalization-input input {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: white;
  font-size: 1rem;
  min-width: 200px;
  transition: all 0.3s ease;
}

.personalization-input input:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.personalization-input input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.set-name-btn {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.set-name-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

.ai-welcome {
  background: linear-gradient(135deg, #1a4a1a 0%, #2a5a2a 100%);
  border: 1px solid #4caf50;
  margin: 0 2rem;
  padding: 1rem 1.5rem;
  border-radius: 16px;
  margin-bottom: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.welcome-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.welcome-content p {
  color: #4caf50;
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.welcome-content span {
  color: #ffd700;
  font-weight: 700;
}

.change-name-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #4caf50;
  border: 1px solid #4caf50;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.change-name-btn:hover {
  background: rgba(76, 175, 80, 0.1);
  transform: translateY(-1px);
}

.ai-chat-container {
  background: linear-gradient(145deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
  border: 2px solid #ffd700;
  margin: 2rem;
  margin-top: 0;
  min-height: 650px;
  display: flex;
  flex-direction: column;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    inset 0 0 30px rgba(255, 215, 0, 0.1);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.ai-chat-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, #ffd700, transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.chat-messages {
  flex: 1;
  padding: 2.5rem;
  overflow-y: auto;
  min-height: 450px;
  background: #2a2a2a;
  border-radius: 20px 20px 0 0;
  position: relative;
}

.chat-messages::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: #555555;
  border-radius: 2px;
}

.message {
  display: flex;
  margin-bottom: 1.5rem;
  align-items: flex-start;
  justify-content: flex-end;
  animation: fadeInUp 0.3s ease-out;
  opacity: 0;
  animation-fill-mode: forwards;
}

.ai-message {
  justify-content: flex-start;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid #555555;
  transition: all 0.2s ease;
  position: relative;
}

/* Remove complex avatar effects */

.user-message .message-avatar {
  background: #5a5a5a;
  color: #e0e0e0;
  border-color: #777777;
  margin-left: 1rem;
  order: 2;
}

.ai-message .message-avatar {
  background: #ffd700;
  color: #000000;
  border-color: #ffd700;
  margin-right: 1rem;
}

.message-content {
  flex: 1;
  padding: 1.5rem;
  border-radius: 18px;
  position: relative;
  max-width: 70%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #dee2e6;
}

/* Remove hover effects */

.user-message .message-content {
  background: #3a3a3a;
  color: #e0e0e0;
  margin-right: 0;
  border: 1px solid #555555;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  order: 1;
}

.ai-message .message-content {
  background: #404040;
  color: #e0e0e0;
  border: 1px solid #666666;
  margin-left: 0;
  position: relative;
}

/* Remove AI message effects */

.message-content p {
  margin: 0;
  line-height: 1.6;
  font-size: 1rem;
}

/* Typing animation for AI messages */
.typing-animation {
  border-right: 2px solid #e0e0e0;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { border-color: #e0e0e0; }
  51%, 100% { border-color: transparent; }
}

.message-image {
  max-width: 250px;
  max-height: 180px;
  border-radius: 8px;
  margin-bottom: 1rem;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid #555555;
}

.chat-input-container {
  border-top: 2px solid #ffd700;
  padding: 2.5rem;
  background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
  border-radius: 0 0 20px 20px;
  position: relative;
}

.chat-input-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffd700, transparent);
  border-radius: 1px;
}

.input-area {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 50%, #2a2a2a 100%);
  padding: 1.5rem;
  border-radius: 20px;
  border: 2px solid rgba(255, 215, 0, 0.3);
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.3),
    inset 0 0 20px rgba(255, 215, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  backdrop-filter: blur(10px);
}

.input-area:focus-within {
  border-color: #ffd700;
  box-shadow: 
    0 15px 40px rgba(255, 215, 0, 0.2),
    inset 0 0 30px rgba(255, 215, 0, 0.1);
  transform: translateY(-2px);
}

.input-area textarea {
  flex: 1;
  border: none;
  background: transparent;
  padding: 1.5rem;
  font-family: inherit;
  resize: vertical;
  min-height: 70px;
  color: #ffffff;
  font-size: 1.1rem;
  line-height: 1.5;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.input-area textarea:focus {
  outline: none;
  background: rgba(255, 215, 0, 0.05);
}

.input-area textarea::placeholder {
  color: #bbbbbb;
  font-style: italic;
}

.send-button {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
  color: #000000;
  border: none;
  border-radius: 15px;
  padding: 1.25rem 2rem;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 8px 25px rgba(255, 215, 0, 0.3),
    0 0 0 2px rgba(255, 215, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.send-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.send-button:hover::before {
  left: 100%;
}

.send-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 
    0 15px 40px rgba(255, 215, 0, 0.4),
    0 0 0 3px rgba(255, 215, 0, 0.2);
  background: linear-gradient(135deg, #ffed4e 0%, #ffd700 50%, #ffed4e 100%);
}

.send-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.send-button:disabled:hover {
  transform: none;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.ai-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 50%, #1a1a1a 100%);
  position: relative;
}

.ai-features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 25% 25%, rgba(255, 215, 0, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 215, 0, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.feature-card {
  background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 50%, #2a2a2a 100%);
  padding: 3rem 2.5rem;
  border-radius: 25px;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 215, 0, 0.1);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 215, 0, 0.2);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
  transition: left 0.6s ease;
}

.feature-card:hover::before {
  left: 100%;
}

.feature-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 
    0 30px 80px rgba(255, 215, 0, 0.2),
    0 0 0 1px rgba(255, 215, 0, 0.3);
  border-color: #ffd700;
}

.feature-card i {
  font-size: 4rem;
  color: #ffd700;
  margin-bottom: 2rem;
  text-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.feature-card:hover i {
  transform: scale(1.1) rotateY(10deg);
  color: #ffed4e;
  text-shadow: 0 6px 25px rgba(255, 215, 0, 0.6);
}

.feature-card h3 {
  color: #ffd700;
  margin-bottom: 1.5rem;
  font-size: 1.6rem;
  font-weight: 700;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.feature-card:hover h3 {
  color: #ffed4e;
  transform: translateY(-2px);
}

.feature-card p {
  color: #cccccc;
  font-size: 1.1rem;
  line-height: 1.7;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.feature-card:hover p {
  color: #e0e0e0;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.loading-spinner {
  background: linear-gradient(145deg, #1a1a1a 0%, #2a2a2a 100%);
  padding: 3rem;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 300px;
  border: 2px solid #ffd700;
}

.loading-spinner i {
  font-size: 4rem;
  color: #ffd700;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.loading-spinner p {
  color: #ffffff;
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0;
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
}

/* Calculator Styles */
.calculator-section {
  background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 100%);
  border: 2px solid #ffd700;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.2);
  overflow: hidden;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.calculator-header {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #000000;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.calculator-header h3 {
  margin: 0;
  font-size: 1rem;
}

.close-calc-btn {
  background: transparent;
  border: none;
  color: #000000;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-calc-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.1);
}

.calculator-display {
  padding: 0.75rem;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

.calculator-display input {
  width: 100%;
  background: transparent;
  border: 2px solid #ffd700;
  border-radius: 8px;
  padding: 0.75rem;
  color: #ffd700;
  font-size: 1rem;
  font-family: "Courier New", monospace;
  text-align: right;
  font-weight: 600;
}

.calculator-display input:focus {
  outline: none;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

.calculator-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  padding: 0.75rem;
}

.calc-btn {
  padding: 0.75rem 0.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.number-btn {
  background: linear-gradient(135deg, #333333 0%, #1a1a1a 100%);
  color: #ffffff;
  border: 1px solid #666666;
}

.number-btn:hover {
  background: linear-gradient(135deg, #444444 0%, #2a2a2a 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.operator-btn {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #000000;
  border: 1px solid #ffd700;
}

.operator-btn:hover {
  background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.function-btn {
  background: linear-gradient(135deg, #4a4a4a 0%, #333333 100%);
  color: #ffd700;
  border: 1px solid #ffd700;
  font-size: 0.9rem;
}

.function-btn:hover {
  background: linear-gradient(135deg, #5a5a5a 0%, #444444 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.variable-btn {
  background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
  color: #ffffff;
  border: 1px solid #cd853f;
}

.variable-btn:hover {
  background: linear-gradient(135deg, #a0522d 0%, #8b4513 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(205, 133, 63, 0.4);
}

.clear-btn {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: #ffffff;
  border: 1px solid #dc3545;
}

.clear-btn:hover {
  background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.send-calc-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: #ffffff;
  border: 1px solid #28a745;
  font-size: 0.9rem;
}

.send-calc-btn:hover {
  background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.calculator-toggle-btn {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #000000;
  border: none;
  border-radius: 10px;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 50px;
  height: 50px;
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
  font-weight: 600;
  font-size: 1.1rem;
}

.calculator-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
  background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
}

/* Image Upload Styles */
.image-upload-btn {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #000000;
  border: none;
  border-radius: 10px;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 50px;
  height: 50px;
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
  font-weight: 600;
  font-size: 1.1rem;
}

.image-upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
  background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
}

.image-preview {
  position: relative;
  max-width: 250px;
  margin-bottom: 1rem;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #ffd700;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
  background: #1a1a1a;
}

.image-preview img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  display: block;
}

.remove-image-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(220, 53, 69, 0.9);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.remove-image-btn:hover {
  background: rgba(220, 53, 69, 1);
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .ai-header {
    padding: 2rem 1rem 1.5rem;
  }

  .ai-header h1 {
    font-size: 2.5rem;
  }

  .ai-header p {
    font-size: 1.1rem;
  }

  .ai-personalization,
  .ai-welcome {
    margin: 0 1rem;
    padding: 1rem;
  }

  .personalization-input {
    flex-direction: column;
    gap: 0.75rem;
  }

  .personalization-input input {
    min-width: 100%;
  }

  .welcome-content {
    justify-content: center;
    text-align: center;
  }

  .ai-chat-container {
    margin: 0.5rem;
    min-height: 500px;
    border-radius: 16px;
  }

  .chat-messages {
    min-height: 300px;
    padding: 1.5rem 1rem;
  }

  .message-content {
    max-width: 90%;
    padding: 1.2rem;
    border-radius: 16px;
    font-size: 0.95rem;
  }

  .message-avatar {
    width: 40px;
    height: 40px;
    margin-left: 0.75rem;
  }

  .chat-input-container {
    padding: 1.5rem 1rem;
  }

  .input-area {
    flex-direction: column;
    gap: 1rem;
    padding: 1.2rem;
    border-radius: 12px;
  }

  .input-area textarea {
    min-height: 70px;
    padding: 0.9rem;
    font-size: 1rem;
  }

  .input-buttons {
    justify-content: center;
    gap: 0.75rem;
  }

  .send-button {
    align-self: stretch;
    width: 100%;
    padding: 0.9rem;
    border-radius: 10px;
    font-size: 1rem;
  }

  .calculator-toggle-btn,
  .image-upload-btn {
    min-width: 45px;
    height: 45px;
    font-size: 1rem;
  }

  .ai-features {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 1rem;
  }

  .feature-card {
    padding: 2rem 1.5rem;
    border-radius: 16px;
  }

  .feature-card i {
    font-size: 3rem;
  }

  .feature-card h3 {
    font-size: 1.3rem;
  }

  .feature-card p {
    font-size: 0.95rem;
  }

  .calculator-section {
    max-width: 100%;
    margin: 0 0 0.75rem 0;
    border-radius: 12px;
  }

  .calculator-buttons {
    gap: 0.3rem;
    padding: 0.6rem;
  }

  .calc-btn {
    padding: 0.6rem 0.4rem;
    min-height: 38px;
    font-size: 0.85rem;
    border-radius: 6px;
  }

  .calculator-display {
    padding: 0.6rem;
  }

  .calculator-display input {
    padding: 0.6rem;
    font-size: 0.95rem;
  }

  .calculator-header {
    padding: 0.6rem 0.75rem;
  }

  .calculator-header h3 {
    font-size: 1rem;
  }

  .image-preview {
    max-width: 100%;
    margin: 0.75rem 0;
  }

  .image-preview img {
    max-width: 100%;
    border-radius: 8px;
  }
}

/* Medium mobile devices */
@media (max-width: 640px) {
  .ai-header h1 {
    font-size: 2.2rem;
  }

  .ai-personalization,
  .ai-welcome {
    margin: 0 0.5rem;
  }

  .welcome-content p {
    font-size: 1rem;
  }

  .ai-chat-container {
    margin: 0.5rem;
    min-height: 475px;
  }

  .calc-btn {
    padding: 0.5rem 0.3rem;
    min-height: 34px;
    font-size: 0.8rem;
  }

  .input-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .ai-header {
    padding: 1.5rem 0.75rem 1rem;
  }

  .ai-header h1 {
    font-size: 1.8rem;
    line-height: 1.2;
  }

  .ai-header p {
    font-size: 1rem;
  }

  .ai-personalization,
  .ai-welcome {
    margin: 0 0.75rem;
    padding: 0.75rem;
  }

  .personalization-input label {
    font-size: 1rem;
  }

  .personalization-input input {
    font-size: 0.95rem;
    padding: 0.6rem 0.8rem;
  }

  .set-name-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
  }

  .ai-chat-container {
    margin: 0.25rem;
    min-height: 450px;
    border-radius: 12px;
  }

  .chat-messages {
    min-height: 250px;
    padding: 1rem 0.75rem;
  }

  .message {
    margin-bottom: 1rem;
  }

  .message-avatar {
    width: 35px;
    height: 35px;
    margin-left: 0.5rem;
  }

  .message-content {
    padding: 1rem;
    font-size: 0.9rem;
    border-radius: 12px;
    max-width: 92%;
  }

  .chat-input-container {
    padding: 1rem 0.75rem;
  }

  .input-area {
    padding: 1rem;
    gap: 0.75rem;
  }

  .input-area textarea {
    min-height: 60px;
    padding: 0.8rem;
    font-size: 0.95rem;
  }

  .input-buttons {
    gap: 0.5rem;
  }

  .send-button {
    padding: 0.8rem;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .calculator-toggle-btn,
  .image-upload-btn {
    min-width: 40px;
    height: 40px;
    font-size: 0.9rem;
    padding: 0.6rem;
  }

  .ai-features {
    padding: 1.5rem 0.75rem;
    gap: 1.25rem;
  }

  .feature-card {
    padding: 1.5rem 1.25rem;
  }

  .feature-card i {
    font-size: 2.5rem;
  }

  .feature-card h3 {
    font-size: 1.2rem;
  }

  .feature-card p {
    font-size: 0.9rem;
  }

  .calculator-section {
    margin: 0 0 0.5rem 0;
    border-radius: 10px;
  }

  .calculator-header {
    padding: 0.5rem;
  }

  .calculator-header h3 {
    font-size: 0.9rem;
  }

  .calculator-buttons {
    gap: 0.2rem;
    padding: 0.4rem;
  }

  .calc-btn {
    padding: 0.4rem 0.2rem;
    min-height: 32px;
    font-size: 0.75rem;
    border-radius: 4px;
  }

  .calculator-display {
    padding: 0.4rem;
  }

  .calculator-display input {
    padding: 0.5rem;
    font-size: 0.85rem;
  }

  .image-preview {
    margin: 0.5rem 0;
  }

  .image-preview img {
    border-radius: 6px;
  }

  .remove-image-btn {
    width: 25px;
    height: 25px;
    font-size: 0.7rem;
  }
}
