/* charisma-tokens.css и charisma-site.css подключаются в site_head.php */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    background-image: var(--ch-gradient-page);
    background-attachment: fixed;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ХЕДЕР */
.agreement-header {
    position: relative;
    padding: 120px 0 56px;
    background: linear-gradient(155deg, rgba(79, 70, 229, 0.28) 0%, rgba(12, 14, 22, 0.96) 58%, var(--ch-page) 100%);
    border-bottom: 1px solid var(--ch-border);
    margin-bottom: 32px;
}

.header-content {
    text-align: center;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--ch-gradient-brand);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    margin-bottom: 30px;
    box-shadow: 0 10px 28px rgba(79, 70, 229, 0.35);
}

.back-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.privacy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(5, 7, 14, 0.5);
    color: var(--primary-light);
    border: 1px solid rgba(129, 140, 248, 0.5);
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    margin-left: 12px;
}

.privacy-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary-light);
    color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.agreement-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--secondary);
}

.last-updated {
    color: var(--gray);
    font-size: 16px;
}

.version-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-left: 12px;
    vertical-align: middle;
}

/* ОСНОВНОЙ КОНТЕНТ */
.agreement-content {
    padding: 0 0 80px;
}

.section {
    background: var(--ch-card-solid);
    border-radius: var(--border-radius);
    padding: 40px;
    margin-bottom: 30px;
    border: 1px solid var(--ch-border);
    box-shadow: var(--shadow);
    transition: var(--transition);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.section:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: var(--primary);
    font-size: 28px;
}

.section-content {
    color: var(--gray);
    font-size: 16px;
}

.section-content p {
    margin-bottom: 16px;
    line-height: 1.7;
}

.section-content ul, .section-content ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

.section-content li {
    margin-bottom: 10px;
    position: relative;
}

.section-content ul li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: -20px;
}

.highlight {
    color: var(--primary);
    font-weight: 600;
}

.warning-box {
    background: rgba(248, 113, 113, 0.1);
    border-left: 4px solid var(--danger);
    padding: 24px;
    border-radius: 8px;
    margin: 24px 0;
}

.danger-box {
    background: rgba(251, 191, 36, 0.1);
    border: 2px solid rgba(251, 191, 36, 0.45);
    padding: 24px;
    border-radius: 8px;
    margin: 24px 0;
    color: var(--ch-text);
}

.info-box {
    background: rgba(99, 102, 241, 0.12);
    border-left: 4px solid var(--primary);
    padding: 24px;
    border-radius: 8px;
    margin: 24px 0;
}

.legal-box {
    background: var(--ch-input);
    border: 1px solid var(--ch-border);
    padding: 24px;
    border-radius: 8px;
    margin: 24px 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--ch-input);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--ch-border);
}

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

th {
    background: linear-gradient(135deg, var(--primary-dark), var(--ch-purple-deep));
    color: white;
    font-weight: 600;
}

tr:hover {
    background: rgba(99, 102, 241, 0.08);
}

.acceptance-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

.acceptance-text {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.accept-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: var(--ch-gradient-brand);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4);
}

.accept-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* ФУТЕР */
footer {
    background: var(--footer-bg);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.footer-column h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 15px;
    transition: var(--transition);
}

.footer-link:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 14px;
}

.site-link {
    color: white;
    font-weight: 600;
    text-decoration: none;
}

.site-link:hover {
    text-decoration: underline;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 768px) {
    .agreement-header {
        padding: 120px 0 40px;
    }
    
    .agreement-title {
        font-size: 32px;
    }
    
    .section {
        padding: 30px 24px;
    }
    
    .section-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .agreement-title {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 960px;
        padding: 0 40px;
    }

    .agreement-header {
        padding: 140px 0 64px;
    }

    .agreement-title {
        font-size: 48px;
    }

    .section {
        padding: 36px 40px;
        transition:
            transform 0.35s ease,
            border-color 0.35s ease,
            box-shadow 0.35s ease;
    }

    .section:hover {
        transform: translateY(-3px);
        border-color: rgba(129, 140, 248, 0.35);
        box-shadow: var(--shadow-lg);
    }
}