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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: #0a0e27;
  color: white;
  overflow-x: hidden;
  overflow-y: auto;
}

#hxwx {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20vw;
  color: white;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  z-index: 2;
  pointer-events: none;
}

#hxwx span {
  display: inline-block;
}

.tagline {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(50% + 12vw));
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.2vh;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  z-index: 2;
  pointer-events: none;
  white-space: nowrap;
}

#webGLApp {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
  display: none;
  will-change: transform;
  transition: width 0.2s ease, height 0.2s ease, border-width 0.2s ease;
}

.custom-cursor::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  transform: translate(-50%, -50%);
}

body.has-custom-cursor {
  cursor: none;
}

body.has-custom-cursor .custom-cursor {
  display: block;
}

.custom-cursor.cursor-active {
  width: 52px;
  height: 52px;
  border-width: 3px;
}

@media (pointer: coarse) {
  body {
    cursor: auto;
  }

  .custom-cursor {
    display: none !important;
  }
}

/* Language Toggle */
.lang-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 0.5rem;
  z-index: 30;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-btn {
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 1);
}

.vertical-nav {
  position: fixed;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  z-index: 20;
}

.nav-item {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.2vh;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  writing-mode: vertical-rl;
  transition: all 0.3s ease;
  cursor: pointer;
  pointer-events: auto;
}

.nav-item:hover {
  color: rgba(255, 255, 255, 0.8);
}

.nav-item.active {
  color: rgba(255, 255, 255, 1);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

#hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section {
  min-height: 100vh;
  position: relative;
  display: flex;
  padding: 80px;
  z-index: 3;
}

.section-bottom-right {
  align-items: flex-end;
  justify-content: flex-end;
}

.section-top-left {
  align-items: flex-start;
  justify-content: flex-start;
  padding-left: 100px;
}

.section-content {
  max-width: 600px;
  position: relative;
  padding-top: 40px;
  z-index: 3;
}

.top-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
}

.section-content p {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

.section-content p.final {
  margin-top: 2rem;
  color: rgba(255, 255, 255, 1);
  font-size: 1.2rem;
}

.section-content p.step-title {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 1);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.section-cards {
  align-items: center;
  justify-content: center;
  padding: 80px 100px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px 40px;
  max-width: 1400px;
  width: 100%;
  z-index: 3;
}

.card {
  position: relative;
  padding-top: 30px;
}

.card h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 1);
  margin-bottom: 1rem;
}

.card p {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 1200px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 50px 30px;
  }
}

@media (max-width: 768px) {
  body {
    scroll-snap-type: none;
  }

  .tagline {
    font-size: 1.2vh;
    transform: translate(-50%, calc(50% + 20vh));
    letter-spacing: 0.15em;
  }

  .lang-toggle {
    top: 15px;
    right: 15px;
    padding: 0.4rem;
    gap: 0.3rem;
  }

  .lang-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
  }

  .section {
    height: auto;
    min-height: 100vh;
    padding: 60px 40px;
  }

  .section-bottom-right,
  .section-top-left {
    padding: 60px 40px;
  }

  .section-cards {
    padding: 60px 40px;
    align-items: flex-start;
    height: auto;
    min-height: 100vh;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 600px;
  }

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

  .card p {
    font-size: 1rem;
  }
}

/* Chat Section */
.section-center {
  align-items: center;
  justify-content: center;
}

.chat-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3;
}

.chat-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1200px;
  height: 690px;
  border-radius: 10px;
  padding: 2.25rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-box {
  flex-grow: 1;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding-right: 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.chat-box::-webkit-scrollbar {
  width: 6px;
}

.chat-box::-webkit-scrollbar-track {
  background: transparent;
}

.chat-box::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.chat-message {
  margin: 0.75rem 0;
  display: flex;
}

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

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

.chat-bubble {
  max-width: 70%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  word-wrap: break-word;
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 0.95rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}

.chat-message.user .chat-bubble {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
}

.chat-message.assistant .chat-bubble {
  background: rgba(143, 201, 255, 0.2);
  color: rgba(255, 255, 255, 0.95);
  text-align: left;
}

.input-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.input-row input[type="text"] {
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  flex: 1;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
}

.input-row input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.input-row input[type="text"]:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
}

.send-button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.3s ease;
}

.send-button:hover {
  background: rgba(255, 255, 255, 0.25);
}

.send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.typing-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  opacity: 0.4;
  animation: typingBlink 1s infinite;
}

@keyframes typingBlink {
  0% { opacity: 0.2; }
  50% { opacity: 0.8; }
  100% { opacity: 0.2; }
}

@media (max-width: 768px) {
  .section-center {
    padding: 60px 40px;
  }

  .chat-wrapper {
    padding: 0;
    width: 100%;
    max-width: 100%;
  }

  .chat-container {
    max-width: 100%;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    max-height: 600px;
    padding: 1rem;
    margin: 0;
  }

  .chat-bubble {
    font-size: 0.85rem;
    max-width: 80%;
    padding: 0.6rem 0.85rem;
  }

  .input-row {
    gap: 0.5rem;
  }

  .input-row input[type="text"] {
    font-size: 0.85rem;
    padding: 0.65rem;
  }

  .send-button {
    font-size: 0.85rem;
    padding: 0.65rem 1.2rem;
  }
}

/* Contact Form Section */
.form-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3;
}

.contact-form-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1200px;
  border-radius: 10px;
  padding: 2.25rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  transition: border-color 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.submit-button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.3s ease;
  margin-top: 0;
}

.submit-button:hover {
  background: rgba(255, 255, 255, 0.25);
}

.submit-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .form-wrapper {
    padding: 0;
    width: 100%;
    max-width: 100%;
  }

  .contact-form-container {
    max-width: 100%;
    width: 100%;
    min-height: auto;
    padding: 1.25rem;
    gap: 1rem;
    margin: 0;
  }

  .form-group {
    gap: 0.4rem;
  }

  .form-group label {
    font-size: 0.85rem;
  }

  .form-group input,
  .form-group textarea {
    font-size: 0.85rem;
    padding: 0.65rem;
  }

  .form-group textarea {
    min-height: 120px;
    rows: 4;
  }

  .submit-button {
    font-size: 0.85rem;
    padding: 0.65rem 1.2rem;
  }
}
