/* =========================================
   RULES PAGE - DARK THEME
   ========================================= */

/* ---------- Variables ---------- */
:root {
    --red-primary: #dc2626;
    --red-dark: #991b1b;
    --red-glow: rgba(220, 38, 38, 0.5);
    --bg-dark: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a1a1a1;
    --text-muted: #666666;
}

/* ---------- Reset & Base ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'MyCustomFont', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.8;
}

@font-face {
    font-family: MyCustomFont;
    src: url(font/font-bold.woff2) format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ---------- Background Mesh ---------- */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(220, 38, 38, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(220, 38, 38, 0.05) 0%, transparent 50%);
}

/* =========================================
   RULES HERO
   ========================================= */
.rules-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 80px;
    overflow: hidden;
    z-index: 1;
}

.hero-bg-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(220, 38, 38, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 50%, rgba(220, 38, 38, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 50%, rgba(220, 38, 38, 0.08) 0%, transparent 40%);
}

.hero-bg-effect::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.1) 0%, transparent 60%);
    filter: blur(80px);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-badge {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, var(--red-primary), var(--red-dark));
    border-radius: 20px;
    font-size: 32px;
    color: white;
    box-shadow: 
        0 10px 40px rgba(220, 38, 38, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 
            0 10px 40px rgba(220, 38, 38, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 
            0 10px 60px rgba(220, 38, 38, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
}

.hero-title {
    font-family: 'MyCustomFont', sans-serif;
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.title-line {
    display: block;
    color: var(--text-primary);
    text-shadow: 0 0 60px rgba(255, 255, 255, 0.1);
}

.title-highlight {
    display: block;
    color: var(--red-primary);
    text-shadow: 
        0 0 40px var(--red-glow),
        0 0 80px var(--red-glow);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.update-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    font-size: 14px;
    color: var(--text-secondary);
}

.update-badge i {
    color: var(--red-primary);
}

.update-badge strong {
    color: var(--text-primary);
}

.hero-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    display: flex;
    justify-content: center;
    gap: 100px;
    pointer-events: none;
}

.deco-line {
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(220, 38, 38, 0.3), transparent);
}

/* =========================================
   RULES CARDS SECTION
   ========================================= */
.rules-cards-section {
    position: relative;
    z-index: 1;
    padding: 60px 20px 120px;
    background: linear-gradient(to bottom, transparent, rgba(220, 38, 38, 0.02));
}

.rules-cards-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

/* =========================================
   RULE CARD ITEM
   ========================================= */
.rule-card-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 600px;
    width: 100%;
}

.rule-card-item:hover {
    transform: translateY(-10px);
    border-color: rgba(220, 38, 38, 0.3);
}

.rule-card-item.featured {
    border-color: rgba(220, 38, 38, 0.3);
    background: linear-gradient(135deg, var(--bg-card), rgba(220, 38, 38, 0.05));
}

.rule-card-item.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--red-primary), transparent);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(220, 38, 38, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.rule-card-item:hover .card-glow {
    opacity: 1;
}

.card-inner {
    position: relative;
    z-index: 1;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 14px;
    background: var(--red-primary);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
}

.card-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--red-primary), var(--red-dark));
    border-radius: 24px;
    font-size: 40px;
    color: white;
    margin-bottom: 25px;
    box-shadow: 0 10px 40px rgba(220, 38, 38, 0.3);
    transition: all 0.4s ease;
}

.rule-card-item:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 50px rgba(220, 38, 38, 0.5);
}

.card-inner h2 {
    font-family: 'MyCustomFont', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

/* Rules Text Styling */
.card-inner p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 2;
    margin-bottom: 20px;
    text-align: right;
    direction: rtl;
    white-space: pre-line;
    width: 100%;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 992px) {
    .rule-card-item {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .card-inner {
        padding: 30px 20px;
    }
    
    .card-icon {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    
    .card-inner h2 {
        font-size: 1.2rem;
    }
    
    .card-inner p {
        font-size: 13px;
        line-height: 1.8;
    }
}

@media (max-width: 480px) {
    .card-badge {
        top: 15px;
        right: 15px;
        padding: 5px 12px;
        font-size: 10px;
    }
    
    .card-icon {
        width: 70px;
        height: 70px;
        font-size: 28px;
        margin-bottom: 20px;
    }
}

/* =========================================
   FOOTER
   ========================================= */
.rules-footer {
    position: relative;
    z-index: 1;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.5);
}

.rules-footer p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.rules-footer .copyright {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.2);
}

/* =========================================
   PDF MODAL - FULL SCREEN
   ========================================= */
.pdf-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
}

.pdf-modal.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pdf-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.pdf-modal-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #0d0d0d;
}

/* =========================================
   PDF HEADER
   ========================================= */
.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.pdf-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'MyCustomFont', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pdf-title i {
    color: var(--red-primary);
    font-size: 1.4rem;
}

.pdf-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pdf-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pdf-btn:hover {
    background: var(--red-primary);
    border-color: var(--red-primary);
    color: white;
    transform: scale(1.05);
}

.zoom-level {
    min-width: 60px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

/* =========================================
   PDF BODY
   ========================================= */
.pdf-modal-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.pdf-viewer {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.pdf-page {
    width: 100%;
    max-width: 800px;
    margin: 40px auto;
    background: #1a1a1a;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    page-break-after: always;
}

.pdf-content {
    padding: 60px;
}

/* PDF Header Section */
.pdf-header-section {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 2px solid rgba(220, 38, 38, 0.3);
}

.pdf-logo {
    width: 100px;
    height: 100px;
    margin-bottom: 25px;
    border-radius: 20px;
}

.pdf-header-section h1 {
    font-family: 'MyCustomFont', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 15px;
    text-transform: uppercase;
}

.pdf-header-section p {
    font-size: 14px;
    color: var(--text-muted);
}

/* PDF Sections */
.pdf-section {
    margin-bottom: 40px;
}

.pdf-section h2 {
    font-family: 'MyCustomFont', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--red-primary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdf-section h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--red-primary);
    border-radius: 2px;
}

/* PDF Rules */
.pdf-rule {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.pdf-rule:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(220, 38, 38, 0.2);
}

.pdf-rule h3 {
    font-family: 'MyCustomFont', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.pdf-rule p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
}

/* PDF Punishments */
.pdf-punishment {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pdf-punishment.ban {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.pdf-punishment.kick {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.pdf-punishment.mute {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.pdf-punishment.warn {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* PDF Punishments Table */
.pdf-punishments-table {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.table-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1.5fr;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row.header {
    background: rgba(220, 38, 38, 0.1);
    font-weight: 700;
    color: var(--text-primary);
}

.table-row span:first-child {
    font-weight: 600;
}

.table-row .punishment {
    font-size: 11px;
}

/* PDF Notes */
.pdf-note {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    margin-bottom: 15px;
}

.pdf-note i {
    font-size: 20px;
    color: #3b82f6;
    margin-top: 2px;
}

.pdf-note p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.pdf-note.warning {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.2);
}

.pdf-note.warning i {
    color: #fbbf24;
}

.pdf-note.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
}

.pdf-note.success i {
    color: #22c55e;
}

/* Appeal Box */
.appeal-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 25px;
    background: rgba(88, 86, 214, 0.1);
    border: 1px solid rgba(88, 86, 214, 0.3);
    border-radius: 12px;
    margin-top: 20px;
}

.appeal-box i {
    font-size: 28px;
    color: #5856d6;
}

.appeal-box span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* PDF Signature */
.pdf-signature {
    text-align: center;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pdf-signature img {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    border-radius: 16px;
}

.pdf-signature p {
    font-size: 16px;
    color: var(--text-secondary);
}

.pdf-signature .team {
    font-family: 'MyCustomFont', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--red-primary);
    margin-top: 10px;
}

/* PDF Footer */
.pdf-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: var(--text-muted);
}

/* =========================================
   PDF FOOTER (Navigation)
   ========================================= */
.pdf-modal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 15px 25px;
    background: linear-gradient(0deg, #1a1a1a 0%, #0d0d0d 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.pdf-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-secondary);
    font-family: 'MyCustomFont', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pdf-nav-btn:hover:not(:disabled) {
    background: var(--red-primary);
    border-color: var(--red-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(220, 38, 38, 0.3);
}

.pdf-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--text-muted);
}

.page-indicator #currentPage {
    color: var(--red-primary);
    font-weight: 700;
    font-size: 20px;
    font-family: 'MyCustomFont', sans-serif;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 992px) {
    .rules-cards-container {
        grid-template-columns: 1fr;
        max-width: 450px;
    }
    
    .rule-card-item.featured {
        order: -1;
    }
    
    .pdf-content {
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    .rules-hero {
        min-height: 50vh;
        padding: 100px 20px 60px;
    }
    
    .hero-badge {
        width: 60px;
        height: 60px;
        font-size: 24px;
        border-radius: 16px;
    }
    
    .hero-decoration {
        display: none;
    }
    
    .pdf-modal-header {
        padding: 12px 15px;
    }
    
    .pdf-title {
        font-size: 0.9rem;
    }
    
    .pdf-title span {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .pdf-btn {
        width: 40px;
        height: 40px;
    }
    
    .pdf-modal-footer {
        padding: 12px 15px;
        gap: 15px;
    }
    
    .pdf-nav-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .pdf-header-section h1 {
        font-size: 1.8rem;
    }
    
    .pdf-section h2 {
        font-size: 1.2rem;
    }
    
    .table-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .table-row span:nth-child(3) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }
    
    .pdf-controls {
        gap: 8px;
    }
    
    .zoom-level {
        display: none;
    }
    
    .pdf-content {
        padding: 30px 20px;
    }
    
    .pdf-rule {
        padding: 15px;
    }
    
    .pdf-note {
        flex-direction: column;
        text-align: center;
    }
    
    .pdf-note i {
        margin-top: 0;
    }
}