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

:root {
  --primary: #c11a55;
  --secondary: #fbe5c6;
  --background: #ffffff;
  --text: #171717;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
  --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  font-weight: 300;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Subtle Grainy Overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3仿真%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

header {
  text-align: center;
  margin-bottom: 60px;
}

h1 {
  font-weight: 200;
  font-size: 3rem;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 10px;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--primary);
  opacity: 0.8;
  font-weight: 400;
}

/* Bento Grid Layout */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  gap: 24px;
}

.bento-item {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 30px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.bento-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.08);
}

/* Pendulum Area */
.main-pendulum {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  border: none;
}

.pendulum-visual {
  width: 120px;
  height: 120px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  margin-bottom: 30px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pendulum-visual::after {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
}

/* Buttons and Interactions */
button {
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
}

.cta-button {
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  padding: 16px 32px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 15px rgba(193, 26, 85, 0.3);
}

.cta-button:hover {
  background-color: #a01546;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(193, 26, 85, 0.4);
}

.cta-button:active {
  transform: scale(0.98);
}

.secondary-box {
  grid-column: span 2;
}

.info-card {
  grid-column: span 1;
}

/* Typography elements */
h2 {
  font-weight: 400;
  font-size: 1.4rem;
  margin-bottom: 15px;
}

p {
  font-size: 0.95rem;
  color: #4a4a4a;
}

/* Links */
a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

a:hover {
  border-bottom: 1px solid var(--primary);
}

/* Result Display */
.answer-display {
  font-size: 4rem;
  font-weight: 200;
  margin-top: 20px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* Responsive Design */
@media (max-width: 992px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  
  .main-pendulum, .secondary-box, .info-card {
    grid-column: span 1;
  }

  h1 {
    font-size: 2.2rem;
  }
}

/* Custom Scrollbar for modern feel */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #f0d5ae;
}