.loading-screen {
  height: 100vh;
  width: 100vw;
  background: linear-gradient(135deg, #2e294e 0%, #1a1535 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.loading-screen::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(119, 118, 188, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(252, 186, 4, 0.1) 0%, transparent 50%);
  animation: float 15s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-50px, -50px) rotate(180deg); }
}

.logo-spinner-wrapper {
  position: relative;
  width: 500px;
  height: 500px;
  transform: translateY(-60px);
  filter: drop-shadow(0 0 30px rgba(252, 186, 4, 0.3));
}

.loading-logo {
  width: 100%;
  height: auto;
  border-radius: 50%;
  z-index: 1;
  position: relative;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.05); filter: brightness(1.2); }
}

.spinner-orbit {
  position: absolute;
  top: 45%;
  left: 45%;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #fcba04 0%, #ffd700 100%);
  border-radius: 50%;
  animation: orbit 2.8s linear infinite;
  box-shadow: 0 0 20px rgba(252, 186, 4, 0.6),
              0 0 40px rgba(252, 186, 4, 0.4);
}

@keyframes orbit {
  0% {
    transform: rotate(0deg) translate(100%, -270px) rotate(0deg);
  }
  100% {
    transform: rotate(360deg) translate(100%, -270px) rotate(-360deg);
  }
}

.loading-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 260px);
  font-size: 3rem;
  font-weight: bold;
  color: white;
  font-family: "Inter", "Nunito Sans", sans-serif;
  z-index: 3;
  pointer-events: none;
  text-align: center;
  text-shadow: 0 0 20px rgba(252, 186, 4, 0.5);
  animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: "Inter", "Nunito Sans", -apple-system, BlinkMacSystemFont,
    sans-serif;
}

.chat-container {
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #2e294e 0%, #1f1a3d 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.chat-container::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 10% 20%, rgba(119, 118, 188, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(252, 186, 4, 0.03) 0%, transparent 40%);
  pointer-events: none;
}

.header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.back-button {
  background: rgba(119, 118, 188, 0.3);
  border: 2px solid rgba(252, 186, 4, 0.5);
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-weight: 600;
}

.back-button:hover {
  background: rgba(119, 118, 188, 0.5);
  border-color: rgba(252, 186, 4, 0.8);
  transform: translateX(-5px);
  box-shadow: 0 0 15px rgba(252, 186, 4, 0.3);
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 15px;
  margin-bottom: 80px;
  scroll-behavior: smooth;
}

.messages::-webkit-scrollbar {
  width: 8px;
}

.messages::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.messages::-webkit-scrollbar-thumb {
  background: rgba(252, 186, 4, 0.5);
  border-radius: 10px;
}

.messages::-webkit-scrollbar-thumb:hover {
  background: rgba(252, 186, 4, 0.7);
}

.message {
  padding: 12px 18px;
  margin: 5px;
  border-radius: 20px;
  max-width: 60%;
  word-wrap: break-word;
  animation: messageSlideIn 0.4s ease-out;
  position: relative;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.user {
  background: linear-gradient(135deg, #8987d8 0%, #7776bc 100%);
  color: white;
  align-self: flex-end;
  box-shadow: 0 4px 15px rgba(119, 118, 188, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.user::after {
  content: '';
  position: absolute;
  right: -8px;
  bottom: 10px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 0 10px;
  border-color: transparent transparent transparent #7776bc;
}

.bot {
  align-self: flex-start;
  font-style: italic;
  color: whitesmoke;
  padding: 12px 18px;
  max-width: 60%;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(252, 186, 4, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  position: relative;
}

.bot::after {
  content: '';
  position: absolute;
  left: -8px;
  bottom: 10px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 10px 10px;
  border-color: transparent transparent rgba(255, 255, 255, 0.08) transparent;
}

.input-container {
  display: flex;
  padding: 20px;
  background: linear-gradient(180deg, rgba(51, 44, 85, 0.95) 0%, #332c55 100%);
  backdrop-filter: blur(10px);
  position: fixed;
  bottom: 0;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
  gap: 12px;
  align-items: center;
  z-index: 10;
}

input {
  flex: 1;
  padding: 14px 24px;
  border: 2px solid rgba(119, 118, 188, 0.3);
  border-radius: 30px;
  outline: none;
  background: rgba(58, 52, 112, 0.6);
  color: white;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

input:focus {
  background: rgba(68, 60, 123, 0.8);
  border-color: rgba(252, 186, 4, 0.8);
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.2),
    0 0 0 3px rgba(252, 186, 4, 0.2),
    0 0 20px rgba(252, 186, 4, 0.3);
}

input::placeholder {
  color: rgba(245, 245, 245, 0.5);
}

#charCount {
  font-size: 0.85em;
  color: rgba(252, 186, 4, 0.7);
  font-weight: 600;
  min-width: 60px;
  text-align: center;
}

button {
  padding: 14px 28px;
  background: linear-gradient(135deg, #fcba04 0%, #ffd700 100%);
  color: #1f1a3d;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  outline: none;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(252, 186, 4, 0.4);
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:hover::before {
  width: 300px;
  height: 300px;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(252, 186, 4, 0.6);
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(252, 186, 4, 0.4);
}

.ShareScreen {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90%;
  max-width: 500px;
  background: linear-gradient(135deg, #8987d8 0%, #7776bc 100%);
  color: white;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  border-radius: 25px;
  padding: 40px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(252, 186, 4, 0.3);
  transform: translate(-50%, -50%);
  animation: modalSlideIn 0.5s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.ShareScreen h1 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 40px;
  text-shadow: 0 0 20px rgba(252, 186, 4, 0.5);
  animation: celebrationPulse 1s ease-in-out infinite;
}

@keyframes celebrationPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.ShareScreen p {
  margin-top: 0;
  margin-bottom: 35px;
  font-size: 18px;
  opacity: 0.9;
}

.ShareScreen form {
  width: 100%;
}

.ShareScreen input[type="text"] {
  width: 100%;
  padding: 12px 20px;
  margin-bottom: 20px;
  border: 2px solid rgba(252, 186, 4, 0.5);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 16px;
  box-sizing: border-box;
}

.ShareScreen input[type="text"]:focus {
  border-color: rgba(252, 186, 4, 0.9);
  box-shadow: 0 0 15px rgba(252, 186, 4, 0.3);
}

.ShareScreen label[for="name"] {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.ShareScreen input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #fcba04;
  cursor: pointer;
}

.ShareScreen label[for="agree"] {
  display: inline;
  cursor: pointer;
  user-select: none;
}

.ShareScreen input[type="submit"],
.ShareScreen .cancel-btn {
  margin: 10px 5px;
  padding: 12px 30px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ShareScreen input[type="submit"] {
  background: linear-gradient(135deg, #fcba04 0%, #ffd700 100%);
  color: #1f1a3d;
  border: none;
}

.ShareScreen .cancel-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.ShareScreen .cancel-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}