* { margin:0; padding:0; box-sizing:border-box; }

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-glow: rgba(79, 70, 229, 0.5);
    --primary-soft: rgba(79, 70, 229, 0.1);
    --success: #10b981;
    --bg-dark: #0b1220;
    --bg-panel: rgba(30, 41, 59, 0.85);
    --border: rgba(226, 232, 240, 0.08);
    --text: #ffffff;
    --text-muted: rgba(248, 250, 252, 0.6);
    --text-dim: rgba(248, 250, 252, 0.4);
    --shadow-lg: 0 25px 50px -12px rgba(15, 23, 42, 0.6);
    --transition: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html, body {
    width: 100%;
    min-height: 100vh;
    background: var(--bg-dark);
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body {
    padding: 40px 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(79, 70, 229, 0.15), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(124, 58, 237, 0.1), transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.08), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.terms-container {
    position: relative;
    z-index: 10;
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-panel);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 40px 40px 50px;
    box-shadow: var(--shadow-lg), 0 0 80px rgba(79, 70, 229, 0.15);
    animation: containerIn 0.6s var(--transition);
}

@keyframes containerIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.terms-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark), var(--primary));
    background-size: 200% 100%;
    animation: gradientMove 3s linear infinite;
    border-radius: 28px 28px 0 0;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.terms-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}

.terms-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    box-shadow: 0 12px 40px var(--primary-glow);
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.terms-header h1 {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.terms-header p {
    color: var(--text-muted);
    font-size: 13px;
}

.terms-content {
    color: var(--text);
    line-height: 1.9;
    font-size: 14px;
}

.terms-section {
    margin-bottom: 26px;
    padding: 20px 22px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 16px;
    border-right: 3px solid var(--primary);
    transition: all 0.3s;
}

.terms-section:hover {
    background: rgba(0, 0, 0, 0.35);
    transform: translateX(-4px);
}

.terms-section h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.terms-section h2 .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.terms-section p {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.terms-section ul {
    list-style: none;
    margin: 10px 0;
    padding: 0;
}

.terms-section ul li {
    color: var(--text-muted);
    padding: 6px 0 6px 22px;
    position: relative;
}

.terms-section ul li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--success);
    font-weight: 700;
    font-size: 13px;
}

.highlight-box {
    background: rgba(79, 70, 229, 0.08);
    border: 1px dashed rgba(79, 70, 229, 0.3);
    border-radius: 12px;
    padding: 14px 18px;
    margin: 14px 0;
    font-size: 13px;
    color: var(--text);
}

.highlight-box strong {
    color: var(--primary);
}

.warning-box {
    background: rgba(245, 158, 11, 0.08);
    border-right: 3px solid #f59e0b;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 14px 0;
    font-size: 13px;
    color: #fcd34d;
}

.terms-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s var(--transition);
    box-shadow: 0 8px 24px var(--primary-glow);
    text-decoration: none;
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--primary-glow);
}

.btn-back:active {
    transform: translateY(0) scale(0.98);
}

.last-update {
    text-align: center;
    margin-top: 16px;
    color: var(--text-dim);
    font-size: 11px;
}

@media (max-width: 600px) {
    .terms-container {
        padding: 28px 22px 36px;
        border-radius: 22px;
    }
    .terms-header h1 { font-size: 20px; }
    .terms-icon { width: 60px; height: 60px; font-size: 28px; }
    .terms-section { padding: 16px 18px; }
}