:root {
    --bg-color: #0d0e15;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  }
  
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.8;
  }
  
  /* Animated Background Mesh */
  .bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: #0d0e15;
  }
  
  .blob {
    position: absolute;
    filter: blur(90px);
    opacity: 0.6;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out alternate;
  }
  
  .blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: #4c1d95;
    animation-delay: 0s;
  }
  
  .blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: #0f172a;
    animation-delay: -5s;
  }
  
  .blob-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: #1e1b4b;
    animation-delay: -10s;
  }
  
  @keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 15%) scale(1.1); }
  }
  
  /* Layout */
  .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
  
  /* Glassmorphism Utilities */
  .glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .glass-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
  }
  
  /* Header */
  .glass-header {
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
  }
  
  .glass-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
  }
  
  .brand-title {
    margin: 0;
    font-size: 3.2rem;
    letter-spacing: -2px;
    font-weight: 800;
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: 0 4px 20px rgba(142, 197, 252, 0.2);
  }
  
  .glass-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
  }

  /* Modal Enhancements */
  #how-it-works-modal {
    transition: opacity 0.3s ease;
  }
  
  #how-it-works-modal .glass-panel {
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(15,23,42,0.6);
  }
  
  /* Logic Explainer */
  .logic-explainer h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-align: center;
  }
  
  .explainer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  
  .explainer-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: background 0.3s ease;
  }
  
  .explainer-card:hover {
    background: rgba(255, 255, 255, 0.05);
  }
  
  .explainer-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  
  .explainer-card h3 {
    margin-bottom: 0.75rem;
    color: #e2e8f0;
  }
  
  .explainer-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
  }
  
  /* Form */
  #numerology-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: flex-end;
  }
  
  .input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
  }
  
  input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
  }
  
  input:focus {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  }
  
  /* Ensure the date placeholder is readable on some browsers */
  input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.6;
    cursor: pointer;
  }
  input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
  }
  
  .generate-btn {
    background: linear-gradient(135deg, var(--accent) 0%, #818cf8 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    height: 54px; /* Matches input heights approximately */
  }
  
  .generate-btn:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
  }
  
  .generate-btn:active {
    transform: translateY(0);
  }
  
  /* Loader */
  .loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  .hidden {
    display: none !important;
  }
  
  /* Results */
  .result-header {
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .result-header h2 {
    color: var(--accent);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
  }
  
  .result-header h3 {
    font-size: 2.5rem;
    font-weight: 700;
  }
  
  .core-numbers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
  }
  
  .number-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease;
  }
  
  .number-card:hover {
    transform: translateY(-4px);
  }
  
  .number-card.highlight {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.1) 0%, rgba(0,0,0,0) 100%);
    border-color: rgba(99, 102, 241, 0.3);
  }
  
  .number-card h4 {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
  }
  
  .big-num {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
  
  .number-card.highlight .big-num {
    background: linear-gradient(135deg, #c084fc 0%, #818cf8 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
  
  .meaning-text {
    font-size: 0.9rem;
    color: #cbd5e1;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
    white-space: pre-line;
    width: 100%;
    margin-top: 1rem;
    transition: color 0.3s ease;
  }

  .meaning-text.expanded {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
  }

  .read-more-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent);
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
  }

  .read-more-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: #c084fc;
  }
  
  .cycles-section {
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
  }
  
  .cycles-section h3 {
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
  }
  
  .cycle-grid {
    background: rgba(0,0,0,0.15);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--glass-border);
  }
  
  .cycle-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .cycle-label {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  
  .cycle-val {
    font-size: 2rem;
    font-weight: 700;
  }
  
  .cycle-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
  }
  
  /* Animations */
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
