:root {
  --bg-color: #f7f8fa;
  --card-bg: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --primary-color: #3b82f6; /* A nicer blue */
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --success-color: #10b981;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* { box-sizing: border-box; }
/* Removed html, body { height: 100% } to prevent scroll locking issues */

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
}

/* Fixed background using pseudo-element for better iOS performance */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

/* Prevent iOS zoom on inputs */
input, select, textarea, .van-field__control {
  font-size: 16px !important;
}

.m-hero {
  padding: 32px 24px 16px;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.m-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 12px;
  background: linear-gradient(135deg, #1f2937 0%, #4b5563 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.m-subtitle {
  margin: 0 0 24px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.5;
}

.m-video {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
  transform: translateZ(0); /* Fix for border-radius on video in some browsers */
  margin-bottom: 0; /* Removed margin to pull card closer */
}

.m-video video, .m-video iframe {
  width: 100%;
  height: 220px;
  display: block;
  object-fit: cover;
}

.m-logo-container {
  position: relative;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column !important;
  /* Removed justify-content: center; align-items: center; to allow align-self to work */
  padding-bottom: 8px;
}

.m-logo {
  text-align: center;
  width: 100%;
  display: flex;
  justify-content: center;
}

.m-logo img {
  max-width: 100%; /* Responsive width */
  width: 200px; /* Default optimal width */
  height: auto;
  display: block;
}

.m-like {
  display: flex;
  flex-direction: column !important;
  align-items: center !important; /* Force center alignment of children */
  justify-content: center;
  cursor: pointer;
  z-index: 10; /* Ensure it's above other elements */
  padding: 8px; /* Increase clickable area */
  margin-top: 16px;
  align-self: flex-end; /* Align the like block to the right */
  text-align: center; /* Ensure text alignment inheritance */
}

.like-count {
  display: block; /* Fallback to ensure new line */
  font-size: 12px;
  color: #666;
  margin-top: 4px;
  font-weight: 500;
  text-align: center;
}

.is-liked .like-count {
  color: #ff4d4f;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px 32px; /* Bottom padding for scroll space */
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-xl) var(--radius-xl) ; /* Only top corners rounded */
  padding: 24px 20px;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  min-height: calc(100vh - 300px); /* Ensure card takes up most of the screen */
}

/* Vant overrides for cleaner look */
.van-cell {
  padding: 16px 0 !important;
  background: transparent !important;
}

.van-cell:after {
  left: 0 !important;
  right: 0 !important;
  border-bottom-color: #f3f4f6 !important;
}

.van-field__label {
  color: var(--text-primary) !important;
  font-weight: 600;
  width: 5em; /* Fixed width for better alignment */
}

.submit-btn-container {
  margin-top: 32px;
}

.submit-btn {
  background: var(--primary-gradient) !important;
  border: none !important;
  height: 48px !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  transition: transform 0.1s;
}

.submit-btn:active {
  transform: scale(0.98);
}

.success {
  text-align: center;
  color: var(--success-color);
  margin-top: 16px;
  font-weight: 500;
  animation: fadeIn 0.5s ease;
}

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

.footer {
  text-align: center;
  padding: 24px 0 32px; /* Added bottom padding for safe area */
  color: var(--text-secondary);
  font-size: 12px;
  opacity: 0.6;
  margin-top: auto;
}
