/* ========== Legal Page ========== */

.legal-page {
      max-width: 900px;
      margin: 0 auto;
      padding: 80px 24px 60px;
    }

    .legal-nav {
      position: sticky;
      top: 60px;
      z-index: 100;
      background: var(--card-bg);
      border-bottom: 1px solid var(--border);
      padding: 12px 0;
      margin: -80px -24px 32px;
      padding-left: 24px;
      padding-right: 24px;
    }

    .legal-nav-inner {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      max-width: 900px;
      margin: 0 auto;
    }

    .legal-nav a {
      padding: 6px 14px;
      border-radius: 8px;
      color: var(--text-light);
      text-decoration: none;
      font-size: 14px;
      font-weight: 500;
      transition: all 0.2s;
      white-space: nowrap;
    }

    .legal-nav a:hover,
    .legal-nav a.active {
      background: var(--primary);
      color: #fff;
    }

    .legal-title {
      font-size: 28px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 8px;
      text-align: center;
    }

    .legal-subtitle {
      text-align: center;
      color: var(--text-light);
      margin-bottom: 40px;
      font-size: 14px;
    }

    .legal-section {
      margin-bottom: 48px;
    }

    .legal-section h2 {
      font-size: 22px;
      font-weight: 700;
      color: var(--primary-dark);
      margin-bottom: 16px;
      padding-bottom: 8px;
      border-bottom: 2px solid var(--border);
    }

    .legal-section h3 {
      font-size: 17px;
      font-weight: 600;
      color: var(--text);
      margin: 20px 0 10px;
    }

    .legal-section p {
      line-height: 1.8;
      margin-bottom: 10px;
      color: var(--text);
    }

    .legal-section ul,
    .legal-section ol {
      padding-left: 24px;
      margin-bottom: 10px;
    }

    .legal-section li {
      line-height: 1.8;
      margin-bottom: 4px;
    }

    .legal-section hr {
      border: none;
      border-top: 1px solid var(--border);
      margin: 24px 0;
    }

    .legal-section table {
      width: 100%;
      border-collapse: collapse;
      margin: 12px 0;
      font-size: 14px;
    }

    .legal-section th,
    .legal-section td {
      border: 1px solid var(--border);
      padding: 10px 14px;
      text-align: left;
    }

    .legal-section th {
      background: var(--bg);
      font-weight: 600;
    }

    .legal-section strong {
      font-weight: 600;
    }

    .back-to-top {
      position: fixed;
      bottom: 32px;
      right: 32px;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: var(--primary);
      color: #fff;
      border: none;
      cursor: pointer;
      font-size: 20px;
      box-shadow: var(--shadow);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transition: opacity 0.3s;
      z-index: 200;
    }

    .back-to-top.visible {
      opacity: 1;
    }

    .back-to-top:hover {
      background: var(--primary-dark);
    }

    @media (max-width: 640px) {
      .legal-page { padding: 70px 16px 40px; }
      .legal-nav { margin: -70px -16px 24px; padding-left: 16px; padding-right: 16px; }
      .legal-title { font-size: 22px; }
      .legal-section h2 { font-size: 19px; }
    }
