* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  height: 100dvh;
  height: -webkit-fill-available;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

.app-container {
  display: flex;
  height: 100vh;
  height: 100dvh;
  height: -webkit-fill-available;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #343541;
  width: 100%;
  min-height: 0;
  position: relative;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  background-color: #343541;
  border-bottom: 1px solid #565869;
  position: relative;
  min-height: 60px;
}

.profile-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #40414f;
  border: 2px solid #565869;
  position: absolute;
  left: 2rem;
  overflow: hidden;
  flex-shrink: 0;
}

.profile-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ececf1;
  margin: 0;
  text-align: center;
}

.content-section {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  background-color: #343541;
  color: #ececf1;
  -webkit-overflow-scrolling: touch;
}

.content-section.active {
  display: flex;
  flex-direction: column;
}

.content-section#about.active {
  display: block;
}

.content-section::-webkit-scrollbar {
  width: 8px;
}

.content-section::-webkit-scrollbar-track {
  background: #202123;
}

.content-section::-webkit-scrollbar-thumb {
  background: #565869;
  border-radius: 4px;
}

.content-section::-webkit-scrollbar-thumb:hover {
  background: #6e6e80;
}

.hero-section {
  text-align: center;
  padding: 3rem 1rem;
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #ececf1;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #8e8ea0;
}

.about-section,
.companies-section {
  background-color: #40414f;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: #ececf1;
  border-bottom: 2px solid #565869;
  padding-bottom: 0.75rem;
}

.about-content {
  margin-top: 1rem;
}

.about-text {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #c5c5d2;
}

.companies-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.company-card {
  background-color: #565869;
  border: 1px solid #6e6e80;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  transition: background-color 0.2s ease;
}

.company-card:hover {
  background-color: #6e6e80;
}

.company-placeholder {
  font-size: 1.15rem;
  font-weight: 500;
  color: #ececf1;
}

/**
 * Chat Messages Container
 * 
 * Extra bottom padding prevents content from being hidden
 * behind the fixed chat input container
 */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 0;
  padding-bottom: calc(6rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  scrollbar-width: none;
  box-sizing: border-box;
}

.chat-messages-content {
  max-width: 768px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  padding-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-sizing: border-box;
}

.chat-messages:hover,
.chat-messages:focus-within,
.chat-messages.scrolling {
  scrollbar-color: #565869 transparent;
}

.chat-messages::-webkit-scrollbar {
  display: none;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
  margin-top: calc(2rem + 100px);
  margin-bottom: calc(6rem + env(safe-area-inset-bottom));
}

.chat-messages::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 0;
  transition: background 0.3s ease;
  margin: 0;
}

.chat-messages:hover::-webkit-scrollbar-thumb,
.chat-messages:focus-within::-webkit-scrollbar-thumb,
.chat-messages.scrolling::-webkit-scrollbar-thumb {
  background: #565869;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #6e6e80;
}

.chat-messages::-webkit-scrollbar-button {
  display: none;
}

.message {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  max-width: 85%;
  word-wrap: break-word;
  animation: slideIn 0.3s ease-out;
  line-height: 1.75;
}

.message p {
  margin: 0;
  font-size: 1rem;
}

.welcome-message {
  background-color: #40414f;
  color: #ececf1;
  margin: 0 auto;
  text-align: center;
  max-width: 600px;
}

.user-message {
  background-color: #565869;
  color: #ececf1;
  margin-left: auto;
  margin-right: 0;
  align-self: flex-end;
}

.bot-message {
  background-color: #40414f;
  color: #ececf1;
  margin-right: auto;
  margin-left: 0;
  align-self: flex-start;
}

.resume-link {
  color: #19c37d;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.resume-link:hover {
  color: #16a169;
  text-decoration: underline;
}

.loading {
  opacity: 0.7;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/**
 * Chat Input Container - Mobile Keyboard Avoidance
 * 
 * Fixed positioning allows dynamic bottom adjustment via JS
 * when mobile keyboard opens, moving input above keyboard
 * 
 * Key features:
 * - position: fixed for reliable keyboard avoidance
 * - transition: smooth animation when keyboard opens/closes
 * - env(safe-area-inset-bottom): iOS notch/home indicator support
 * - will-change: GPU acceleration for smooth animations
 * - z-index: 1000 ensures input stays on top
 */
.chat-input-container {
  padding: 1.5rem;
  background-color: #343541;
  border-top: 1px solid #565869;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  transition: bottom 0.2s ease-out;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  will-change: bottom;
}

.chat-input-wrapper {
  max-width: 768px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: flex-end;
  background-color: #40414f;
  border-radius: 24px;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chat-input {
  flex: 1;
  padding: 0.875rem 1rem;
  padding-right: 3rem;
  font-size: 1rem;
  border: none;
  background-color: transparent;
  color: #ececf1;
  border-radius: 24px;
  outline: none;
  resize: none;
  max-height: 200px;
  line-height: 1.5;
}

.chat-input::placeholder {
  color: #8e8ea0;
}

.chat-input:focus {
  outline: none;
}

.chat-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.send-button {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #19c37d;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
  background-color: #16a169;
}

.send-button:active:not(:disabled) {
  transform: translateY(-50%) scale(0.95);
}

.send-button:disabled {
  background-color: #565869;
  cursor: not-allowed;
  opacity: 0.5;
}

.send-button svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 768px) {
  .chat-header {
    padding: 1rem 1rem;
    min-height: 56px;
  }

  .profile-circle {
    width: 36px;
    height: 36px;
    left: 1rem;
  }

  .header-title {
    font-size: 1.1rem;
  }

  .content-section {
    padding: 1.5rem 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-section {
    padding: 2rem 1rem;
  }

  .about-section,
  .companies-section {
    padding: 1.5rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .chat-messages {
    padding: 1.5rem 0;
  }

  .chat-messages-content {
    padding: 0 1rem;
    padding-bottom: 2rem;
  }

  .message {
    max-width: 90%;
    padding: 0.875rem 1.25rem;
  }

  /**
   * Mobile-specific adjustments for chat input
   * Reduced padding for smaller screens
   * Safe-area-inset ensures compatibility with iOS notches
   */
  .chat-input-container {
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }

  /**
   * Mobile-specific bottom padding for chat messages
   * Prevents content from being hidden behind fixed input
   */
  .chat-messages {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
  }

  .chat-messages::-webkit-scrollbar-track {
    margin-top: calc(1.5rem + 100px);
    margin-bottom: calc(5rem + env(safe-area-inset-bottom));
  }

  .chat-input-wrapper {
    border-radius: 20px;
  }

  .chat-input {
    padding: 0.75rem 1rem;
    padding-right: 2.75rem;
    font-size: 0.95rem;
  }

  .send-button {
    width: 28px;
    height: 28px;
    right: 0.375rem;
    top: 50%;
    transform: translateY(-50%);
  }

  .send-button:active:not(:disabled) {
    transform: translateY(-50%) scale(0.95);
  }

  .send-button svg {
    width: 16px;
    height: 16px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .content-section {
    padding: 2rem 1.5rem;
  }

  .companies-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1025px) {
  .companies-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .content-section {
    padding: 3rem;
  }
}

/* Cookie Consent Banner */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #202123;
  border-top: 1px solid #565869;
  padding: 1.25rem 1.5rem;
  z-index: 2000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease-out;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.cookie-consent.hidden {
  display: none;
}

.cookie-consent.hiding {
  transform: translateY(100%);
  opacity: 0;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cookie-text {
  color: #c5c5d2;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.cookie-buttons {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 0.625rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cookie-btn-accept {
  background-color: #19c37d;
  color: #fff;
}

.cookie-btn-accept:hover {
  background-color: #16a169;
}

.cookie-btn-decline {
  background-color: #565869;
  color: #ececf1;
}

.cookie-btn-decline:hover {
  background-color: #6e6e80;
}

/* Mobile adjustments for cookie consent */
@media (max-width: 768px) {
  .cookie-consent {
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }

  .cookie-consent-content {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .cookie-text {
    font-size: 0.875rem;
    text-align: center;
  }

  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }

  .cookie-btn {
    flex: 1;
    padding: 0.75rem 1rem;
  }
}