:root {
      --bg: #0f0f13;
      --card: #1a1a22;
      --card-hover: #22222c;
      --accent: #ff6b35;
      --accent2: #f7c948;
      --text: #f0f0f5;
      --muted: #8a8a9a;
      --success: #2ecc71;
      --border: #2a2a35;
      --low: #3498db;
      --mid: #2ecc71;
      --high: #f39c12;
      --higher: #e74c3c;
      --highest: #9b59b6;
      --na: #7f8c8d;
    }

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

    body {
      font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      overflow-x: hidden;
      background-image: 
        radial-gradient(ellipse at 20% 20%, rgba(255, 107, 53, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(247, 201, 72, 0.06) 0%, transparent 50%);
    }

    .container {
      max-width: 1100px;
      margin: 0 auto;
      padding: 24px 16px 80px;
    }

    header {
      text-align: center;
      margin-bottom: 32px;
      padding-top: 12px;
    }

    header h1 {
      font-size: clamp(1.8rem, 5vw, 2.6rem);
      font-weight: 900;
      background: linear-gradient(135deg, var(--accent), var(--accent2));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      letter-spacing: 0.02em;
    }

    header p {
      color: var(--muted);
      margin-top: 8px;
      font-size: 0.95rem;
    }

    /* Filters */
    .filters {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 24px;
      margin-bottom: 28px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    }

    .filter-section {
      margin-bottom: 20px;
    }

    .filter-section:last-child {
      margin-bottom: 0;
    }

    .filter-title {
      font-size: 0.85rem;
      font-weight: 700;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .filter-title span {
      background: var(--accent);
      color: #fff;
      font-size: 0.7rem;
      padding: 2px 8px;
      border-radius: 999px;
      font-weight: 700;
    }

    .chips {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .chip {
      appearance: none;
      border: 1.5px solid var(--border);
      background: transparent;
      color: var(--text);
      padding: 8px 16px;
      border-radius: 999px;
      font-size: 0.9rem;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
      font-family: inherit;
      user-select: none;
    }

    .chip:hover {
      border-color: var(--accent);
      background: rgba(255, 107, 53, 0.1);
    }

    .chip.active {
      background: var(--accent);
      border-color: var(--accent);
      color: #fff;
      box-shadow: 0 4px 12px rgba(255, 107, 53, 0.35);
    }

    .chip.price-low.active { background: var(--low); border-color: var(--low); box-shadow: 0 4px 12px rgba(52,152,219,0.35); }
    .chip.price-mid.active { background: var(--mid); border-color: var(--mid); box-shadow: 0 4px 12px rgba(46,204,113,0.35); }
    .chip.price-high.active { background: var(--high); border-color: var(--high); box-shadow: 0 4px 12px rgba(243,156,18,0.35); }
    .chip.price-higher.active { background: var(--higher); border-color: var(--higher); box-shadow: 0 4px 12px rgba(231,76,60,0.35); }
    .chip.price-highest.active { background: var(--highest); border-color: var(--highest); box-shadow: 0 4px 12px rgba(155,89,182,0.35); }
    .chip.price-na.active { background: var(--na); border-color: var(--na); box-shadow: 0 4px 12px rgba(127,140,141,0.35); }

    .price-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin-top: 10px;
      font-size: 0.78rem;
      color: var(--muted);
    }

    .price-legend span {
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      display: inline-block;
    }

    /* Main spinner area */
    .spinner-area {
      display: grid;
      grid-template-columns: 1fr;
      gap: 24px;
    }

    @media (min-width: 800px) {
      .spinner-area {
        grid-template-columns: 1fr 1fr;
      }
    }

    .wheel-card, .result-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 24px;
      padding: 28px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.3);
      position: relative;
      overflow: hidden;
    }

    .wheel-wrapper {
      position: relative;
      width: 100%;
      max-width: 340px;
      margin: 0 auto;
      aspect-ratio: 1;
    }

    #wheelCanvas {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      box-shadow: 0 0 0 8px #2a2a35, 0 0 40px rgba(255,107,53,0.15);
    }

    .pointer {
      position: absolute;
      top: -6px;
      left: 50%;
      transform: translateX(-50%);
      width: 0;
      height: 0;
      border-left: 14px solid transparent;
      border-right: 14px solid transparent;
      border-top: 28px solid var(--accent);
      z-index: 10;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
    }

    .spin-btn {
      display: block;
      width: 100%;
      max-width: 280px;
      margin: 24px auto 0;
      padding: 16px 32px;
      font-size: 1.15rem;
      font-weight: 700;
      font-family: inherit;
      border: none;
      border-radius: 999px;
      background: linear-gradient(135deg, var(--accent), #ff8c5a);
      color: #fff;
      cursor: pointer;
      transition: transform 0.15s, box-shadow 0.15s;
      box-shadow: 0 6px 24px rgba(255,107,53,0.4);
      letter-spacing: 0.03em;
    }

    .spin-btn:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 10px 28px rgba(255,107,53,0.5);
    }

    .spin-btn:active:not(:disabled) {
      transform: translateY(0);
    }

    .spin-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .count-info {
      text-align: center;
      margin-top: 14px;
      font-size: 0.9rem;
      color: var(--muted);
    }

    .count-info strong {
      color: var(--accent2);
    }

    /* Result */
    .result-placeholder {
      text-align: center;
      padding: 40px 20px;
      color: var(--muted);
    }

    .result-placeholder .icon {
      font-size: 3rem;
      margin-bottom: 12px;
      opacity: 0.5;
    }

    .result-content {
      display: none;
      animation: fadeIn 0.5s ease;
    }

    .result-content.show {
      display: block;
    }

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

    .result-name {
      font-size: 1.8rem;
      font-weight: 900;
      text-align: center;
      margin-bottom: 16px;
      line-height: 1.3;
    }

    .result-meta {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px;
      margin-bottom: 20px;
    }

    .badge {
      padding: 6px 14px;
      border-radius: 999px;
      font-size: 0.85rem;
      font-weight: 600;
    }

    .badge.mall {
      background: rgba(255,255,255,0.08);
      color: var(--text);
    }

    .badge.price-low { background: rgba(52,152,219,0.2); color: #5dade2; }
    .badge.price-mid { background: rgba(46,204,113,0.2); color: #58d68d; }
    .badge.price-high { background: rgba(243,156,18,0.2); color: #f5b041; }
    .badge.price-higher { background: rgba(231,76,60,0.2); color: #ec7063; }
    .badge.price-highest { background: rgba(155,89,182,0.2); color: #bb8fce; }
    .badge.price-na { background: rgba(127,140,141,0.2); color: #b0b0b0; }

    .result-desc {
      background: rgba(255,255,255,0.04);
      border-radius: 14px;
      padding: 16px;
      font-size: 0.95rem;
      color: var(--muted);
      line-height: 1.6;
      text-align: center;
      cursor: pointer;
      transition: background 0.2s;
      border: 1px solid transparent;
    }

    .result-desc:hover {
      background: rgba(255,255,255,0.07);
      border-color: var(--border);
    }

    .result-desc .hint {
      font-size: 0.75rem;
      margin-top: 6px;
      opacity: 0.6;
    }

    /* List of filtered */
    .list-section {
      margin-top: 32px;
    }

    .list-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 14px;
    }

    .list-header h2 {
      font-size: 1.1rem;
      font-weight: 700;
    }

    .restaurant-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 12px;
    }

    .resto-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 16px;
      cursor: pointer;
      transition: all 0.2s;
    }

    .resto-card:hover {
      background: var(--card-hover);
      border-color: var(--accent);
      transform: translateY(-2px);
    }

    .resto-card .name {
      font-weight: 700;
      font-size: 1.05rem;
      margin-bottom: 8px;
    }

    .resto-card .tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .resto-card .tag {
      font-size: 0.75rem;
      padding: 3px 10px;
      border-radius: 999px;
      background: rgba(255,255,255,0.06);
    }

    /* Modal */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.7);
      backdrop-filter: blur(6px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 100;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.25s;
      padding: 20px;
    }

    .modal-overlay.open {
      opacity: 1;
      pointer-events: auto;
    }

    .modal {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 28px;
      max-width: 420px;
      width: 100%;
      transform: scale(0.92);
      transition: transform 0.25s;
      box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    }

    .modal-overlay.open .modal {
      transform: scale(1);
    }

    .modal h3 {
      font-size: 1.4rem;
      font-weight: 800;
      margin-bottom: 12px;
    }

    .modal .meta {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 16px;
    }

    .modal .desc {
      color: var(--muted);
      line-height: 1.7;
      font-size: 0.95rem;
      background: rgba(255,255,255,0.04);
      padding: 14px;
      border-radius: 12px;
    }

    .modal-close {
      margin-top: 20px;
      width: 100%;
      padding: 12px;
      border: none;
      border-radius: 12px;
      background: var(--accent);
      color: #fff;
      font-weight: 700;
      font-size: 1rem;
      cursor: pointer;
      font-family: inherit;
    }

    .modal-close:hover {
      opacity: 0.9;
    }

    /* Confetti */
    .confetti {
      position: fixed;
      width: 10px;
      height: 10px;
      top: -10px;
      z-index: 200;
      pointer-events: none;
    }

    footer {
      text-align: center;
      margin-top: 40px;
      color: var(--muted);
      font-size: 0.8rem;
    }