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

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #e8f4f8 0%, #f5f5f5 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #0f172a;
}

/* Mobile-first Layout */
.fullheight {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.app {
  background: white;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header - Mobile first */
.app-header {
  padding: 16px 20px;
  background: #ffd500;
  color: black;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.app-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-circle {
  width: 60px;
  height: 60px;
  border-radius: 10px;
 
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  color: #ffd500;
  flex-shrink: 0;
}

.app-header h1 {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 600;
}

.app-header p {
  font-size: 12px;
  opacity: 0.95;
  margin-top: 2px;
}

/* Content area - Mobile first */
.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  background: #fafafa;
  -webkit-overflow-scrolling: touch;
}

/* Form styling - Mobile first */
form {
  width: 100%;
  margin: 0 auto;
}

form > div {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #1a1a1a;
  font-size: 14px;
}

label span {
  color: #ef4444;
  margin-left: 2px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px; /* 16px prevents zoom on iOS */
  font-family: inherit;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #ffd500;
  box-shadow: 0 0 0 3px rgba(255, 213, 0, 0.1);
}

textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Button styling - Mobile optimized */
button[type="submit"] {
  width: 100%;
  padding: 14px 24px;
  background: #ffd500;
  color: #1a1a1a;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
  -webkit-tap-highlight-color: transparent;
}

button[type="submit"]:active {
  transform: scale(0.98);
  background: #ffb700;
}

/* Landing page specific - Mobile first */
.welcome-content {
  text-align: center;
  width: 100%;
  padding: 20px 0;
}

.welcome-content h2 {
  font-size: 24px;
  margin-bottom: 12px;
  color: #1a1a1a;
}

.welcome-content p {
  font-size: 15px;
  color: #666;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Success/Error pages - Mobile first */
.status-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 32px;
  color: white;
}

.status-icon.success {
  background: #10b981;
}

.status-icon.error {
  background: #ef4444;
}

.status-content {
  text-align: center;
  width: 100%;
  padding: 20px 0;
}

.status-content h2 {
  font-size: 24px;
  margin-bottom: 12px;
  color: #1a1a1a;
}

.status-content p {
  color: #666;
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.5;
}

.status-content a {
  display: inline-block;
  padding: 12px 24px;
  background: #ffd500;
  color: #1a1a1a;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
}

.status-content a:active {
  transform: scale(0.98);
  background: #ffb700;
}

/* Tablet styles (min-width: 600px) */
@media (min-width: 600px) {
  body {
    padding: 16px;
  }

  .app {
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-height: 90vh;
    height: auto;
    min-height: 500px;
  }

  .app-header {
    padding: 20px 24px;
    border-radius: 16px 16px 0 0;
  }

  .logo-circle {
    width: 60px;
    height: 60px;
    font-size: 22px;
  }

  .app-header h1 {
    font-size: 20px;
  }

  .app-header p {
    font-size: 13px;
  }

  .chat-container {
    padding: 28px 24px;
  }

  form {
    max-width: 500px;
  }

  .welcome-content {
    padding: 30px 20px;
  }

  .welcome-content h2 {
    font-size: 28px;
    margin-bottom: 14px;
  }

  .welcome-content p {
    font-size: 16px;
  }

  .status-content {
    padding: 30px 20px;
  }

  .status-icon {
    width: 72px;
    height: 72px;
    font-size: 36px;
    margin-bottom: 24px;
  }

  .status-content h2 {
    font-size: 26px;
  }

  .status-content p {
    font-size: 16px;
  }
}

/* Desktop styles (min-width: 900px) */
@media (min-width: 900px) {
  body {
    padding: 20px;
  }

  .fullheight {
    max-width: 900px;
  }

  .app {
    border-radius: 20px;
    max-height: 90vh;
  }

  .app-header {
    padding: 24px 32px;
    border-radius: 20px 20px 0 0;
  }

  .logo-circle {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    font-size: 24px;
  }

  .app-header h1 {
    font-size: 24px;
  }

  .app-header p {
    font-size: 14px;
    margin-top: 4px;
  }

  .chat-container {
    padding: 32px;
  }

  form {
    max-width: 600px;
  }

  form > div {
    margin-bottom: 24px;
  }

  button[type="submit"]:hover {
    background: #ffb700;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 213, 0, 0.3);
  }

  button[type="submit"]:active {
    transform: translateY(0);
  }

  .welcome-content {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px;
  }

  .welcome-content h2 {
    font-size: 32px;
    margin-bottom: 16px;
  }

  .status-content {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px;
  }

  .status-icon {
    width: 80px;
    height: 80px;
    font-size: 40px;
    margin-bottom: 24px;
  }

  .status-content h2 {
    font-size: 28px;
    margin-bottom: 16px;
  }

  .status-content a:hover {
    background: #ffb700;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 213, 0, 0.3);
  }

  .status-content a:active {
    transform: translateY(0);
  }
}
