@import url('style.css');

.rules-hero {
    height: 40vh;
    min-height: 350px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-bg);
    overflow: hidden;
}

.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(0, 102, 255, 0.1) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(0, 76, 204, 0.1) 50%, transparent 70%);
    background-size: 200% 200%;
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

.rules-content {
    padding: 80px 0;
    background: var(--dark-secondary);
}

.rules-content .container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 4rem;
    align-items: start;
}

.rules-sidebar {
    position: sticky;
    top: 100px;
    background: var(--dark-tertiary);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 102, 255, 0.2);
}

.rules-sidebar h3 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.nav-list {
    list-style: none;
}

.nav-list li {
    margin-bottom: 1rem;
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary-blue);
    transition: height 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(0, 102, 255, 0.1);
    color: var(--primary-blue);
    padding-left: 1.5rem;
}

.nav-item.active::before {
    height: 70%;
}

.rules-main {
    max-width: 800px;
}

.rule-section {
    margin-bottom: 4rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.rule-section:nth-child(1) { animation-delay: 0.1s; }
.rule-section:nth-child(2) { animation-delay: 0.2s; }
.rule-section:nth-child(3) { animation-delay: 0.3s; }
.rule-section:nth-child(4) { animation-delay: 0.4s; }
.rule-section:nth-child(5) { animation-delay: 0.5s; }

.rule-section h2 {
    color: var(--primary-blue);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    padding-left: 20px;
}

.rule-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 100%;
    background: var(--accent-gradient);
}

.rule-card {
    background: var(--dark-tertiary);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.rule-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 102, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.rule-card:hover::before {
    left: 100%;
}

.rule-card:hover {
    border-color: rgba(0, 102, 255, 0.3);
    transform: translateX(10px);
}

.rule-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.rule-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.rule-card.warning {
    border-left: 4px solid #ff9800;
}

.rule-card.danger {
    border-left: 4px solid #f44336;
}

@media (max-width: 768px) {
    .rules-content .container {
        grid-template-columns: 1fr;
    }
    
    .rules-sidebar {
        position: static;
        margin-bottom: 3rem;
    }
}