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

    body {
      font-family: 'Georgia', 'Times New Roman', serif;
      background: linear-gradient(135deg, #f5e6d3 0%, #e8d5b7 100%);
      min-height: 100vh;
      overflow-x: hidden;
      position: relative;
    }

    body::before {
      content: '';
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-image: 
        radial-gradient(circle at 20% 30%, rgba(139, 90, 43, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(184, 134, 11, 0.05) 0%, transparent 50%);
      pointer-events: none;
      z-index: 0;
    }

    .container {
      position: relative;
      max-width: 500px;
      margin: 0 auto;
      padding: 8px;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      z-index: 1;
    }

    /* Title Area */
    .title-area {
      height: 15vh;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      position: relative;
      padding: 10px;
    }

    .title-decoration {
      width: 30px;
      height: 30px;
      background: linear-gradient(135deg, #b8860b, #daa520);
      opacity: 0.6;
      position: absolute;
    }

    .title-decoration.left {
      left: 10px;
      top: 50%;
      transform: translateY(-50%) rotate(45deg);
      border-radius: 4px 0 4px 0;
    }

    .title-decoration.right {
      right: 10px;
      top: 50%;
      transform: translateY(-50%) rotate(45deg);
      border-radius: 0 4px 0 4px;
    }

    .main-title {
      font-size: clamp(20px, 5vw, 24px);
      font-weight: bold;
      color: #8b5a2b;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
      margin-bottom: 8px;
      line-height: 1.2;
    }

    .subtitle {
      font-size: 14px;
      color: #666;
      font-style: italic;
    }

    /* Game Area */
    .game-area {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 20px 0;
    }

    .input-container {
      width: 100%;
      max-width: 350px;
      margin-bottom: 30px;
    }

    .name-input {
      width: 100%;
      height: 48px;
      border-radius: 8px;
      border: 1px solid #8b5a2b;
      background: #faf5ef;
      padding: 0 16px;
      font-size: 16px;
      text-align: center;
      color: #333;
      transition: all 0.3s ease;
    }

    .name-input:focus {
      outline: none;
      border-color: #daa520;
      box-shadow: 0 0 8px rgba(218, 165, 32, 0.3);
    }

    .name-input:disabled {
      background: #e0e0e0;
      cursor: not-allowed;
    }

    .name-input::placeholder {
      color: #999;
    }

    /* Roulette */
    .roulette-container {
      position: relative;
      width: min(70vw, 300px);
      height: min(70vw, 300px);
      margin: 0 auto;
    }

    .pointer {
      position: absolute;
      top: -10px;
      left: 50%;
      transform: translateX(-50%);
      width: 0;
      height: 0;
      border-left: 15px solid transparent;
      border-right: 15px solid transparent;
      border-top: 25px solid #8b0000;
      filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
      z-index: 10;
    }

    .pointer::after {
      content: '';
      position: absolute;
      top: -25px;
      left: -13px;
      width: 26px;
      height: 23px;
      border: 2px solid #daa520;
      border-bottom: none;
      border-radius: 50% 50% 0 0;
    }

    #rouletteCanvas {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      border: 6px solid #daa520;
      box-shadow: 0 0 20px rgba(218, 165, 32, 0.5);
      background: white;
      transition: transform 0.1s ease;
    }

    #rouletteCanvas.spinning {
      box-shadow: 0 0 30px rgba(218, 165, 32, 0.8);
    }

    /* Button Area */
    .button-area {
      height: 20vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px 0;
    }

    .spin-button {
      width: 70%;
      max-width: 300px;
      height: 52px;
      background: linear-gradient(135deg, #8b0000, #daa520);
      border: none;
      border-radius: 10px;
      color: white;
      font-size: 18px;
      font-weight: bold;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
      transition: all 0.3s ease;
    }

    .spin-button:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    }

    .spin-button:active:not(:disabled) {
      transform: scale(0.95);
    }

    .spin-button:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      background: #999;
    }

    .button-icon {
      font-size: 20px;
    }

    /* Popup */
    .popup-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.8);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      transition: opacity 0.3s ease;
    }

    .popup-overlay.hidden {
      opacity: 0;
      pointer-events: none;
    }

    .popup-content {
      width: 85%;
      max-width: 320px;
      background: white;
      border-radius: 12px;
      border: 2px solid #daa520;
      padding: 30px 20px 20px;
      position: relative;
      text-align: center;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
      animation: popupSlideIn 0.4s ease;
    }

    @keyframes popupSlideIn {
      from {
        transform: scale(0.8) translateY(-20px);
        opacity: 0;
      }
      to {
        transform: scale(1) translateY(0);
        opacity: 1;
      }
    }

    .scroll-decoration {
      position: absolute;
      top: -15px;
      left: 50%;
      transform: translateX(-50%);
      width: 80px;
      height: 15px;
      background: linear-gradient(135deg, #b8860b, #daa520);
      border-radius: 8px 8px 0 0;
      box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
    }

    .occupation-icon {
      width: 60px;
      height: 60px;
      margin: 0 auto 15px;
      font-size: 48px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .occupation-name {
      font-size: 24px;
      font-weight: bold;
      color: #daa520;
      margin-bottom: 10px;
      text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    }

    .player-name {
      font-size: 18px;
      color: #8b5a2b;
      margin-bottom: 15px;
      font-weight: bold;
    }

    .blessing-text {
      font-size: 16px;
      color: #555;
      line-height: 1.5;
      padding: 0 15px;
      margin-bottom: 20px;
    }

    .retry-button {
      width: 60%;
      height: 40px;
      background: linear-gradient(135deg, #8b0000, #daa520);
      border: none;
      border-radius: 8px;
      color: white;
      font-size: 16px;
      font-weight: bold;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .retry-button:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .retry-button:active {
      transform: scale(0.95);
    }

    /* Decorations */
    .decoration {
      position: fixed;
      font-size: 30px;
      opacity: 0.3;
      z-index: 0;
    }

    .decoration.top-left {
      top: 20px;
      left: 20px;
    }

    .decoration.bottom-right {
      bottom: 20px;
      right: 20px;
    }

    /* Responsive */
    @media (max-width: 480px) {
      .main-title {
        font-size: 18px;
      }

      .subtitle {
        font-size: 12px;
      }

      .name-input {
        height: 44px;
        font-size: 14px;
      }

      .spin-button {
        height: 48px;
        font-size: 16px;
      }
    }
