/* Legal Pages Styling - TutorBox Design System */

:root {
    --bg: #f5efe4;
    --bg-deep: #d7b99d;
    --panel: rgba(255, 249, 240, 0.86);
    --panel-strong: rgba(255, 248, 235, 0.96);
    --line: rgba(87, 57, 34, 0.14);
    --text: #2d2219;
    --muted: #6d5a4c;
    --accent: #ca5c36;
    --accent-strong: #8f3419;
    --shadow: 0 28px 70px rgba(70, 37, 18, 0.12);
    --shadow-soft: 0 16px 34px rgba(70, 37, 18, 0.08);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    min-height: 100%;
    font-family: "Trebuchet MS", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.72), transparent 36%),
        radial-gradient(circle at bottom right, rgba(202, 92, 54, 0.15), transparent 24%),
        linear-gradient(135deg, var(--bg) 0%, #ead7c0 42%, var(--bg-deep) 100%);
    min-height: 100vh;
    min-height: 100dvh;
}

body {
    overflow-x: hidden;
    line-height: 1.6;
}

.legal-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 32px 120px 32px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.legal-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 2px solid var(--line);
    position: relative;
}

.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.legal-back:hover {
    color: var(--accent-strong);
    transform: translateX(-3px);
}

.legal-back:active {
    transform: translateX(-1px);
}

.legal-header h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.last-updated {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
    margin-top: 8px;
}

.legal-content {
    flex: 1;
    margin-bottom: 48px;
}

.legal-content section {
    margin-bottom: 32px;
    padding: 28px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.legal-content section:hover {
    background: rgba(255, 249, 240, 0.98);
    box-shadow: var(--shadow-soft);
    border-color: rgba(87, 57, 34, 0.2);
}

.legal-content section.disclaimer-highlight {
    background: linear-gradient(135deg, rgba(202, 92, 54, 0.08) 0%, rgba(202, 92, 54, 0.04) 100%);
    border: 2px solid var(--accent);
}

.legal-content section.disclaimer-highlight:hover {
    background: linear-gradient(135deg, rgba(202, 92, 54, 0.12) 0%, rgba(202, 92, 54, 0.06) 100%);
    box-shadow: 0 8px 24px rgba(202, 92, 54, 0.15);
}

.legal-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--accent-strong);
    letter-spacing: -0.3px;
    margin-top: 0;
}

.legal-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    margin-top: 18px;
    color: var(--accent);
}

.legal-content p {
    margin-bottom: 14px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
}

.legal-content ul {
    margin-left: 24px;
    margin-bottom: 14px;
    list-style-position: outside;
}

.legal-content li {
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
}

.legal-content strong {
    font-weight: 700;
    color: var(--accent-strong);
}

.legal-content em {
    color: var(--accent);
    font-style: italic;
}

.legal-footer {
    padding-top: 32px;
    border-top: 2px solid var(--line);
    text-align: center;
}

.legal-footer .legal-back {
    display: inline-flex;
    margin-bottom: 0;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 248, 235, 0.72);
    border-left: 1px solid rgba(87, 57, 34, 0.08);
}

::-webkit-scrollbar-thumb {
    background: rgba(166, 81, 49, 0.72);
    border-radius: 6px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(143, 52, 25, 0.88);
}

/* Responsive Design */
@media (max-width: 768px) {
    .legal-container {
        padding: 32px 20px 120px 20px;
    }

    .legal-header {
        margin-bottom: 32px;
        padding-bottom: 20px;
    }

    .legal-header h1 {
        font-size: 32px;
    }

    .legal-content section {
        padding: 20px;
        margin-bottom: 24px;
    }

    .legal-content h2 {
        font-size: 19px;
        margin-bottom: 12px;
    }

    .legal-content h3 {
        font-size: 15px;
    }

    .legal-content p,
    .legal-content li {
        font-size: 14px;
    }

    .legal-content ul {
        margin-left: 20px;
    }
}

@media (max-width: 480px) {
    .legal-container {
        padding: 24px 16px 120px 16px;
    }

    .legal-header h1 {
        font-size: 28px;
    }

    .legal-content section {
        padding: 16px;
    }

    .legal-content h2 {
        font-size: 18px;
    }

    .legal-content p,
    .legal-content li {
        font-size: 13px;
    }
}

/* Print Styles */
@media print {
    .legal-back,
    .legal-footer {
        display: none;
    }

    .legal-container {
        max-width: 100%;
        padding: 0;
    }

    .legal-content {
        margin-bottom: 0;
    }

    .legal-content section {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}


/* Price Tag Footer */
.price-tag-footer {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 250, 245, 0.98) 100%);
    border-top: 1px solid rgba(87, 57, 34, 0.12);
    border-bottom: 1px solid rgba(87, 57, 34, 0.12);
    backdrop-filter: blur(8px);
    z-index: 9998;
    padding: 12px 0;
}

.price-tag-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.price-tag-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-tag-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.price-tiers-display {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.price-tier-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(87, 57, 34, 0.1);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.price-tier-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(87, 57, 34, 0.2);
}

.tier-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.tier-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
}

@media (max-width: 768px) {
    .price-tag-footer-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 20px;
    }

    .price-tiers-display {
        width: 100%;
    }

    .price-tier-item {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .price-tag-footer {
        padding: 8px 0;
    }

    .price-tag-footer-content {
        padding: 8px 16px;
        gap: 12px;
    }

    .price-tag-label {
        font-size: 12px;
    }

    .tier-label,
    .tier-price {
        font-size: 12px;
    }

    .price-tier-item {
        padding: 6px 12px;
        gap: 6px;
    }
}
