@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
  --primary-color: #ff6b6b;
  --secondary-color: #4ecdc4;
  --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --text-main: #f7f7f7;
  --text-muted: #b0b0b0;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-gradient);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-main);
  padding: 20px;
}

/* Glassmorphism Container */
.glass-container {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  padding: 40px;
  max-width: 850px;
  width: 100%;
  animation: fadeIn 0.8s ease-out;
}

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  text-align: center;
  background: -webkit-linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

p.subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 30px;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
}

.form-group input {
  width: 100%;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.form-group input:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 10px rgba(78, 205, 196, 0.3);
}

.unit-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
  gap: 15px;
}

.unit-toggle label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

.unit-toggle label:hover {
  color: var(--text-main);
}

.unit-toggle input[type="radio"] {
  accent-color: var(--secondary-color);
}

.btn-submit {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

.btn-submit:active {
  transform: translateY(0);
}

.error-msg {
  color: #ff4757;
  font-size: 0.85rem;
  margin-top: 5px;
  display: none;
}

/* Result Pages specific styles */
.result-header {
  text-align: center;
  margin-bottom: 30px;
}

.whr-value {
  font-size: 3.5rem;
  font-weight: 700;
  margin: 10px 0;
  color: var(--text-main);
}

.shape-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.badge-pear {
  background: rgba(46, 213, 115, 0.2);
  color: #2ed573;
  border: 1px solid #2ed573;
}

.badge-moderate {
  background: rgba(255, 165, 2, 0.2);
  color: #ffa502;
  border: 1px solid #ffa502;
}

.badge-apple {
  background: rgba(255, 71, 87, 0.2);
  color: #ff4757;
  border: 1px solid #ff4757;
}

.info-section {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  color: var(--secondary-color);
  font-size: 1.1rem;
}

.info-section p, .info-section ul {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.info-section ul {
  padding-left: 20px;
  margin-top: 10px;
}

.info-section li {
  margin-bottom: 8px;
}

.action-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 14px;
  border-radius: 12px;
  margin-top: 30px;
  transition: background 0.3s ease;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.measurement-guide {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 25px;
  margin-top: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.measurement-guide h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  color: var(--secondary-color);
  font-size: 1.1rem;
}

.measurement-guide p, .measurement-guide ul {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.measurement-guide ul {
  padding-left: 20px;
}

.measurement-guide li {
  margin-bottom: 8px;
}

.measurement-guide strong {
  color: var(--text-main);
}

.guide-image {
  text-align: center;
  margin-top: 20px;
}

.guide-image img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-layout {
  display: flex;
  gap: 30px;
  margin-bottom: 25px;
  align-items: center;
}

.form-inputs-section {
  flex: 1;
}

.form-guide-section {
  flex: 1;
  background: rgba(0, 0, 0, 0.15);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
  .form-layout {
    flex-direction: column;
  }
}
