:root {
  --primary-bg: #000000;
  --text-color: #F0F2F2;
  --user-msg-bg: rgba(82, 89, 87, 0.3);
  --ai-msg-bg: rgba(163, 166, 161, 0.3);
  --input-bg: rgba(38, 38, 38, 0.4);
  --blur-strength: 12px;
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--primary-bg);
  color: var(--text-color);
  height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--primary-bg);
  padding: 0.5rem 2rem;
  z-index: 100;
  font-family: var(--font-family);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-title {
  padding: 10px;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
}

.ai-highlight {
  background: linear-gradient(90deg, #1e90ff, #9b59b6, #e74c3c, #1e90ff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-animation 40s ease infinite;
  font-weight: 700;
}

@keyframes gradient-animation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.portfoliolink {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 10px;
}

.portfoliolink .arrow {
  position: relative;
  transition: transform 0.5s cubic-bezier(0.5, -0.2, 0.2, 1);
  display: inline-block;
  color: white;
  font-size: 20px;
}

.portfoliolink .text {
  position: relative;
  text-decoration: none;
  color: white;
  font-size: 20px;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  transform-origin: center;
  display: inline-block;
}

.portfoliolink:hover .arrow {
  transform: translateX(1100%);
}

.portfoliolink:hover .text {
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.welcome-note {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  padding: 2rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.welcome-note p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.welcome-note.hidden {
  opacity: 0;
}

.chat-container {
  flex: 1;
  margin: 4rem 0 7rem;
  padding: 1rem 10rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-message {
  display: flex;
  width: 100%;
  margin: 0.5rem 0;
  padding: 0.75rem 0;
}

.chat-message.bot {
  justify-content: flex-start;
}

.chat-message.user {
  justify-content: flex-end;
}

.message-content {
  max-width: 48rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 50px;
  backdrop-filter: blur(var(--blur-strength));
  -webkit-backdrop-filter: blur(var(--blur-strength));
  word-wrap: break-word;
  min-width: 0;
}

.chat-message.user .message-content {
  background: var(--user-msg-bg);
  text-align: right;
}

.chat-message.bot .message-content {
  background: var(--ai-msg-bg);
  text-align: left;
}

.avatar {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  background: rgba(38, 38, 38, 0.8);
  flex-shrink: 0;
}

.message-text {
  flex: 1;
  line-height: 1.5;
  font-size: 1.05rem;
  padding: 0.25rem 0;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  min-width: 0;
  max-width: 100%;
}

.input-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  background: var(--primary-bg);
}

.input-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.input-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: rgba(82, 89, 87, 0.3);
  backdrop-filter: blur(var(--blur-strength));
  -webkit-backdrop-filter: blur(var(--blur-strength));
  border-radius: 50px;
  margin: 0 1rem;
}

.message-input {
  flex: 1;
  padding: 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: 1rem;
  resize: none;
  overflow: hidden;
  min-height: 24px;
  max-height: 150px;
  line-height: 1.5;
  margin: 0;
}

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

.message-input::placeholder {
  color: rgba(240, 242, 242, 0.6);
}

.send-button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 50px;
  background: rgba(82, 89, 87, 0.5);
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.send-button:hover {
  background: rgba(163, 166, 161, 0.5);
}

/* Authentication Screen */
.auth-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* From https://css.glass */
  background: rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-content {
  text-align: center;
  width: 90%;
  max-width: 800px;
}

.auth-title {
  font-size: 4.5rem;
  margin-bottom: 3rem;
}

.auth-input-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(9.7px);
  -webkit-backdrop-filter: blur(9.7px);
  border: 1px solid rgba(0, 0, 0, 0.3);
  margin: 0 1rem;
}

.auth-input {
  flex: 1;
  padding: 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-color);
  font-size: 1rem;
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

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

.auth-button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  /* From https://css.glass */
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: #000;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.auth-button:hover {
  background: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Animation utilities */
.hidden {
  display: none !important;
}

.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.fade-in {
  opacity: 1;
  transition: opacity 0.5s ease;
}

.transparent {
  opacity: 0;
}

