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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background: linear-gradient(135deg, #0a0a0a 0%, #0f0f1a 50%, #0a0a0a 100%);
    background-attachment: fixed;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #e4e4e7;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(88, 101, 242, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(88, 101, 242, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: rgba(20, 20, 20, 0.5); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #5865f2 0%, #4752c4 100%);
    border-radius: 10px;
    border: 2px solid rgba(20, 20, 20, 0.5);
}

.legal-page {
    max-width: 900px;
    margin: 3rem auto;
    padding: 3rem 3.5rem;
    position: relative;
    z-index: 1;
    color: #e4e4e7;
    background: linear-gradient(135deg, rgba(20, 20, 30, 1) 0%, rgba(15, 15, 25, 1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(88, 101, 242, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: legalFadeIn 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.legal-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(88, 101, 242, 0.4), transparent);
}

@keyframes legalFadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2.25rem;
    padding: 0.7rem 1.15rem;
    color: #7289da;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 12px;
    background: rgba(88, 101, 242, 0.08);
    border: 1px solid rgba(88, 101, 242, 0.2);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.back-link:hover {
    background: rgba(88, 101, 242, 0.16);
    border-color: rgba(88, 101, 242, 0.4);
    color: #fff;
}

.legal-page h1 {
    margin: 0 0 1.25rem;
    padding-bottom: 1.15rem;
    font-size: 2.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #fff;
    border-bottom: 1px solid rgba(88, 101, 242, 0.35);
}

.legal-page h2 {
    position: relative;
    margin: 2.4rem 0 0.85rem;
    padding-left: 1rem;
    font-size: 1.45rem;
    font-weight: 700;
    color: #fff;
}

.legal-page h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.28em;
    width: 4px;
    height: 1.05em;
    border-radius: 2px;
    background: linear-gradient(180deg, #5865f2, #7289da);
}

.legal-page p,
.legal-page li {
    color: #d4d4d8;
    line-height: 1.75;
    margin-bottom: 0.95rem;
}

.legal-page a {
    color: #7289da;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(114, 137, 218, 0.3);
}

.legal-page a:hover {
    color: #9aa6ff;
    border-bottom-color: rgba(88, 101, 242, 0.55);
}

.legal-page ul {
    margin: 0 0 1.25rem 0.1rem;
    list-style: none;
}

.legal-page ul li {
    position: relative;
    padding-left: 1.35rem;
}

.legal-page ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5865f2;
}

.legal-page em { color: #a1a1aa; }

.legal-note--warn p { color: #f5d9a8; margin-bottom: 0.4rem; }
.legal-note--warn p:last-child { margin-bottom: 0; }

.pc-loading {
    height: 8.5rem;
    margin-bottom: 1.25rem;
    border-radius: 16px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(88,101,242,0.12), rgba(255,255,255,0.04));
    background-size: 200% 100%;
    animation: pcShimmer 1.2s ease-in-out infinite;
}

@keyframes pcShimmer {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

.highlight,
.legal-note {
    margin: 1.25rem 0 1.75rem;
    padding: 1.15rem 1.25rem;
    border-radius: 12px;
    background: rgba(24, 24, 27, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid rgba(88, 101, 242, 0.55);
}

.legal-note--warn {
    border-left-color: rgba(250, 166, 26, 0.7);
    background: rgba(250, 166, 26, 0.07);
}

.legal-lead {
    margin: -0.4rem 0 1.6rem;
    color: #a1a1aa;
    font-size: 1.05rem;
}

.pc-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 1.5rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    background: rgba(88, 101, 242, 0.08);
    border: 1px solid rgba(88, 101, 242, 0.2);
}

.pc-identity img,
.pc-identity__fallback {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.35);
}

.pc-identity__fallback {
    display: grid;
    place-items: center;
    background: #2b2d31;
    color: #fff;
    font-weight: 800;
    font-size: 1.35rem;
}

.pc-identity strong {
    display: block;
    color: #fff;
    font-size: 1.2rem;
}

.pc-identity span {
    color: #a1a1aa;
    font-size: 0.9rem;
}

.pc-chip {
    display: inline-flex;
    margin-top: 0.35rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(88, 101, 242, 0.2);
    color: #c7d2fe;
}

.pc-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin: 0 0 1.5rem;
}

.pc-stat {
    padding: 0.95rem 0.9rem 0.85rem;
    border-radius: 14px;
    background: rgba(24, 24, 27, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.pc-stat:hover {
    border-color: rgba(88, 101, 242, 0.35);
    background: rgba(88, 101, 242, 0.08);
}

.pc-stat b {
    display: block;
    color: #fff;
    font-size: 1.45rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.pc-stat span {
    display: block;
    margin-top: 0.3rem;
    color: #9ca3af;
    font-size: 0.78rem;
}

.pc-section {
    margin: 0 0 1.15rem;
    padding: 1.15rem 1.2rem 1.2rem;
    border-radius: 16px;
    background: rgba(24, 24, 27, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.pc-section h2 {
    margin-top: 0;
    font-size: 1.15rem;
}

.muted { color: #a1a1aa; font-size: 0.92rem; }

.pc-meta {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 0.4rem 1rem;
}

.pc-meta dt { color: #9ca3af; }
.pc-meta dd { color: #fff; word-break: break-word; }

.pc-table-wrap {
    overflow-x: auto;
    margin-top: 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.pc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.pc-table th,
.pc-table td {
    text-align: left;
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pc-table th {
    color: #e0e7ff;
    background: rgba(88, 101, 242, 0.18);
}

.pc-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }
.pc-table tbody tr:hover td { background: rgba(88, 101, 242, 0.08); }

.pc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.85rem;
}

.pc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.68rem 1rem;
    border: 0;
    border-radius: 11px;
    font: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.pc-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.pc-btn--primary { background: #5865f2; color: #fff; }
.pc-btn--ghost { background: rgba(255, 255, 255, 0.07); color: #e4e4e7; }
.pc-btn--danger { background: #ed4245; color: #fff; }

.legal-page .pc-btn,
.legal-page .pc-btn:hover { border-bottom: 0; }

.pc-input {
    width: 100%;
    min-height: 92px;
    margin-top: 0.65rem;
    padding: 0.75rem 0.85rem;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
    font: inherit;
    resize: vertical;
}

.pc-status { margin-top: 0.7rem; font-size: 0.92rem; }
.pc-status--ok { color: #57f287; }
.pc-status--err { color: #ed4245; }

.pc-foot {
    margin-top: 1.4rem;
    color: #a1a1aa;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .legal-page {
        margin: 1.4rem 1rem;
        padding: 1.7rem 1.35rem;
        border-radius: 20px;
    }
    .legal-page h1 { font-size: 1.85rem; }
    .pc-stats { grid-template-columns: 1fr 1fr; }
    .pc-meta { grid-template-columns: 1fr; }
}
