/* Korean Mudang Oracle Theme - Main Stylesheet */

  @import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@300;400;600;700;900&family=Cinzel+Decorative:wght@400;700&display=swap');

  :root {
    --crimson: #7B0050;
    --deep-red: #4a0030;
    --blood: #9B1060;
    --gold: #C8A84B;
    --gold-bright: #FFD700;
    --parchment: #150010;
    --ember: #CC2288;
    --ash: #200018;
  }

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

  body {
    background: #0d0010;
    color: #f0c8e0;
    font-family: 'Noto Serif KR', serif;
    min-height: 100vh;
    overflow-x: hidden;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Ccircle cx='10' cy='10' r='4' fill='%23C8A84B'/%3E%3C/svg%3E") 10 10, auto;
  }

  #particles-canvas {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; z-index: 0; opacity: 0.4;
  }

  body::before {
    content: '';
    position: fixed; inset: 0;
    background:
      radial-gradient(ellipse at 50% 0%, rgba(120,0,80,0.7) 0%, transparent 60%),
      radial-gradient(ellipse at 50% 100%, rgba(80,0,60,0.5) 0%, transparent 50%),
      radial-gradient(ellipse at 0% 50%, rgba(100,0,40,0.3) 0%, transparent 50%),
      radial-gradient(ellipse at 100% 50%, rgba(80,0,60,0.3) 0%, transparent 50%),
      repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(120,0,80,0.03) 2px, rgba(120,0,80,0.03) 4px);
    z-index: 0; pointer-events: none;
  }

  /* === TAEGEUK === */
  .taegeuk-container {
    position: fixed; top: 20px; right: 20px;
    width: 80px; height: 80px;
    animation: spinSlow 20s linear infinite; opacity: 0.4; z-index: 1;
  }
  .taegeuk-container-left {
    position: fixed; top: 20px; left: 20px;
    width: 80px; height: 80px;
    animation: spinSlow 25s linear infinite reverse; opacity: 0.4; z-index: 1;
  }
  @keyframes spinSlow { to { transform: rotate(360deg); } }
  @keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

  .wrapper { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; padding: 20px; }

  /* === HEADER === */
  .header { text-align: center; padding: 60px 20px 40px; }
  .header-divider { display: flex; align-items: center; gap: 15px; margin: 10px 0; }
  .header-divider::before, .header-divider::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
  }
  .header-divider span { color: var(--gold); font-size: 1.4em; }

  .site-title-ko {
    font-family: 'Noto Serif KR', serif;
    font-size: clamp(2.5rem, 8vw, 5rem); font-weight: 900; color: var(--gold);
    letter-spacing: 0.2em;
    text-shadow: 0 0 20px rgba(200,168,75,0.8), 0 0 60px rgba(120,0,80,1), 0 0 100px rgba(100,0,60,0.5);
    animation: pulseGlow 3s ease-in-out infinite; line-height: 1; margin: 10px 0;
  }
  .site-title-en {
    font-family: 'Cinzel Decorative', cursive; font-size: clamp(0.7rem, 2vw, 1rem);
    color: rgba(200,168,75,0.7); letter-spacing: 0.4em; text-transform: uppercase; margin-bottom: 5px;
  }
  .subtitle { font-size: 0.85rem; color: rgba(240,200,160,0.6); letter-spacing: 0.3em; margin-top: 8px; }
  @keyframes pulseGlow {
    0%,100% { text-shadow: 0 0 20px rgba(200,168,75,0.8), 0 0 60px rgba(120,0,80,1); }
    50% { text-shadow: 0 0 40px rgba(200,168,75,1), 0 0 80px rgba(180,0,120,0.8), 0 0 120px rgba(100,0,60,0.6); }
  }

  .mudang-svg-container { width: 200px; height: 220px; margin: 0 auto 30px; animation: float 4s ease-in-out infinite; }
  .trigrams { display: flex; justify-content: center; gap: 20px; margin: 15px 0; font-size: 1.8rem; color: rgba(200,168,75,0.5); letter-spacing: 0.3em; }

  /* === PANELS === */
  .intro-panel {
    background: linear-gradient(135deg, rgba(80,0,50,0.5), rgba(21,0,16,0.8));
    border: 1px solid rgba(200,168,75,0.3); border-radius: 4px; padding: 30px; margin: 0 0 40px;
    position: relative; box-shadow: 0 0 40px rgba(120,0,80,0.4), inset 0 0 60px rgba(0,0,0,0.5);
  }
  .intro-panel::before {
    content: '★'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: #0d0010; color: var(--gold); padding: 0 10px; font-size: 1.2em;
  }
  .intro-panel p { line-height: 1.9; font-size: 0.9rem; color: rgba(240,200,160,0.85); text-align: center; }
  .intro-panel strong { color: var(--gold); }

  .payment-section {
    background: linear-gradient(180deg, rgba(120,0,80,0.2), rgba(80,0,60,0.3));
    border: 1px solid rgba(200,168,75,0.4); border-radius: 4px; padding: 35px; margin-bottom: 40px;
    text-align: center; box-shadow: 0 0 30px rgba(150,0,100,0.2);
  }
  .payment-title { font-family: 'Noto Serif KR', serif; font-size: 1.3rem; color: var(--gold); letter-spacing: 0.2em; margin-bottom: 8px; font-weight: 700; }
  .payment-subtitle { font-size: 0.8rem; color: rgba(240,200,160,0.6); letter-spacing: 0.2em; margin-bottom: 25px; }
  .price-badge {
    display: inline-block; background: linear-gradient(135deg, var(--gold), #8B6914);
    color: #0d0010; font-size: 1.8rem; font-weight: 900; padding: 12px 35px;
    border-radius: 3px; letter-spacing: 0.1em; margin-bottom: 20px; box-shadow: 0 4px 20px rgba(200,168,75,0.5);
  }
  .pay-btn {
    display: block; width: 100%; max-width: 320px; margin: 0 auto; padding: 16px;
    background: linear-gradient(135deg, #6B0045, #9B1060, #6B0045);
    color: var(--gold); border: 1px solid var(--gold);
    font-family: 'Noto Serif KR', serif; font-size: 1.1rem; font-weight: 700;
    letter-spacing: 0.3em; cursor: pointer; transition: all 0.3s; position: relative; overflow: hidden;
  }
  .pay-btn::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,215,0,0.1) 50%, transparent 60%);
    transform: translateX(-100%); transition: transform 0.5s;
  }
  .pay-btn:hover::before { transform: translateX(100%); }
  .pay-btn:hover { box-shadow: 0 0 30px rgba(150,0,100,0.8), 0 0 60px rgba(100,0,70,0.4); transform: translateY(-2px); }

  .form-section {
    display: none;
    background: linear-gradient(180deg, rgba(21,0,16,0.9), rgba(35,10,30,0.95));
    border: 1px solid rgba(200,168,75,0.4); border-radius: 4px; padding: 40px 35px; margin-bottom: 40px;
    box-shadow: 0 0 60px rgba(120,0,80,0.5); animation: fadeIn 0.8s ease;
  }
  .form-title { font-family: 'Noto Serif KR', serif; font-size: 1.4rem; color: var(--gold); text-align: center; letter-spacing: 0.25em; margin-bottom: 30px; font-weight: 700; }
  .form-group { margin-bottom: 22px; }
  label { display: block; color: rgba(200,168,75,0.9); font-size: 0.8rem; letter-spacing: 0.25em; margin-bottom: 8px; font-weight: 600; }

  input[type="text"], input[type="number"], input[type="date"], input[type="time"] {
    width: 100%; padding: 13px 16px;
    background: rgba(0,0,0,0.5); border: 1px solid rgba(200,168,75,0.35);
    color: #f0c8e0; font-family: 'Noto Serif KR', serif; font-size: 0.95rem;
    outline: none; transition: border-color 0.3s, box-shadow 0.3s; border-radius: 2px;
  }
  input:focus { border-color: var(--gold); box-shadow: 0 0 15px rgba(200,168,75,0.3); }
  input[type="date"]::-webkit-calendar-picker-indicator,
  input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(1) sepia(1) saturate(2); opacity: 0.7; cursor: pointer; }
  .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

  .submit-btn {
    display: block; width: 100%; padding: 18px;
    background: linear-gradient(135deg, #4a0030, #7B0050, #4a0030);
    color: var(--gold); border: 1px solid rgba(200,168,75,0.6);
    font-family: 'Noto Serif KR', serif; font-size: 1.2rem; font-weight: 700;
    letter-spacing: 0.4em; cursor: pointer; margin-top: 30px; transition: all 0.3s;
  }
  .submit-btn:hover { background: linear-gradient(135deg, #7B0050, #9B1060, #7B0050); box-shadow: 0 0 40px rgba(150,0,100,0.6); }
  .error-msg { color: #ff6666; font-size: 0.8rem; text-align: center; margin-top: 10px; letter-spacing: 0.15em; display: none; }

  /* === RITUAL === */
  .ritual-section { display: none; text-align: center; padding: 60px 20px; animation: fadeIn 1s ease; }
  .ritual-title { font-size: 1.1rem; color: var(--gold); letter-spacing: 0.3em; margin-bottom: 10px; }
  .bell-fan-container { display: flex; justify-content: center; align-items: flex-end; gap: 60px; margin: 30px 0 50px; }
  .ritual-object { text-align: center; }
  .ritual-object svg { filter: drop-shadow(0 0 20px rgba(200,168,75,0.8)); }
  .bell-label, .fan-label { display: block; color: var(--gold); font-size: 0.75rem; letter-spacing: 0.3em; margin-top: 10px; }

  .bell-svg { animation: bellRing 0.5s ease-in-out infinite alternate; transform-origin: 65px 95px; }
  @keyframes bellRing { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
  .fan-svg { animation: fanWave 1.4s ease-in-out infinite alternate; transform-origin: 55px 88px; }
  @keyframes fanWave { from { transform: rotate(-20deg) scale(0.95); } to { transform: rotate(20deg) scale(1.05); } }

  .incantation { color: rgba(200,168,75,0.75); font-size: 0.85rem; letter-spacing: 0.25em; margin: 20px 0; animation: flicker 2s ease-in-out infinite; }
  @keyframes flicker { 0%,100% { opacity:1; } 50% { opacity:0.35; } }

  .progress-bar-outer { width: 300px; height: 4px; background: rgba(120,0,80,0.3); margin: 30px auto; border-radius: 2px; overflow: hidden; }
  .progress-bar-inner { height: 100%; width: 0%; background: linear-gradient(90deg, #9B1060, var(--gold)); border-radius: 2px; transition: width 0.3s ease; box-shadow: 0 0 10px rgba(200,168,75,0.6); }

  /* === RESULT === */
  .result-section { display: none; animation: fadeIn 1.2s ease; }
  .result-header { text-align: center; margin-bottom: 40px; }
  .result-header h2 { font-size: 1.8rem; color: var(--gold); letter-spacing: 0.25em; font-weight: 900; text-shadow: 0 0 30px rgba(200,168,75,0.6); margin-bottom: 10px; }
  .result-name { color: rgba(240,200,160,0.7); font-size: 0.85rem; letter-spacing: 0.3em; }

  .struggle-card {
    background: linear-gradient(135deg, rgba(80,0,50,0.4), rgba(21,0,16,0.7));
    border: 1px solid rgba(200,168,75,0.35); border-radius: 4px; padding: 30px; margin-bottom: 25px;
    position: relative; box-shadow: 0 4px 30px rgba(120,0,80,0.3);
  }
  .struggle-card::before {
    content: attr(data-num); position: absolute; top: -14px; left: 25px;
    background: var(--crimson); border: 1px solid var(--gold); color: var(--gold); font-size: 0.75rem; padding: 3px 12px; letter-spacing: 0.2em;
  }
  .struggle-card h3 { color: var(--gold); font-size: 1.05rem; letter-spacing: 0.2em; margin-bottom: 12px; font-weight: 700; }
  .struggle-card p { color: rgba(240,200,160,0.85); font-size: 0.88rem; line-height: 1.9; margin-bottom: 15px; }
  .resolution-tag { display: inline-block; background: rgba(100,0,60,0.5); border: 1px solid rgba(200,168,75,0.5); color: var(--gold-bright); font-size: 0.75rem; padding: 5px 14px; letter-spacing: 0.2em; font-weight: 700; }

  .affirmation-section {
    background: linear-gradient(135deg, rgba(100,0,65,0.3), rgba(70,0,50,0.5), rgba(100,0,65,0.3));
    border: 1px solid rgba(200,168,75,0.5); border-radius: 4px; padding: 40px 35px;
    text-align: center; margin-top: 40px; position: relative;
    box-shadow: 0 0 60px rgba(120,0,80,0.4), inset 0 0 40px rgba(0,0,0,0.4);
  }
  .affirmation-section::before, .affirmation-section::after { content: '☯'; position: absolute; top: 15px; color: rgba(200,168,75,0.3); font-size: 2rem; }
  .affirmation-section::before { left: 20px; } .affirmation-section::after { right: 20px; }
  .affirmation-title { font-family: 'Noto Serif KR', serif; font-size: 1.4rem; color: var(--gold); letter-spacing: 0.3em; font-weight: 700; margin-bottom: 25px; text-shadow: 0 0 20px rgba(200,168,75,0.6); }
  .affirmation-text { font-size: 1rem; line-height: 2.1; color: rgba(240,200,160,0.9); font-style: italic; margin-bottom: 20px; }
  .affirmation-closing { color: var(--gold); font-size: 1.1rem; font-weight: 700; letter-spacing: 0.4em; margin-top: 25px; text-shadow: 0 0 15px rgba(200,168,75,0.5); }

  .section-ornament { text-align: center; color: var(--gold); opacity: 0.4; font-size: 1.5rem; letter-spacing: 0.5em; margin: 20px 0; }

  /* === MUSIC INDICATOR === */
  .music-indicator {
    position: fixed; bottom: 20px; right: 20px; z-index: 10;
    display: flex; align-items: center; gap: 10px;
    background: rgba(21,0,16,0.85); border: 1px solid rgba(200,168,75,0.3);
    padding: 8px 14px; border-radius: 30px; cursor: pointer; transition: all 0.3s;
  }
  .music-indicator:hover { border-color: rgba(200,168,75,0.7); }
  .music-bars { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
  .music-bars span { display: block; width: 3px; background: var(--gold); border-radius: 2px; animation: musicBar 0.8s ease-in-out infinite alternate; }
  .music-bars span:nth-child(1) { height: 6px; animation-delay: 0s; }
  .music-bars span:nth-child(2) { height: 12px; animation-delay: 0.15s; }
  .music-bars span:nth-child(3) { height: 9px; animation-delay: 0.3s; }
  .music-bars span:nth-child(4) { height: 14px; animation-delay: 0.1s; }
  .music-bars span:nth-child(5) { height: 7px; animation-delay: 0.25s; }
  @keyframes musicBar { from { transform: scaleY(0.3); } to { transform: scaleY(1); } }
  .music-bars.paused span { animation-play-state: paused; opacity: 0.4; }
  .music-label { font-size: 0.65rem; color: rgba(200,168,75,0.7); letter-spacing: 0.15em; }

  .loading-dots { display: inline-flex; gap: 6px; margin-top: 10px; }
  .loading-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: dotBounce 1.4s ease-in-out infinite; }
  .loading-dots span:nth-child(2) { animation-delay: 0.2s; }
  .loading-dots span:nth-child(3) { animation-delay: 0.4s; }
  @keyframes dotBounce { 0%,80%,100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
  @keyframes fadeIn { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }

  .footer { text-align: center; padding: 40px 20px; color: rgba(200,168,75,0.3); font-size: 0.7rem; letter-spacing: 0.2em; border-top: 1px solid rgba(200,168,75,0.1); margin-top: 60px; }

  @media (max-width: 500px) {
    .row-2 { grid-template-columns: 1fr; }
    .bell-fan-container { gap: 25px; }
    .form-section, .payment-section { padding: 25px 18px; }
  }
