:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #64748b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    color: var(--text-primary);
    line-height: 1.8;
    margin: 0;
    padding: 0;
    direction: rtl;
    text-align: right;
}

.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: calc(100vh - 200px);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb .separator {
    color: var(--border-color);
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Rules Container */
.rules-container {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Rules Header */
.rules-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6366f1 100%);
    color: white;
    padding: 48px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.rules-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 15s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.icon-wrapper svg {
    color: white;
}

.rules-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    position: relative;
    z-index: 1;
}

.rules-header .subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin: 0;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

/* Rules Content */
.rules-content {
    padding: 48px 40px;
}

.rule-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border-right: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.rule-item:hover {
    background: #f1f5f9;
    transform: translateX(-4px);
    box-shadow: var(--shadow-sm);
}

.rule-marker {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    margin-top: 10px;
}

.rule-item p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-primary);
}

/* Rules Footer */
.rules-footer {
    background: var(--bg-light);
    padding: 40px;
    border-top: 1px solid var(--border-color);
}

.info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.info-box svg {
    flex-shrink: 0;
    color: #2563eb;
    margin-top: 2px;
}

.info-box p {
    margin: 0;
    color: #1e40af;
    font-size: 0.95rem;
    line-height: 1.6;
}

.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .page-wrapper {
        padding: 24px 16px;
    }

    .rules-header {
        padding: 32px 24px;
    }

    .rules-header h1 {
        font-size: 1.8rem;
    }

    .rules-header .subtitle {
        font-size: 1rem;
    }

    .rules-content {
        padding: 32px 24px;
    }

    .rule-item {
        padding: 16px;
    }

    .rules-footer {
        padding: 24px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .rules-header h1 {
        font-size: 1.5rem;
    }

    .icon-wrapper {
        width: 64px;
        height: 64px;
    }

    .icon-wrapper svg {
        width: 32px;
        height: 32px;
    }
}
