* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    max-width: 1400px;
    width: 100%;
    display: flex;
    gap: 30px;
    margin: 0 auto;
    padding: 20px;
}

.sidebar {
    width: 350px;
    height: 290px;
    flex-shrink: 0;
    background: #161616;
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.sidebar-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sidebar h2 {
    color: #6c8eff;
    margin-bottom: 25px;
    font-size: 1.5rem;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(108, 142, 255, 0.3);
    flex-shrink: 0;
}

.nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.nav-buttons::-webkit-scrollbar {
    width: 6px;
}

.nav-buttons::-webkit-scrollbar-track {
    background: rgba(40, 44, 75, 0.5);
    border-radius: 3px;
}

.nav-buttons::-webkit-scrollbar-thumb {
    background: #6c8eff;
    border-radius: 3px;
}

.nav-btn {
    background: #620098;
    border: none;
    color: #d0d7ff;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    text-align: left;
    border-left: 3px solid transparent;
    flex-shrink: 0;
    min-height: 50px;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: #620098;
}

.nav-btn.active {
    background: #6c00a7;
    color: #ffffff;
    font-weight: 600;
}

.main-content {
    flex-grow: 1;
    min-height: 290px;
    background: #2b0047;
    border-radius: 20px;
    padding: 40px;
    overflow-y: auto;
}

.rule-text {
    line-height: 1.6;
    font-size: 1.05rem;
    font-family: 'Segoe UI';
    font-weight: 550;
    color: #e0e7ff;
}

.hidden {
    display: none !important;
}

.rule-number {
    color: #a379fe;
    font-family: 'Segoe UI';
    font-weight: bold;
}

@media (max-width: 1200px) {
    .container {
        gap: 20px;
        padding: 15px;
    }
    
    .sidebar {
        width: 290px;
        height: 280px;
        padding: 20px;
    }
    
    .main-content {
        padding: 30px;
        min-height: 280px;
    }
}

@media (max-width: 992px) {
    .container {
        flex-direction: column;
        gap: 25px;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 320px;
        min-height: 250px;
    }
    
    .main-content {
        min-height: auto;
        height: auto;
        max-height: none;
    }
    
    .nav-buttons {
        max-height: 250px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px 10px;
        gap: 20px;
    }
    
    .sidebar {
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    .main-content {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .sidebar h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .nav-btn {
        padding: 10px 12px;
        font-size: 0.95rem;
        min-height: 45px;
    }
    
    .rule-text {
        font-size: 1rem;
        line-height: 1.5;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 10px;
        gap: 15px;
    }
    
    .sidebar {
        padding: 18px 12px;
        border-radius: 12px;
    }
    
    .main-content {
        padding: 20px 15px;
        border-radius: 12px;
    }
    
    .sidebar h2 {
        font-size: 1.2rem;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .nav-btn {
        padding: 9px 10px;
        font-size: 0.9rem;
        min-height: 42px;
        border-radius: 8px;
    }
    
    .nav-buttons {
        gap: 8px;
    }
    
    .rule-text {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

@media (max-width: 400px) {
    .sidebar h2 {
        font-size: 1.1rem;
    }
    
    .nav-btn {
        font-size: 0.85rem;
        padding: 8px 10px;
        min-height: 40px;
    }
    
    .rule-text {
        font-size: 0.9rem;
    }
}

@media (min-height: 900px) and (min-width: 992px) {
    .sidebar {
        height: 350px;
    }
    
    .main-content {
        min-height: 350px;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .container {
        flex-direction: row;
    }
    
    .sidebar {
        height: 250px;
        width: 300px;
    }
    
    .main-content {
        height: 250px;
    }
}

@media (prefers-color-scheme: dark) {
    .sidebar, .main-content {
        background: #2b0047;
    }
}

.sidebar, .main-content {
    transition: all 0.3s ease;
}